You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

lesshint-color-variable-linter

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Created

Readme

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc