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.

Allow generator-star-spacing to have optional spaces

See original GitHub issue

ESLint 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rwwagner90commented, Jul 27, 2016

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.

0reactions
albertocommented, Aug 26, 2016

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.

Read more comments on GitHub >

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

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