2020-04-15 18:00:56 +02:00
|
|
|
# csslint
|
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
> Linter dla kodu CSS.
|
|
|
|
> Więcej informacji: <https://github.com/CSSLint/csslint/wiki/Command-line-interface>.
|
2020-04-15 18:00:56 +02:00
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
- Lintowanie pojedynczego pliku CSS:
|
2020-04-15 18:00:56 +02:00
|
|
|
|
|
|
|
`csslint {{file.css}}`
|
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
- Lintowanie wiele plików CSS:
|
2020-04-15 18:00:56 +02:00
|
|
|
|
|
|
|
`csslint {{file1.css}} {{file2.css}} {{file3.css}}`
|
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
- Wymień wszystkie możliwe reguły stylu:
|
2020-04-15 18:00:56 +02:00
|
|
|
|
|
|
|
`csslint --list-rules`
|
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
- Określ pewne reguły jako błędy (które powodują niezerowy kod wyjścia):
|
2020-04-15 18:00:56 +02:00
|
|
|
|
|
|
|
`csslint --errors={{errors,universal-selector,imports}} {{file.css}}`
|
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
- Określ pewne reguły jako ostrzeżenia:
|
2020-04-15 18:00:56 +02:00
|
|
|
|
|
|
|
`csslint --warnings={{box-sizing,selector-max,floats}} {{file.css}}`
|
|
|
|
|
2020-04-15 19:16:45 +02:00
|
|
|
- Określ pewne reguły, które będą całkowicie ignorowane:
|
2020-04-15 18:00:56 +02:00
|
|
|
|
|
|
|
`csslint --ignore={{ids,rules-count,shorthand}} {{file.css}}`
|