🎉 v1.1.0
Six new rules, a set of shared helpers under src/utils, and clearer contribution docs.
🆕 New rules
| Rule | What it does | Presets |
|---|---|---|
| 🔁 no-duplicate-font-faces | Flags @font-face declarations that are defined more than once
| recommended · correctness · performance · holistic |
| 🗑️ no-unused-font-faces | Flags @font-face declarations that nothing uses
| recommended · correctness · performance · holistic |
| 🛡️ no-invalid-property-registration | Catches invalid @property registrations
| recommended · correctness |
| 🔘 max-unique-border-radiuses | Limits unique border-radius values (default 8, warning)
| recommended · design-tokens · holistic |
| 🎛️ max-unique-custom-properties | Limits unique custom properties (default 256, warning) | recommended · design-tokens · holistic |
| 🧅 max-unique-layers | Limits unique @layer names (default 8, warning)
| recommended · maintainability · holistic |
⚠️ Heads-up for upgraders: if you extend
recommended, you'll get all six rules automatically. The two font-face rules andno-invalid-property-registrationare enabled as errors. The threemax-unique-*rules start as warnings.
Each rule has its own README under src/rules/<rule>/README.md.
🧰 Shared helpers in src/utils
A lot of duplicated logic is now in reusable helpers. New rules need less boilerplate, and the rules behave more consistently.
- 🏗️
define_rule: one place for rule metadata and plugin registration (#281) - 📊
UniqueTrackerandvalidate_options_with_ignore: shared by allmax-unique-*rules (#282) - 📍
get_value_offsetandget_params_offset: report helpers that point at the exact position in a value or at-rule (#280) - ⚡ String utilities replace regexes: matching now uses the case-insensitive, allocation-free helpers from
@projectwallace/css-parser/string-utils(#279)
📚 Docs
- ✍️
CONTRIBUTING.mdhas a new "String matching" section. It explains when to usestr_equals,str_starts_with,str_index_of,is_customandstrip_vendor_prefix. It also covers pitfalls with custom idents and vendor-prefixed names. - 🧭
README.mdnow lists the new rules and points to the shared helpers.
📦 Dependencies
- ⬆️
css-parser0.19.4 - ⬆️
css-analyzer9.9.6 - ⬆️
oxlint-preset0.0.12
What's Changed
- feat: add no-duplicate-font-faces rule by @bartveneman in #270
- chore(deps): update css-parser 0.19.4; css-analyzer 9.9.6; oxlint-preset 0.0.12 by @bartveneman in #278
- feat: add no-unused-font-faces rule by @bartveneman in #269
- feat: add no-invalid-property-registration rule by @bartveneman in #271
- feat: add max-unique-border-radiuses rule by @bartveneman in #273
- feat: add max-unique-custom-properties rule by @bartveneman in #274
- feat: add max-unique-layers rule by @bartveneman in #275
- Replace regex patterns with string utility functions by @bartveneman in #279
- Extract get_value_offset and get_params_offset report helpers by @bartveneman in #280
- Add UniqueTracker and validate_options_with_ignore for max-unique rules by @bartveneman in #282
- Add define_rule helper for rule metadata and plugin registration by @bartveneman in #281
Full Changelog: v1.0.0...v1.1.0