Allow generator-star-spacing to have optional spaces
See original GitHub issueESLint Version: 2.13.1
Rule to change:
generator-star-spacing
: I would like to add functionality where you can specify only before
or after
and the one you leave off will be optionally space or no space acceptable.
Code I would like to be acceptable:
function* foo() {}
let bar = function*() {};
What happens without change:
One or the other will fail, as if you specify 'generator-star-spacing': ['error', {'before': false}],
after defaults to false, rather than being an optional space.
Essentially, it should function the same as this rule in JSCS:
"disallowSpacesInGenerator": {
"beforeStar": true
},
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
generator-star-spacing - ESLint - Pluggable JavaScript Linter
Enforce consistent spacing around * operators in generator functions. Fixable ... If it is true , a space is required, otherwise spaces are...
Read more >Optional Whitespace Regex - Stack Overflow
If more than one spaces are allowed and is optional, use \s* . * says preceding character can occur zero or more times....
Read more >gym/discrete.py at master · openai/gym - spaces - GitHub
"""Implementation of a space consisting of finitely many elements.""" from typing import Optional, Union. import numpy as np. from gym.spaces.space import ...
Read more >Star System Generator User Guide - Steam Community
Full length user guide to using Star System Generator. ... Use Create to have the mod create the indicated things and locate them...
Read more >Helm from basics to advanced — part II - Banzai Cloud
In many cases it doesn't make a difference in the meaning — yaml allows redundant and repeated white spaces at many places, but...
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
Hi @vitorbal, I just tried to update to use the template, but my rule is the opposite of the template. I want to define what should pass, not be stricter on what should fail. Please let me know if my description is adequate.
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 21 days 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.