2.5.6 • Published 5 years ago

@brandonkal/stylelint-csstree-validator v2.5.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

NPM version Build Status

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

Fork

This fork allows element units (ew|eh|emin|emax). It is meant to be used with @brandonkal/postcss-element-units.

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

2.5.6

5 years ago

2.5.5

5 years ago

2.5.4

5 years ago

2.5.3

5 years ago

2.5.2

5 years ago

1.5.2

5 years ago