Skip to content

v1.1.0

Latest

Choose a tag to compare

@bartveneman bartveneman released this 07 Nov 14:23
· 1 commit to main since this release
Immutable release. Only release title and notes can be modified.
1fd3a47

🎉 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 and no-invalid-property-registration are enabled as errors. The three max-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)
  • 📊 UniqueTracker and validate_options_with_ignore: shared by all max-unique-* rules (#282)
  • 📍 get_value_offset and get_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.md has a new "String matching" section. It explains when to use str_equals, str_starts_with, str_index_of, is_custom and strip_vendor_prefix. It also covers pitfalls with custom idents and vendor-prefixed names.
  • 🧭 README.md now lists the new rules and points to the shared helpers.

📦 Dependencies

  • ⬆️ css-parser 0.19.4
  • ⬆️ css-analyzer 9.9.6
  • ⬆️ oxlint-preset 0.0.12

What's Changed

Full Changelog: v1.0.0...v1.1.0