Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space-unary-ops should enforce yield spacing #2707

Closed
michaelficarra opened this issue Jun 5, 2015 · 4 comments
Closed

space-unary-ops should enforce yield spacing #2707

michaelficarra opened this issue Jun 5, 2015 · 4 comments
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@michaelficarra
Copy link
Member

I would expect space-unary-ops (with the default options) to report yield(0) and yield+0. I would probably expect it to report yield*0 and the like as well.

@ilyavolodin ilyavolodin added the triage An ESLint team member will look at this issue soon label Jun 5, 2015
@nzakas
Copy link
Member

nzakas commented Jun 5, 2015

Is yield considered an operator?

@michaelficarra
Copy link
Member Author

Yield is an operator anywhere within a generator. Elsewhere, it's simply an identifier. But if you ever see a YieldExpression, yes, it's an operator.

@gyandeeps
Copy link
Member

are we fixing this? if yes, is it a bug or enhancement?

@michaelficarra
Copy link
Member Author

I would classify it as a bug.

@nzakas nzakas added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jul 13, 2015
ilyavolodin added a commit that referenced this issue Aug 27, 2015
Fix: check space after yield keyword in space-unary-ops (fixes #2707)
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

4 participants