Repository navigation
fix(lint): keep the message chains of type errors and tsconfig errors - #1006
Merged
camc314 merged 2 commits intoNov 17, 2026
Merged
Conversation
The help of a `tsconfig-error` report had only the first line of the
diagnostic. For TS18099, that line is "The content mapper '{0}' could
not be initialized." The reason is in the message chain: for example,
the process exited before it responded to `initialize`, or it did not
respond within 5 seconds. tsc prints the chain, but tsrs-lint dropped
it. So a mapper process that exited looked like a mapper that timed
out.
Now the help has the message chain, flattened as tsc prints it and as
the language server converts it. A diagnostic without a chain has the
same help as before.
AI assistance: written with Claude Code.
A type error such as TS2322 has a message chain: the lines that tell why the types are not assignable. `tsc` and the language server show each message of the chain on its own line, but tsrs-lint reported only the first line, the same as tsgolint. For example, the description `No overload matches this call.` lost all of its reasons. Now the description of a type error has the message chain, as `tsc` prints it. A message without a chain does not change, except for a type error in code that a content mapper generated: that type error now gets the note that `tsc` prints for such code. The help of a `tsconfig-error` report uses the same function, so its text does not change. AI assistance: written with Claude Code.
Contributor
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
magurotuna
marked this pull request as ready for review
November 17, 2026 05:37
camc314
approved these changes
Nov 17, 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.
tsrs-lint sent only the first line of a TypeScript diagnostic to Oxlint, the same as tsgolint. The message chain, the lines that tell the reason, was lost. Now a type error has the message chain in its description, and a
tsconfig-errorreport has the message chain in its help, after the TypeScript message. Both match whattscprints. A diagnostic without a chain does not change, except for a type error in code that a content mapper generated: that type error now gets the note thattscprints for such code (This location is in virtual code produced by the content mapper ...).oxlint -A all --type-aware --type-checkonexport const f: (a: number) => void = (a: string) => {};:The same command with
"types": ["missing-types-pkg"]in the tsconfig, where the package does not exist:AI assistance: written with Claude Code.