Generate tsconfig#5519
Closed
ianschmitz wants to merge 3 commits intofacebook:masterfrom
Closed
Conversation
3 tasks
brunolemos
reviewed
Oct 22, 2018
|
|
||
| function verifyTypeScriptSetup() { | ||
| if (!fs.existsSync(paths.appTsConfig)) { | ||
| if (!paths.appIndexJs.endsWith('.ts') || !paths.appIndexJs.endsWith('.tsx')) { |
Contributor
There was a problem hiding this comment.
Shouldn't this be &&?
Also just fyi that the index file is not required to be .ts or .tsx on typescript projects.
Contributor
|
Most of these changes already exist in one form or another on |
Contributor
|
Thanks for your work @ianschmitz, I think you both worked on the same things almost together so this happened. That sucks but future contributions are still very welcome! |
Contributor
|
Yeah, GH was glitching out so no one could see ongoing contributions. 😅 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #5508.
This PR automatically generates a
tsconfig.jsonin the root of the project if it doesn't exist, when we determine that TypeScript is enabled on the project (whensrc/index.tsorsrc/index.tsxexists). We also validate the config to ensure thatisolatedModulesis set totrue.TODO:
loader.d.tsts.parseJsonConfigFileContent()