Stylelint plugin for using postcss-ignore-plugin
without any issues
npm install stylelint stylelint-postcss-ignore --save-dev
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
}
}
/* 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)" */
no-wrong-line-comment
: to throw error whenever the comment/* postcss-ignore-line */
is written overselector
oratRules
i.e not overdeclaration
type (eg 'color:red')