0.1.0 • Published 4 years ago

stylelint-postcss-ignore v0.1.0

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

stylelint-postcss-ignore

CI tests

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

Install

npm install stylelint stylelint-postcss-ignore  --save-dev

Usage

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

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

Detail

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

You will get errors as

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

Rules

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