Skip to content

Include *.json in the root files if they are specified as root #34676

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

Merged
merged 1 commit into from
Oct 25, 2019

Conversation

sheetalkamat
Copy link
Member

Fixes #33827

@amcasey
Copy link
Member

amcasey commented Oct 23, 2019

Do we know why they used to be excluded?

@sheetalkamat
Copy link
Member Author

sheetalkamat commented Oct 23, 2019

Do we know why they used to be excluded?

@RyanCavanaugh added it with project references but I didn't know that we excluded them. There is no reason to exclude them as far as I can see...
Also there wasn't test so I am thinking it was unintentional change

@amcasey
Copy link
Member

amcasey commented Oct 23, 2019

@sheetalkamat Do we still want to exclude config files? (Or does that somehow happen upstream?)

@sheetalkamat
Copy link
Member Author

configs are never part of root file names.. (even through external projects as in that case we end up opening configured projects for those configs instead)

Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

Seems reasonable, but it would be nice to hear from @RyanCavanaugh.

@pcowgill
Copy link

Is this fix live on npm yet?

@Bessonov
Copy link

@pcowgill 3.8.0-dev.20191122 on npm fixes it for me.

@FlorianWendelborn
Copy link

To extend on @Bessonov’s fix, for me it was also necessary to force VSCode to use the workspace TypeScript version (duh).

Add this to your .vscode/settings.json:

{
	"typescript.tsdk": "node_modules/typescript/lib"
}

Then, after a reload, VSCode finally understood .json imports again.

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.

TSServer reports TS6307 in composite projects on JSON files included via include pattern
7 participants