stylelint
stylelint copied to clipboard
Add `reportUnscopedDisables` flag
Ref: https://github.com/stylelint/stylelint/pull/2232#discussion_r96887239
Report disables not scoped to one or more rules.
Treated as a similar violation to reportNeedlessDisables.
This flag (reportUnscopedDisables) would trigger a violation for the following source:
/* stylelint-disable */
As no rule(s)/plugin(s) is/are listed.
Hmm, the changelog says that stylelint-disable-reason is deprecated and to consider contributing to this instead, but it seems like they are two different rules. stylelint-disable-reason checks for a separate comment before or after the disable comment, while this checks for 0 rules in the disable comment.
@kmiyashiro Thanks for spotting that. Yes, you're right. reportUnscopedDisables is meant as an alternative to the stylelint-disable-no-empty proposal that got mothballed. I've posted a PR to correct the CHANGELOG.
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.