-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support comments in JSON configuration (aka JSONC) #496
Comments
Add to this that it also crashes when trying to check JSON files with comments:
Files I'm trying to check: |
Thanks for the report. 🙏🏻
Got it. 👌🏻 The current JSON parser is just not ready to handle JSONC. Maybe this could work: NickolaiBeloguzov/jsonc-parser: Parsing JSON with comments like it's our job. Oh wait, it is! I quickly skimmed through these and they don't seem to handle JSONC either: |
Sorry to bump on this. I still haven't found any open-source all-in-one solution like nitpick, yet this issue is preventing us from using it. I haven't seen any activity in a while so I'm wondering if nitpick is still actively being developed, if I should try forking it, or if I should keep looking for an alternative solution (currently considering custom NX generators and CI tasks that check for file changes) |
Hi! It's not abandoned, I will review and interact on pull requests when possible. If you create a PR I will help push it through. |
Problem
If my JSON in
contains_json
contains comments, the parser will fail.Example:
Results in
Possible solution
Support parsing JSON with Comments (aka JSONC)
Note that this is different than #406 . I am not asking for the comments to be kept when using
nitpick fix
, I just want the parser to at least ignore comments and not fail.For more information, see the CONTRIBUTING guide.
The text was updated successfully, but these errors were encountered: