Package Exports
- stylelint-csstree-validator
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stylelint-csstree-validator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stylelint-csstree-validator
CSS syntax validator based on csstree as plugin for stylelint. Currently it's only checking declaration values to match W3C specs and browsers extensions. It would be extended in future to validate other parts of CSS.
Validator is designed to check CSS syntax only. However PostCSS (that used by stylelint as backend) may parse other syntaxes like Less or Sass and can be used for these syntaxes too. In this case validator is limited to check declaration that doesn't contain any CSS extension (e.g. variables).
Install
$ npm install --save-dev stylelint-csstree-validator
Usage
Setup plugin in your stylelint config:
{
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": true
}
}
Options
ignore
Type: Array
or false
Default: false
Defines a list of property names that should be ignored by the validator.
{
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": {
"ignore": ["composes", "foo", "bar"]
}
}
}
In this example, plugin would not test declaration with property name composes
, foo
or bar
. As a result, no warnings for these declarations.
License
MIT