Enhancement: Should we use json5 to parse .eslintrc?
See original GitHub issue- comments, trailing commas allowed
- single/quotes allowed (this one is both an advantage and a drawback, more an advantage because I guess
.eslintrc
can be linted as well to force consistencies in quotes - adopted by others libs, like Babel’s
.babelrc
PR #9935
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:9 (8 by maintainers)
Top Results From Across the Web
JSON5 – JSON for Humans | JSON5
This JavaScript library is a reference implementation for JSON5 parsing and serialization, and is directly used in many of the popular projects mentioned ......
Read more >User Guide | eslint-plugin-jsonc
This plugin will parse .json , .jsonc and .json5 by default using the configuration provided by the plugin (unless you already have a...
Read more >Ignore the haters, and other lessons learned from creating ...
I enjoy using json5. I solves a real problem imo.. Regarding the criticism, I get the same bad energy when people get a...
Read more >json5 | Yarn - Package Manager
JSON5 is an extension to the popular JSON file format that aims to be easier to ... It is not intended to be...
Read more >ESLint: TypeError: this.libOptions.parse is not a function
If you are looking for a temporary fix, you can "pin" ESLint version to 8.22.0 in your package.json set it to: "eslint": "8.22.0"....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A *.js file means having to prepend
module.exports =
, correct? This likely breaks compatibility with code/text editors. I think JSON5 makes more sense.Huh, I didn’t realize that. I sort of wish we weren’t doing that – I don’t think people should call a file
.json
if it is not actually valid JSON. In that case, we should probably come up with a better fix for https://github.com/eslint/eslint/pull/9226, since it affects a non-deprecated config file format.Along similar lines, I’m mildly opposed to making this change because people can use YAML if they want a more strict config file format.