feat: leave out what any check found, not TypeScript's alone - #341
Merged
Merged
Conversation
alexander-akait
force-pushed
the
feat/ignore-what-a-check-found
branch
from
September 13, 2026 23:38
c5c818f to
219bfde
Compare
`ignoreDiagnostics` was the typescript check's and took the codes `tsc` prints. It is a shared option now, and takes a rule or a code as a string, a match of a file, a code and a severity together, a list of any of those, or a function over each thing a check found. A number still means what it did, so what was written before still reads the same. The name is the one it already had here and the one `ts-loader` uses; the match is the shape `fork-ts-checker-webpack-plugin` matches an issue by. `ignore` would have been the shorter name and is ESLint's own option, so it is not this one. A check answers for its own results through `filterResults`, which every check here implements and one shipped outside this package may. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
alexander-akait
force-pushed
the
feat/ignore-what-a-check-found
branch
from
September 14, 2026 03:46
219bfde to
bfa63ec
Compare
This was referenced Sep 14, 2026
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.
Summary
ignoreDiagnosticswas thetypescriptcheck's and took the codestscprints. It is a shared option now, and takes a rule or code as a string, a match of a file, a code and a severity together, a list of any of those, or a function over each thing a check found. A number still means the TypeScript code it meant before, so what was written already reads the same.Nothing invented, as asked. The name is the one this plugin already had and the one
ts-loaderuses; the match is the shapefork-ts-checker-webpack-pluginmatches an issue by (severity,code, and a glob on the file relative to the context — the same semantics, picomatch rather than minimatch).vite-plugin-checker@0.14.5has nothing of the kind: its only filter isdev.logLevel: ('error' | 'warning')[]per checker, which isreportAshere and already covers severity, so it is not duplicated. ESLint 9.19's ownruleFilter({ ruleId, severity })is the same idea one tool down.ignorewould have been the shorter name — and it is ESLint's own option. Trying it first turned every ESLint test red, becauseignore: falseis passed through to theESLintclass; the schema rejected it. That is the collision the name avoids.A check answers for its own results through a new optional
filterResults, so what is left out is left out of everything the check reports — theoutputReportand the counts a formatter prints included. The two CLI checks share one implementation, and a check shipped outside this package reports its results unfiltered until it implements the hook.Rebased onto
mainnow that #340 has landed, so this is one commit and the last of the stack.What kind of change does this PR introduce?
feat
Did you add tests for your changes?
Yes —
test/ignore-diagnostics.test.js: a rule as a string, a list, a severity, a file glob with a code, a function of one's own, a check that is not ESLint reading the same option, something reported of no file being kept, a check with nofilterResultsreporting everything, and the counts a formatter prints being the ones left. Plus a case each intest/oxlint/oxlint.test.jsandtest/biome/biome.test.js, and the three TypeScript cases from #335 unchanged, which is what says the numeric form still means what it did.Does this PR introduce a breaking change?
No.
ignoreDiagnostics: number[]in atypescriptentry keeps working, and the option now also reads at the top level, where it applies to every check.If relevant, what needs to be documented once your changes are merged or what have you already documented?
README.md: the option moved from the TypeScript check to the shared options and is written out there, with thefork-ts-checker-webpack-pluginmigration row forissue.include/excludeupdated to point at it.Use of AI
Claude Code read
vite-plugin-checker@0.14.5andfork-ts-checker-webpack-plugin@9.1.0before choosing the shape, wrote the change, the tests and this description, and ran the suite against ESLint 9 as well as 10; I reviewed all of it.🤖 Generated with Claude Code
https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
Generated by Claude Code