anikethsaha / stylelint-postcss-ignore

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

Home Page:https://www.npmjs.com/package/stylelint-postcss-ignore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stylelint-postcss-ignore

CI tests

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

Donation

Buy Me A Coffee

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

/* postcss-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')

About

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

https://www.npmjs.com/package/stylelint-postcss-ignore


Languages

Language:JavaScript 100.0%