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

Comments

Projects
None yet
4 participants
@michaelficarra
Member

michaelficarra commented Jun 5, 2015

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 label Jun 5, 2015

@nzakas

This comment has been minimized.

Member

nzakas commented Jun 5, 2015

Is yield considered an operator?

@michaelficarra

This comment has been minimized.

Member

michaelficarra commented Jun 5, 2015

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

This comment has been minimized.

Member

gyandeeps commented Jul 12, 2015

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

@michaelficarra

This comment has been minimized.

Member

michaelficarra commented Jul 12, 2015

I would classify it as a bug.

@nzakas nzakas added bug rule accepted and removed triage labels Jul 13, 2015

lo1tuma added a commit that referenced this issue Aug 22, 2015

lo1tuma added a commit that referenced this issue Aug 26, 2015

@lo1tuma lo1tuma closed this in 8cb4696 Aug 27, 2015

ilyavolodin added a commit that referenced this issue Aug 27, 2015

Merge pull request #3485 from eslint/issue2707
Fix: check space after yield keyword in space-unary-ops (fixes #2707)

@eslint eslint bot locked and limited conversation to collaborators Feb 7, 2018

@eslint eslint bot added the archived due to age label Feb 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.