-
Notifications
You must be signed in to change notification settings - Fork 50
Support for JSON commentsΒ #83
Description
Summary
Support a JSON with comments mode so that users can opt not to get errors when comments are used within JSON files (or ideally, within specific JSON file names, like .eslintrc and .eslintrc.json).
Motivation
It is annoying to see linting errors when viewing such a file, and it deters one from adding helpful comments to ESLint RC files (ESLint config files support this format: https://eslint.org/docs/user-guide/configuring/configuration-files#comments-in-configuration-files ).
Describe alternatives you've considered
The existing language-json-comments package does not work for me.
While I understand JSON proper does not support comments, I think it makes sense for this existing package to implement since it appears that often the "json" extension is still used and Visual Studio treats this similarly as another mode
Additional context
There is a spec for this and several parsers:
- jsonc-parser by Microsoft
- comment-json
- json-comments
- json-comment-parser
- one-json