You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config file changed from .stylelintrc (JSON) to stylelint.config.js (ESM). extends: "stylelint-config-htmlacademy" keeps working through package.json#exports. Consumers reaching into the file path directly (e.g. extends: "stylelint-config-htmlacademy/.stylelintrc") must switch to the package name.
Added
Stylelint v17 compatibility in peerDependencies.
stylelint-order plugin with 7 semantic groups (custom properties, positioning, box-model, typography, decoration, animation, interactivity) covering ~430 modern CSS properties: container queries, anchor positioning, view transitions, full logical properties, field-sizing, corner-shape, scroll API, masks, modern typography. The list lives in a separate properties-order.js module.
order/order: [custom-properties, declarations, rules] — declarations after nested rules are flagged.
selector-no-deprecated — deprecated selectors like :-webkit-any are flagged.
selector-anb-no-unmatchable — impossible selectors like :nth-child(0) are flagged (closes #66).
selector-no-invalid — syntactically invalid selectors like [0foo] or :nth-child(2n+) are flagged. CSS only; disabled in SCSS/LESS overrides.
no-unknown-custom-media — typos in @custom-media references are flagged (closes #144).
no-unknown-custom-properties — references to undeclared custom properties are flagged (closes #46).
color-function-alias-notation: "without-alpha" — only rgb()/hsl() allowed; rgba/hsla aliases are flagged (closes #34).
declaration-block-single-line-max-declarations: 0 — single-line blocks are flagged (closes #106).
selector-max-compound-selectors: 2 — selectors like .a.b.c are flagged (closes #111).
selector-max-class: 2 — chains like .a.b.c are flagged (closes #109).
selector-max-combinators: 2 — chains like .a .b .c .d are flagged (closes #110).
selector-max-type: 2 — chains with more than two type selectors are flagged (closes #114).
font-family-no-duplicate-names now ignores the monospace keyword for the "Courier New", monospace, monospace font-stack pattern.
test/invalid/ suite via node:test + stylelint.lint(). test/utils/testRule.js helper does a subset match against expected warnings. ~35 fixtures cover all new rules and the most important existing ones.
npm test:valid (positive fixtures) and npm test:invalid (negative fixtures) scripts; npm test runs both.
Changed
Bumped Stylelint to ^17.11.1. Picks up bug fixes for selector-pseudo-class-no-unknown (nested ::-webkit-scrollbar parts), declaration-block-no-redundant-longhand-properties (more accurate range), and function-url-quotes (URLs with modifiers).
declaration-no-important now reports a warning instead of an error.
selector-not-notation switched from simple to complex — Selectors Level 4 list :not(.a, .b) is preferred over chained :not(.a):not(.b). Auto-fixable.
selector-class-pattern tightened to strict BEM: block__element--modifier only, single underscore or trailing modifier are flagged. Closes #48, #122, #54.
aspect-ratio ordered after the full sizing block (max-block-size) instead of after max-height.
content moved to the start of the decoration group — natural position for ::before/::after content.
Removed
camelCaseSvgKeywords: true option from value-keyword-case — caused false positives for color-mix(in srgb, ...) and similar modern CSS functions. SVG-like keywords now also enforced lowercase (closes #130).
Migration notes
Most consumers (extends: "stylelint-config-htmlacademy"): no action required.
Run stylelint --fix once: media-feature-range-notation, selector-not-notation, alpha-value-notation, and the expanded properties-order are auto-fixable and will reformat existing CSS. Note that alpha-value-notation: "percentage" rewrites opacity: 0.5 to opacity: 50% (valid CSS Color 4 syntax).
selector-class-pattern BEM tightening: single underscore (.foo_bar) and chained modifiers (.block--mod--extra) are now flagged. Switch to block__element--modifier.