-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add jsonc parser
#15831
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
Add jsonc parser
#15831
Conversation
docs/options.md
Outdated
| <!-- TODO[@fisker]: Check this --> | ||
| If this option is set to `preserve`, `singleQuote` to `false` (default value), and `parser` to `json5`, double quotes are always used for strings. This effectively allows using the `json5` parser for “JSON with comments and trailing commas”. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be a breaking change with little gain. Maybe better to keep the logic and just remove this part from the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| createLanguage(linguistLanguages["JSON with Comments"], () => ({ | ||
| parsers: ["jsonc"], | ||
| vscodeLanguageIds: ["jsonc"], | ||
| filenames: [...data.filenames, ".eslintrc"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.eslintrc is not listed in https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats, and .eslintrc.json already in linguistLanguages.
Description
Fixes #15553
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨