1.0.31 • Published 11 months ago

@hint/parser-less v1.0.31

Weekly downloads
4,281
License
Apache-2.0
Repository
github
Last release
11 months ago

LESS (@hint/parser-less)

The LESS parser is built on top of PostCSS and postcss-less so hints can analyze LESS files. It emits the same events as @hint/parser-css so existing hints targeting CSS files will work without modification.

This package is installed automatically by webhint:

npm install hint --save-dev

To use it, activate it via the .hintrc configuration file:

{
    "connector": {...},
    "formatters": [...],
    "hints": {
        ...
    },
    "parsers": ["less"],
    ...
}

Note: The recommended way of running webhint is as a devDependency of your project.

Events emitted

This parser emits the following events:

  • parse::start::css of type Event which contains the following information:

    • resource: the resource we are going to parse.
  • parse::end::css of type StyleParse which has the following information:

    • ast: a PostCSS Root object containing the AST. See the PostCSS walk* APIs for help navigating the AST.
    • code: a string containing the raw stylesheet source code.
    • element: an HTMLElement reference if the source was inline in HTML; null otherwise.
    • resource: the parsed resource. If the CSS is in a style tag and not a file, the value will refer to the HTML document containing the stylesheet.

Limitations

This parser is not fault-tolerant (unlike @hint/parser-css) so only well-formed files will be parsed.

1.0.31

11 months ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.19

3 years ago

1.0.20

2 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago