-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[JSON]: make parsing lenient by default and display better errors #14203
Comments
Nx already uses Take a look at: |
Oh thanks! nx/packages/nx/src/utils/json.ts Lines 40 to 58 in e8b2731
Sorry I stopped parsing the code at Because we already use
|
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Description
Nx uses
JSON.parse
It has several pain points:
tsconfig.json
,Error in JSON at position 1234
It should be easy to switch parser.
Typescript uses https://www.npmjs.com/package/jsonc-parser (as a devDependency)
https://www.npmjs.com/package/parse-json seems to have nice error messages.
The hard part for this issue is probably to pick the right parser...
The text was updated successfully, but these errors were encountered: