# eslint-comments/no-aggregating-enable

disallow a eslint-enable comment for multiple eslint-disable comments

  • 🌟 The "extends": "plugin:eslint-comments/recommended" property in a configuration file enables this rule.

eslint-enable directive-comments can enable rules which are disabled by different eslint-disable directive-comments. It can enable a rule unintentionally.

/*eslint-disable no-undef */
f()
/*eslint-disable no-var */
var a
/*eslint-enable */ "※ Enables both no-undef and no-var."

This rule warns eslint-enable directive-comments which enable rules for multiple eslint-disable directive-comments.

# Rule Details

👎 Examples of incorrect code for this rule:

/*eslint eslint-comments/no-aggregating-enable: error*/ /*eslint-disable no-undef */ f() /*eslint-disable no-var */ var a /*eslint-enable */
Now loading...
/*eslint eslint-comments/no-aggregating-enable: error*/ /*eslint-disable no-undef */ f() /*eslint-disable no-var */ var a /*eslint-enable no-undef, no-var */
Now loading...

👍 Examples of correct code for this rule:

/*eslint eslint-comments/no-aggregating-enable: error*/ /*eslint-disable no-undef */ f() /*eslint-disable no-var */ var a /*eslint-enable no-var */ /*eslint-enable no-undef */
Now loading...