stylelint icon indicating copy to clipboard operation
stylelint copied to clipboard

Add `reportUnscopedDisables` flag

Open jeddy3 opened this issue 8 years ago • 7 comments
trafficstars

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.

jeddy3 avatar Jan 26 '17 12:01 jeddy3

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 avatar Feb 24 '17 19:02 kmiyashiro

@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.

jeddy3 avatar Feb 24 '17 22:02 jeddy3

This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.

github-actions[bot] avatar Jan 22 '24 11:01 github-actions[bot]