Skip to content

Clarify allowed syntax in tsconfig.json #3386

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 1 commit into
base: v2
Choose a base branch
from

Conversation

grillonbleu
Copy link

It would be helpful to explicitly state the syntax tsconfig.json affords. The most official reference I’ve found about comments being allowed is TypeScript issue 4987 being tagged "fixed". For trailing comments, the best I’ve found is a comment.

Comments are quite valuable in config files and that possibility deserves to be better known. Furthermore this undocumented leniency has tripped up IDEs in the past, validating tsconfig.json as strict JSON.

It would be helpful to explicitly state the syntax tsconfig.json affords. The most official reference I’ve found about comments being allowed is [TypeScript issue 4987](microsoft/TypeScript#4987) being tagged "fixed". For trailing comments, the best I’ve found is [a comment](microsoft/TypeScript#20384 (comment)).

Comments are quite valuable in config files and that possibility deserves to be better known. Furthermore this undocumented leniency has tripped up IDEs in the past, validating `tsconfig.json` as strict JSON.
@grillonbleu
Copy link
Author

@microsoft-github-policy-service agree

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