question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
stevenvachoncommented, May 1, 2018

A *.js file means having to prepend module.exports = , correct? This likely breaks compatibility with code/text editors. I think JSON5 makes more sense.

1reaction
not-an-aardvarkcommented, Feb 6, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found