2017-12-01 06:25:48 +00:00
|
|
|
# csslint
|
|
|
|
|
2024-04-25 23:58:21 +01:00
|
|
|
> Lint CSS code.
|
2019-06-09 00:05:31 +01:00
|
|
|
> More information: <https://github.com/CSSLint/csslint/wiki/Command-line-interface>.
|
2017-12-01 06:25:48 +00:00
|
|
|
|
|
|
|
- Lint a single CSS file:
|
|
|
|
|
|
|
|
`csslint {{file.css}}`
|
|
|
|
|
|
|
|
- Lint multiple CSS files:
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`csslint {{file1.css file2.css ...}}`
|
2017-12-01 06:25:48 +00:00
|
|
|
|
|
|
|
- List all possible style rules:
|
|
|
|
|
|
|
|
`csslint --list-rules`
|
|
|
|
|
2024-02-09 13:55:36 +00:00
|
|
|
- Treat certain rules as errors (which results in a non-zero exit code):
|
2017-12-01 06:25:48 +00:00
|
|
|
|
|
|
|
`csslint --errors={{errors,universal-selector,imports}} {{file.css}}`
|
|
|
|
|
2024-02-09 13:55:36 +00:00
|
|
|
- Treat certain rules as warnings:
|
2017-12-01 06:25:48 +00:00
|
|
|
|
|
|
|
`csslint --warnings={{box-sizing,selector-max,floats}} {{file.css}}`
|
|
|
|
|
2024-02-09 13:55:36 +00:00
|
|
|
- Ignore specific rules:
|
2017-12-01 06:25:48 +00:00
|
|
|
|
|
|
|
`csslint --ignore={{ids,rules-count,shorthand}} {{file.css}}`
|