Repository navigation
fix(eslint): honor unused directive reporting in flat config - #822
Closed
charan-rathore wants to merge 1 commit into
Closed
charan-rathore wants to merge 1 commit into
charan-rathore wants to merge 1 commit into
Conversation
✅ Deploy Preview for vite-plugin-checker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
Author
|
Closing for now since nothing has moved here. Happy to pick it back up if a maintainer wants it. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The ESLint checker accepts
--report-unused-disable-directives, but its flat-config option translator drops that flag. If a project's flat config disables unused-directive reporting, supplying the flag inlintCommandstill produces no diagnostics in dev mode.Translate the flag into
overrideConfig.linterOptions.reportUnusedDisableDirectives. An explicit true sets error severity; false disables reporting. When the flag is absent, keep the project's setting unchanged.The regression test starts the built ESLint worker with a real flat config and an unused
eslint-disablecomment. It disables reporting in the config, enables it through the CLI flag, and expects an error diagnostic. That test fails before this fix and passes after it. A translator control checks the absent, false, and true cases.Validation: all 43 unit tests, package typecheck, production build, and changed-file Biome checks pass. Repository-wide lint has an existing formatting error in untouched
utils.spec.ts.