chore: slight tsconfig adjustments; add comments on each options#944
Merged
haoqunjiang merged 2 commits intovuejs:mainfrom Feb 28, 2026
Merged
chore: slight tsconfig adjustments; add comments on each options#944haoqunjiang merged 2 commits intovuejs:mainfrom
haoqunjiang merged 2 commits intovuejs:mainfrom
Conversation
Notable changes: - `compilerOptions.module` is changed from `ESNext` to `preserve` in `tsconfig.node.json` because it better reflects the reality of the runtimes and bundlers. - Explicitly set `noUncheckedIndexAccess` to `true` in the user project because it could result in false positives. I plan to revert the base `@vue/tsconfig` change so that old projects can upgrade. But new projects should turn that option on as recommended by `tsc --init`. More discussions at vuejs/tsconfig#38 (comment) - Previously the `tsconfig.*.json` files are in pure JSON format. After this change, they are JSONC files. I believe most tools in the TypeScript ecosystem handles that well. But not GitHub. I'm not sure if I should add a `.gitattributes` file in the root directory to fix the syntax highlighting as in https://github.com/vuejs/tsconfig/blob/main/.gitattributes
Member
Author
|
It partially addresses #265, but it's still not comprehensive documentation yet. |
cexbrayat
approved these changes
Feb 28, 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.
Notable changes:
compilerOptions.moduleis changed fromESNexttopreserveintsconfig.node.jsonbecause it better reflects the reality of the runtimes and bundlers.noUncheckedIndexAccesstotruein the user project because it could result in false positives. I plan to revert the base@vue/tsconfigchange so that old projects can upgrade. But new projects should turn that option on as recommended bytsc --init. More discussions at When using the array type, is the type inference incorrect? tsconfig#38 (comment)tsconfig.*.jsonfiles were in pure JSON format. After this change, they are JSONC files. I believe most tools in the TypeScript ecosystem can handle that well. GitHub's syntax highlighting can be slightly improved (turn the comments into grey instead of red) if we provide a.gitattributefile like in https://github.com/vuejs/tsconfig/blob/main/.gitattributes, but I'm not sure if that's really necessary…