Skip to content

Port verifyCompilerOptions, error on things removed from this repo #1381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Jul 10, 2025

This ports most of verifyCompilerOptions, along with new checks that complain about baseUrl and outFile. baseUrl has a "fancy" error:

~/work/TypeScript-go/built/local/tsgo
tsconfig.json:4:5 - error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
  Use '"paths": {"*": "./src/*"}' instead.

4     "baseUrl": "./src",
      ~~~~~~~~~

Found 1 error in tsconfig.json:4

It also removes all of the options previously deprecated in 5.0 and "removed" in 5.5. Now they are just unsupported options, with no references in the code.

This is not complete; there is still code missing to put paths errors on the paths themselves, along with some errors commented out as they are broken by our remapping of node10 and so on to bundler.

Probably easiest to view this PR with filters: https://github.com/microsoft/typescript-go/pull/1381/files?file-filters%5B%5D=.diff&file-filters%5B%5D=.go

@Copilot Copilot AI review requested due to automatic review settings July 10, 2025 02:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates compiler test baselines to reflect the new TS5102 errors for options removed from the repo (like outFile, baseUrl, etc.). It replaces older error messages and <no content> placeholders across various *.errors.txt, *.diff, and sourcemap baseline files.

  • Replace old error codes and messages with error TS5102: Option '<option>' has been removed...
  • Remove <no content> markers and align baseline structure consistently
  • Update numerous sourcemap and .js.map.diff baselines to match the new concatenation logic

Reviewed Changes

Copilot reviewed 290 out of 464 changed files in this pull request and generated no comments.

File Description
testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNames.errors.txt Updated baseline to TS5102 for removed outFile option
testdata/baselines/reference/submodule/compiler/requireOfJsonFile_PathMapping.errors.txt Added TS5102 for removed baseUrl with replacement suggestion
testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff Cleaned up <no content> placeholder and updated to TS5102 removal error
Comments suppressed due to low confidence (1)

testdata/baselines/reference/submodule/compiler/outModuleConcatUnspecifiedModuleKindDeclarationOnly.errors.txt.diff:12

  • There is an extra leading space before ==== a.ts, which is inconsistent with other baseline diffs. Please remove the leading space to align with the existing format.
 ==== a.ts (0 errors) ====

@JakobJingleheimer
Copy link

Nice! I might remove the Please remove it from your configuration. from the message; IMO it just adds words.

This is nicely succinct and the instruction is clear.

tsconfig.json:4:5 - error TS5102: Option 'baseUrl' has been removed. Use '"paths": {"*": "./src/*"}' instead.

@jakebailey
Copy link
Member Author

This is the format we've previously used for deprecations; I could do what you suggest but I'd have to create custom diagnostics not in the repo (which is fine, but sort of weird).

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.

2 participants