Lint Rules
Every rule in the Stateful CSS Stylelint plugin: what it checks, how severe it is, and whether it can fix.
| Rule | Checks | Severity | Fixable |
|---|---|---|---|
variable-role-prefix | Every custom property you declare, and every `@property` you register, starts with a role prefix and a name. | error | no |
theme-tokens | Tokens and theme scopes belong together: a token is declared only in a theme scope, a theme scope declares only tokens and `color-scheme`, and themes are written only in the theme files. | error | no |
bind-once | Each property is declared once per element. If it needs to change, it's bound once to a state variable, and the variable changes. | error | no |
bind-through-state-variables | Every change flows through a variable: a property never reads a private that a variant or a state changes, and a variable a variant writes is never written by a state. | error | no |
blocking-states-win | Interaction states never apply to a blocked element: they sit inside a guard that lists every blocking state, focus stays outside it, and blocking states set only their own look. | warning | yes |
visited-colors-only | A `:visited` block declares only what `:visited` can apply: its color properties, set directly. | error | no |
no-undeclared-state-variables | Every state variable and private an element reads or changes is declared on that element, except what its owner declares for it. | error | no |
no-unchanged-state-variables | A state variable is changed by a variant, a state or a query. | warning | no |
parts-in-scope | A component's parts are styled only inside its `@scope (root) to ([data-component])`, written after its root block, in the same file. | error | no |
part-variables | A part variable is written only by the owner of the part it names, and read only by that part. | error | no |
state-variable-names | A state variable is named after the property that reads it and holds that property's whole value. A part variable is named the same way, after its part. | error | no |
component-variables-read-only | A component never writes its own component variables. | error | no |
no-abbreviations | Names that other people and tools read use full words, not abbreviations. | warning | no |
config-check | The rules that keep a promise together are switched on together, and no rule the methodology contradicts is on. | warning | no |