-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Allow JSON with comments in jsconfig.json #7426
Comments
https://www.npmjs.com/package/json5 seems to be quite popular. Both |
@miraage, I personally feel that adding a dependency to read JSONC files would be a poorer solution than adding TS as a dependency... adding TS actually gives us some other benefits, like potentially pinning TS versions (so that they align with the linting configs, etc). |
@mrmckeb, I would like to pick this up. |
Great, thanks @lianapache! You should take a look at how |
@mrmckeb, Sure 👍 Thanks for the tip! |
@mrmckeb we can pin TS version via react-dev-utils in that case, like cross-spawn and chalk. |
Weldon guys |
@mrmckeb What if we parse json file as string and remove all comments? |
@esvyridov if you'd like to pick this up and give that a go, let me know. |
@mrmckeb sure, I'll take this 👍 |
@mrmckeb I think I would try to implement the second path. The plan is:
|
@esvyridov, what if we did this?
|
Is your proposal related to a problem?
This is a follow-on from #7248. Right now, we don't support JSONC (JSON with comments) in
jsconfig.json
files.Describe the solution you'd like
After a discussion with @iansu, we see two paths:
react-scripts
.typescript
as a dependency ofreact-scripts
, we would install it to the user's project if they are using ajsconfig.json
file and don't havetypescript
installed.Discussion is welcome.
If you're interested in picking this up, please let us know.
The text was updated successfully, but these errors were encountered: