Skip to content
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

Suggestion: tsconfig.*.json should be detected as jsonc #50974

Closed
AviVahl opened this issue Jun 1, 2018 · 2 comments
Closed

Suggestion: tsconfig.*.json should be detected as jsonc #50974

AviVahl opened this issue Jun 1, 2018 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality json JSON support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@AviVahl
Copy link

AviVahl commented Jun 1, 2018

Since the addition of "extends" in tsconfigs, many projects now have tsconfig.base.json with their common configuration.

I personally also saw cases of tsconfig.browser.json, tsconfig.build.json, and tsconfig.publish.json.

VSCode currently detects tsconfig.json as "JSON With Comments" (jsonc). All the examples above, on the other end, are auto detected as regular json, which makes the tsconfig comments appear as errors.

I always configure my local VSCode with:

    "files.associations": {
        "tsconfig.*.json": "jsonc"
    }

And it works as expected. Would be nice, however, if this was the default configuration. :)

@vscodebot vscodebot bot assigned mjbvz Jun 1, 2018
@vscodebot vscodebot bot added the typescript Typescript support issues label Jun 1, 2018
@mjbvz mjbvz assigned aeschli and unassigned mjbvz Jun 1, 2018
@mjbvz mjbvz added the json JSON support issues label Jun 1, 2018
@AviVahl
Copy link
Author

AviVahl commented Jun 3, 2018

It should also be noted that TypeScript's own repo uses a kebab style file:
https://github.com/Microsoft/TypeScript/blob/master/src/tsconfig-base.json

However, they did remove the template comments.

Perhaps tsconfig-*.json (notice the dash) should also be auto-detected as jsonc.

@aeschli aeschli added this to the June 2018 milestone Jun 4, 2018
@aeschli aeschli added feature-request Request for new features or functionality verification-needed Verification of issue is requested labels Jun 6, 2018
@aeschli aeschli closed this as completed in 0814ab4 Jun 6, 2018
@AviVahl
Copy link
Author

AviVahl commented Jun 7, 2018

Yay you. :)

@jrieken jrieken added the verified Verification succeeded label Jun 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality json JSON support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants