PostCSS stylelint cannot set comment-no-empty?
In .stylelintrc.json I have:
{
"extends": "stylelint-config-recommended-scss",
}
When I run this, I get an Unexpected empty comment error that I want disabled.
However, stylelint-config-recommended-scss.js already has this rule disabled:
rules: {
'annotation-no-unknown': null,
'at-rule-no-unknown': null,
'comment-no-empty': null,
}
And adding it to .stylelintrc.json doesn't work either.
{
"extends": "stylelint-config-recommended-scss",
"rules": {
"comment-no-empty": null
}
}
Am I missing something? Thanks :)
The
stylelint-config-recommended-scssconfig replaces the built-incomment-no-emptyrule with its ownscss/comment-no-emptyone.The
scss/comment-no-emptycan detect both//and/* */empty comments.To disable the rule, you can turn it off in your config:
Note that the rule is prefixed with
scss, the name of the SCSS plugin.(In your config, you're trying to turn off the already turned-off built-in rule.)