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.

hyphenless (JS compatible) rule name

See original GitHub issue

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

github_iconTop GitHub Comments

3reactions
not-an-aardvarkcommented, Jun 11, 2017

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.

1reaction
not-an-aardvarkcommented, Jun 28, 2017

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.

Read more comments on GitHub >

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

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