SASS parser is built on top of PostCSS so hints can
SCSS files. It emits the same events as
@hint/parser-css so existing hints targeting
CSS files will work
This package is installed automatically by webhint:
npm install hint --save-dev
To use it, activate it via the
.hintrc configuration file:
Note: The recommended way of running webhint is as a
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.
This parser is not fault-tolerant (unlike
@hint/parser-css) so only
well-formed files will be parsed.