Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support custom severity when reporting unused disable directives (
#17212) * feat: Support custom severity when reporting unused disable directives * fix test * remove change to conf/default-cli-options.js * improve schema * wip * remove reportUnusedDisableDirectives from processOptions() in favor of overrideConfig * revert changes to lib/eslint/eslint.js and fix more tests * remove old type * more tests * fix comment for ParsedCLIOptions * remove unnecessary exception * revert comment * remove number severity * fix translateOptions and tests * revert comment * Update lib/cli.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/options.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/src/use/command-line-interface.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/cli-engine/cli-engine.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/cli-engine/cli-engine.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/shared/types.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/shared/types.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * add arg type to doc * mention enable * warn with old option * remove old comment * revert change to tests/lib/eslint/eslint.js * add test for removed option * revert copy change * switch several tests from boolean for reportUnusedDisableDirectives to string * improve tests * use reportUnusedDisableDirectives: error in eslint-config-eslint * support severity numbers * refactor * revert newline change * refactor and fix tests * refactor * cleanup * cleanup * use normalizeSeverityToString in another place * tweak * attempt to avoid test pollution * tweak test name * remove boolean handling from normalizeSeverityToString * Update docs/src/use/command-line-interface.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/src/use/command-line-interface.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/src/use/command-line-interface.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * cleanup * normalize flat config reportUnusedDisableDirectives to number * Update lib/options.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/cli.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/cli.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * remove unused reportUnusedDisableDirectives property * run CLI tests for both flat and eslintrc * Update tests/lib/eslint/flat-eslint.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update tests/lib/eslint/flat-eslint.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/src/use/configure/rules.md Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * address pr feedback --------- Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
- Loading branch information
1 parent
31a7e3f
commit 0dd9704
Showing
18 changed files
with
509 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.