🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

lesshint-color-variable-linter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lesshint-color-variable-linter

Linter for lesshint that enforces colors to be declared as variables

0.0.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

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.

Keywords

lesshint

FAQs

Package last updated on 30 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts