Skip to content

Latest commit

 

History

History
335 lines (222 loc) · 25.8 KB

rules.md

File metadata and controls

335 lines (222 loc) · 25.8 KB

Rules

Rules determine what the linter looks for and complains about. All the rules are turned off by default and none have default values for their options. The rules follow a consistent naming convention and have been designed to work in conjunction with one another, you can read more about this in the "About rules" section.

In addition to these rules there are plugins, which are rules built by the community that support methodologies, toolsets, non-standard CSS features, or very specific use cases. Don't forget to look at the list of plugins for more ways to lint.

List of rules

Here are all the rules within stylelint, grouped first by category and then by the thing they apply to.

Possible errors

Color

Font family

Function

String

Unit

Shorthand property

Property

Keyframe declaration

Declaration block

Block

Selector

Media feature

At-rule

Comment

General / Sheet

Limit language features

Color

Function

Number

Time

Unit

Value

Custom property

Property

Declaration

Declaration block

Selector

Media feature

Custom media

At-rule

Comment

Stylistic issues

Color

  • color-hex-case: Specify lowercase or uppercase for hex colors (Autofixable).
  • color-hex-length: Specify short or long notation for hex colors (Autofixable).

Font family

Font weight

Function

Number

String

Length

Unit

  • unit-case: Specify lowercase or uppercase for units.

Value

Value list

Custom property

Property

Declaration

Declaration block

Block

Selector

Selector list

Rule

Media feature

Media query list

At-rule

Comment

General / Sheet