#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.

Rules determine what the linter looks for and complains about. 所有规则默认是关闭的,而且没有默认选项。这些规则遵循统一的命名惯例,协同配合,你可以在关于规则中了解更多。

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.

除了这些规则,还有插件,它们是社区支持的方法、工具集,非标准的 CSS 特性,或特定的用例。查看插件了解更多。

Rules which have a wrench below can be autofixed by using stylefmt.

在下文中带有的图标的规则可以使用 stylefmt 进行自动修复。

#List of rules

Here are all the rules within stylelint, grouped by the thing they apply to.

以下是 stylelint 的所有规则,并参照css vocabulary进行分类。

#Color

#Font family

#Font weight

#Function

#Number

#String

#Length

#Time

#Unit

#Value

#Value list

#Custom property

#Shorthand property

#Property

#Keyframe declaration

#Declaration

#Declaration block

#Block

#Selector

#Selector list

#Root rule

#Rule

#Media feature

#Custom media

#Media query list

#At-rule

#stylelint-disable comment

#Comment

#General / Sheet