lesshint-color-variable-linter

0.0.1 • Public • Published

Lesshint Color Variable Linter

npm

Example

invalid

.foo {
    color: red;
    background-color: #000000;
    border-color: rgb(0,0,0);
    text-decoration-color: rgba(0,0,0,1);
}

valid

.foo {
    color: @foo-color;
    background-color: @foo-background-color;
    border-color: @foo-border-color;
    text-decoration-color: @foo-decoration-color;
}

Install

$ npm install lesshint-color-variable-linter

Usage

In your lesshint.json configuration add the following:

    "colorAsVariable" : {
        "enabled" : true,
        "severity" : "warning"
    }

When running lesshint:

lesshint src/less/ lib/style.less --linters lesshint-color-variable-linter

Options

  • enabled: Turn on/off the linter rule. Values true or false.
  • severity: Severity levels of the linter. Values error or warning. Default is set to warning.

/lesshint-color-variable-linter/

    Package Sidebar

    Install

    npm i lesshint-color-variable-linter

    Weekly Downloads

    373

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • xtephan