Appearance
disallow eslint-disable comments about specific rules
eslint-disable
This rule warns eslint-disable directive-comments if the comment disable specific rules.
👎 Examples of incorrect code for this rule:
👍 Examples of correct code for this rule:
{ "no-restricted-disable": ["error", ...] }
This rule takes a list of strings, where each string is a glob pattern. For example:
{ "@eslint-community/eslint-comments/no-restricted-disable": [ "error", "no-undef", "*semi*", // rules which includes `semi`. E.g. `semi`, `semi-style`, `no-extra-semi`, ... "react/*" // rules of `eslint-plugin-react` ] }
{ "no-restricted-disable": [ "error", "*", // any rules "!no-console" // but except `no-console`. ] }
@eslint-community/eslint-comments/no-restricted-disable
This rule warns
eslint-disable
directive-comments if the comment disable specific rules.Rule Details
👎 Examples of incorrect code for this rule:
👍 Examples of correct code for this rule:
Options
This rule takes a list of strings, where each string is a glob pattern. For example: