@hint/parser-css3.0.1 • Public • Published
CSS parser is built on top of PostCSS so hints can
To use it you will have to install it via
npm install @hint/parser-css
Note: You can make
npm install it as a
devDependency using the
--save-dev parameter, or to install it globally, you can use the
-g parameter. For other options see
And then activate it via the
.hintrc configuration file:
parser emits the following events:
Eventwhich contains the following information:
resource: the resource we are going to parse.
StyleParsewhich has the following information:
ast: a PostCSS
Rootobject containing the AST. See the PostCSS
walk*APIs for help navigating the AST.
code: a string containing the raw stylesheet source code.
HTMLElementreference if the source was inline in HTML;
resource: the parsed resource. If the CSS is in a
style tagand not a file, the value will refer to the HTML document containing the stylesheet.