最近公司有个项目需要对css的一些书写规则进行检测,于是想到了用grunt-ctrib-csslint插件,但是该插件的参数设置的文档说明特别难找,最终github上面找到了挺好的说明文档,但是是英文的。本人英文水平不算特别好,具体参数的查看需要借助翻译工具,期待相关中文说明文档的推出。
Any specified option will be passed through directly to csslint, thus you can specify any option that csslint supports. The csslint API is a bit awkward: For each rule, a value of false
ignores the rule, a value of 2
will set it to become an error. Otherwise all rules are considered warnings.
For the current csslint version, these rules are available:
- important
- adjoining-classes
- known-properties
- box-sizing
- box-model
- overqualified-elements
- display-property-grouping
- bulletproof-font-face
- compatible-vendor-prefixes
- regex-selectors
- errors
- duplicate-background-images
- duplicate-properties
- empty-rules
- selector-max-approaching
- gradients
- fallback-colors
- font-sizes
- font-faces
- floats
- star-property-hack
- outline-none
- import
- ids
- underscore-property-hack
- rules-count
- qualified-headings
- selector-max
- shorthand
- text-indent
- unique-headings
- universal-selector
- unqualified-attributes
- vendor-prefix
- zero-units