Skip to content

feat: say which kinds of typescript diagnostic to report - #340

Merged
alexander-akait merged 1 commit into
mainfrom
feat/typescript-diagnostic-options
Sep 14, 2026
Merged

alexander-akait merged 1 commit into
mainfrom
feat/typescript-diagnostic-options

Conversation

@alexander-akait

@alexander-akait alexander-akait commented Sep 13, 2026

Copy link
Copy Markdown
Member

Summary

ignoreDiagnostics drops what a program answered; diagnosticOptions asks it for less, so a check that only wants syntax errors does not pay for the type checking it then throws away. It takes syntactic, semantic, declaration and global, and every kind is reported unless you turn one off.

What the tsconfig.json itself is wrong about is reported whatever is turned off — with the config file misread, nothing below it would be answering the right question — and build reports the whole of what it finds either way, since a solution is built rather than asked kind by kind.

Checked against the ecosystem first, as asked. fork-ts-checker-webpack-plugin is the only other plugin with this, so the option is spelled exactly as it spells it; its default is semantic alone, ours is everything, which is the behaviour this repo already had. vite-plugin-checker has nothing of the sort: its only filter is dev.logLevel: ('error' | 'warning')[] per checker, which is reportAs here and already shared across every check. Nothing new was invented.

Rebased onto main now that #339 has landed, so this is one commit again. #341 sits on top of it.

What kind of change does this PR introduce?

feat

Did you add tests for your changes?

Yes — test/typescript/kinds.test.js over a fixture holding one syntax error and one type error: every kind by default, each of the two turned off on its own, nothing reported with all four off, and a config file's own error reported even then.

Does this PR introduce a breaking change?

No — a new option, and nothing is turned off by default.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Documented in README.md under the TypeScript check, and the fork-ts-checker-webpack-plugin migration row updated.

Use of AI

Claude Code read vite-plugin-checker@0.14.5 and fork-ts-checker-webpack-plugin@9.1.0 for the option's shape, wrote the change, the tests and this description; I reviewed all of it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy

`ignoreDiagnostics` drops what a program answered; `diagnosticOptions`
asks it for less, so a check that only wants syntax errors does not pay
for the type checking it then throws away. Every kind is reported unless
one is turned off, which is the default `fork-ts-checker-webpack-plugin`
spells the same way with `semantic` alone.

What the config file itself is wrong about is reported whatever is turned
off: with the config file misread, nothing below it would be answering
the right question.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
@alexander-akait
alexander-akait force-pushed the feat/typescript-diagnostic-options branch from 43024b6 to 2b6e54f Compare September 13, 2026 23:37
@alexander-akait
alexander-akait merged commit 0f61537 into main Sep 14, 2026
13 checks passed
@alexander-akait
alexander-akait deleted the feat/typescript-diagnostic-options branch September 14, 2026 03:43
This was referenced Sep 14, 2026
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