0.1.0 • Published 4 years ago

stylelint-cssnano-ignore v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

stylelint-cssnano-ignore

CI tests

Stylelint plugin for using cssnano-ignore-plugin without any issues

Install

npm install stylelint stylelint-cssnano-ignore  --save-dev

Usage

Add this config to your .stylelintrc or stylelint config inside package.json:

{
  "plugins": ["stylelint-cssnano-ignore"],
  "rules": {
        "cssnano-ignore-plugin/no-wrong-line-comment": true,
   },
}

Detail

  /* cssnano-ignore-line */
ul li{ color : red }

You will get errors as

/* cssnano-ignore-line */
/**           ^^^^^^
 *"cssnano-ignore-line comment written for wrong node type 'rule' i.e 'ul li' at line 2:3 (cssnano-ignore-plugin/no-wrong-line-comment)" */

Rules

  • no-wrong-line-comment : to throw error whenever the comment /* cssnano-ignore-line */ is written over selector or atRules i.e not over declaration type (eg 'color:red')