stylelint-postcss-ignore

v0.1.0
stylelint plugin for cssnano-ignore-plugin
stylelint stylelint-plugin cssnano

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')
npm i stylelint-postcss-ignore

Metadata

  • MIT
  • Whatever
  • anikethsaha
  • released 2/19/2020

Downloads

Maintainers