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

Shows warning when returning a property assignment #670

Closed
woomla opened this Issue Oct 4, 2012 · 0 comments

Comments

Projects
None yet
2 participants
@woomla
Copy link

woomla commented Oct 4, 2012

When returning an assignment to a variable a warning is raised.

return beta = alpha;

But when returning an assignment to a property no warning is raised:

return beta.a = alpha;

Related to #342

@valueof valueof closed this in 526b74c Dec 16, 2012

jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014

Warn about "return o.a = 1;"
This commit fixes jshintGH-670. We already warn about simple cases such
as "return a = b;" but were ignoring a bit more complicated
expressions such as "return o.a = b;".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment