hyphenless (JS compatible) rule name
See original GitHub issueI’m using ESLint 3.19.0.
Issue
Many ESLint rule names and rule options include hyphen. In JS(ES6), identifier cannot include hyphen. cf: Variables - JavaScript | MDN
Therefore, in JS format configuration file, rule names as object keys should be quoted.
It causes a bit of frustration. (just a stylistic issue)
My take on it
I think that ESLint might as well accept snake_case
or/and lowerCamelCase
alias rule name that don’t need to be quoted.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Are dashes allowed in javascript property names?
Dashes are not legal in javascript variables. A variable name must start with a letter, dollar sign or underscore and can be followed...
Read more >JS.VUE.ATTRIBUTE.HYPHENATION
This rule enforces using hyphenated attribute names on custom components in Vue templates. <template> <!-- ✓ GOOD --> <MyComponent my-prop="prop" /> <!
Read more >bazel/concatjs - rules_nodejs - GitHub Pages
Named AMD/UMD modules and goog.module are the two JS module formats that are compatible with concatjs. Most packages do not ship with this...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... Require function names to match the name of the...
Read more >vue/attribute-hyphenation
Rule Details #. This rule enforces using hyphenated attribute names on custom components in Vue templates.
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
Personally, I don’t think it’s worth introducing the complications of automatically converting camelcase rule names just for the benefit of making config files more concise.
Thanks for your interest in improving ESLint. Unfortunately, it looks like this issue didn’t get enough support from the team and so I’m closing it. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach consensus after a long time tend to never do it, and as such, we close those issues. This doesn’t mean the idea isn’t interesting, just that it’s not something the team can commit to.