Warn about unknown diagnostic rule names after config parsing - #756
Merged
Merged
Conversation
TypeScript 7.0.2 requires an extra file extensions argument that the newer compiler removed. Match the existing source-file parser compatibility wrappers and use the compiler's ordered JSON representation in the regression test.
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.
Unknown names in
diagnosticSeverityare currently accepted silently. Report them as tsconfig warnings after compiler options have been fully parsed and merged, covering the top-level severity map and overrides.For example, this plugin configuration now reports warning TS377134:
Unknown Effect diagnostic rule 'floatingEfect' in 'diagnosticSeverity'. effect(unknownRuleName):{ "name": "@effect/language-service", "diagnosticSeverity": { "floatingEfect": "error" } }Configure the diagnostic through
diagnosticSeverity.unknownRuleName; it defaults towarning, supportserrorandoff, and honors inherited settings anddiagnostics: false. Warnings follow the existing Effect CLI exit-code policy.Validation reads the resolved Effect options through one post-merge callback, with matching patches for both compiler providers. Source syntax is used only for diagnostic placement: local keys are underlined, while inherited keys without local syntax and JSON-only configurations produce locationless diagnostics, following the content-mapper pattern. Expose the existing generic
ForEachTsConfigPropArraythrough a shared forwarding shim.Tests cover local and override keys, known diagnostic names, severity controls, chained and multiple
extends, existing compiler options, JSON-only parsing, and project references sharing a cached base configuration. Includes a minor changeset.Validation passed:
pnpm setup-repo,pnpm lint(zero issues; deadcode clean),pnpm check, and the full test suite on both TypeScript 7.0.2 and next (Go and shim-generator tests; all 128 CLI tests on each provider). Also checked-pand repeated--buildruns with warning, error, and disabled configurations.The JSON config parser has matching compatibility shims for both providers: 7.0.2 accepts the extra file extensions argument, while the newer compiler omits it. The JSON-only regression test uses the compiler's ordered-map representation, which both versions support.
Supersedes the implementation in #748 with the single post-merge validation approach. Spelling suggestions are not included; inherited declarations use the locationless fallback described above.
Closes #747
Closes #748