You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default is `null`. The plugin implementations that ESLint uses for the `plugins` setting of your configuration. This is a map-like object. Those keys are plugin IDs and each value is implementation.
Default is `null`. The severity to report unused eslint-disable directives. If this option is a severity, it overrides the `reportUnusedDisableDirectives` setting in your configurations.
155
+
Default is `null`. The severity to report unused eslint-disable and eslint-enable directives. If this option is a severity, it overrides the `reportUnusedDisableDirectives` setting in your configurations.
Default is `null`. The path to a directory where plugins should be resolved from. If `null` is present, ESLint loads plugins from the location of the configuration file that contains the plugin setting. If a path is present, ESLint loads all plugins from there.
158
158
*`options.rulePaths` (`string[]`)<br>
@@ -537,7 +537,7 @@ The most important method on `Linter` is `verify()`, which initiates linting of
537
537
*`filterCodeBlock` - (optional) A function that decides which code blocks the linter should adopt. The function receives two arguments. The first argument is the virtual filename of a code block. The second argument is the text of the code block. If the function returned `true` then the linter adopts the code block. If the function was omitted, the linter adopts only `*.js` code blocks. If you provided a `filterCodeBlock` function, it overrides this default behavior, so the linter doesn't adopt `*.js` code blocks automatically.
538
538
*`disableFixes` - (optional) when set to `true`, the linter doesn't make either the `fix` or `suggestions` property of the lint result.
539
539
*`allowInlineConfig` - (optional) set to `false` to disable inline comments from changing ESLint rules.
540
-
*`reportUnusedDisableDirectives` - (optional) when set to `true`, adds reported errors for unused `eslint-disable` directives when no problems would be reported in the disabled area anyway.
540
+
*`reportUnusedDisableDirectives` - (optional) when set to `true`, adds reported errors for unused `eslint-disable`and `eslint-enable`directives when no problems would be reported in the disabled area anyway.
541
541
542
542
If the third argument is a string, it is interpreted as the `filename`.
Copy file name to clipboardExpand all lines: docs/src/use/command-line-interface.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ Output:
97
97
98
98
Inline configuration comments:
99
99
--no-inline-config Prevent comments from changing config or rules
100
-
--report-unused-disable-directives Adds reported errors for unused eslint-disable directives
100
+
--report-unused-disable-directives Adds reported errors for unused eslint-disable and eslint-enable directives
101
101
102
102
Caching:
103
103
--cache Only check changed files - default: false
@@ -577,7 +577,7 @@ This option causes ESLint to report directive comments like `// eslint-disable-l
577
577
578
578
***Argument Type**: No argument.
579
579
580
-
This can be useful to prevent future errors from unexpectedly being suppressed, by cleaning up old `eslint-disable` comments which are no longer applicable.
580
+
This can be useful to prevent future errors from unexpectedly being suppressed, by cleaning up old `eslint-disable`and `eslint-enable`comments which are no longer applicable.
581
581
582
582
::: warning
583
583
When using this option, it is possible that new errors start being reported whenever ESLint or custom rules are upgraded.
Copy file name to clipboardExpand all lines: docs/src/use/configure/configuration-files-new.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Each configuration object contains all of the information ESLint needs to execut
76
76
*`parserOptions` - An object specifying additional options that are passed directly to the `parse()` or `parseForESLint()` method on the parser. The available options are parser-dependent.
77
77
*`linterOptions` - An object containing settings related to the linting process.
78
78
*`noInlineConfig` - A Boolean value indicating if inline configuration is allowed.
79
-
*`reportUnusedDisableDirectives` - A Boolean value indicating if unused disable directives should be tracked and reported.
79
+
*`reportUnusedDisableDirectives` - A Boolean value indicating if unused disable and enable directives should be tracked and reported.
80
80
*`processor` - Either an object containing `preprocess()` and `postprocess()` methods or a string indicating the name of a processor inside of a plugin (i.e., `"pluginName/processorName"`).
81
81
*`plugins` - An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
82
82
*`rules` - An object containing the configured rules. When `files` or `ignores` are specified, these rule configurations are only available to the matching files.
@@ -244,7 +244,7 @@ export default [
244
244
245
245
#### Reporting unused disable directives
246
246
247
-
Disable directives such as `/*eslint-disable*/` and `/*eslint-disable-next-line*/` are used to disable ESLint rules around certain portions of code. As code changes, it's possible for these directives to no longer be needed because the code has changed in such a way that the rule is no longer triggered. You can enable reporting of these unused disable directives by setting the `reportUnusedDisableDirectives` option to `true`, as in this example:
247
+
Disable and enable directives such as `/*eslint-disable*/`, `/*eslint-enable*/` and `/*eslint-disable-next-line*/` are used to disable ESLint rules around certain portions of code. As code changes, it's possible for these directives to no longer be needed because the code has changed in such a way that the rule is no longer triggered. You can enable reporting of these unused disable directives by setting the `reportUnusedDisableDirectives` option to `true`, as in this example:
248
248
249
249
```js
250
250
exportdefault [
@@ -257,7 +257,7 @@ export default [
257
257
];
258
258
```
259
259
260
-
By default, unused disable directives are reported as warnings. You can change this setting using the `--report-unused-disable-directives` command line option.
260
+
By default, unused disable and enable directives are reported as warnings. You can change this setting using the `--report-unused-disable-directives` command line option.
0 commit comments