Skip to content

fix(eslint): honor unused directive reporting in flat config - #822

Closed
charan-rathore wants to merge 1 commit into
fi3ework:mainfrom
charan-rathore:fix/eslint-unused-disable-flag
Closed

charan-rathore wants to merge 1 commit into
fi3ework:mainfrom
charan-rathore:fix/eslint-unused-disable-flag

Conversation

@charan-rathore

Copy link
Copy Markdown

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 in lintCommand still 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-disable comment. 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.

@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vite-plugin-checker ready!

Name Link
🔨 Latest commit a151397
🔍 Latest deploy log https://app.netlify.com/projects/vite-plugin-checker/deploys/6abddce72dc60600089d5812
😎 Deploy Preview https://deploy-preview-822--vite-plugin-checker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vite-plugin-checker@822

commit: a151397

@charan-rathore

Copy link
Copy Markdown
Author

Closing for now since nothing has moved here. Happy to pick it back up if a maintainer wants it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant