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

`operator-assignment` has no default #4835

Closed
IanVS opened this Issue Dec 31, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@IanVS
Copy link
Member

commented Dec 31, 2015

operator-assignment does nothing if an option is not supplied. The config in eslint:recommended is [0, "always"], so I propose to make this an official default for the rule.

(see #4809.)

@alberto

This comment has been minimized.

Copy link
Member

commented Jan 6, 2016

That's not true, the rule already defaults to always. See https://github.com/eslint/eslint/blob/master/tests/lib/rules/operator-assignment.js#L79 for an example.

@alberto

This comment has been minimized.

Copy link
Member

commented Jan 6, 2016

I have created PR #4866 to add it to the docs.

@IanVS

This comment has been minimized.

Copy link
Member Author

commented Jan 7, 2016

Ah you're right, I see now it is setting a default here:

"AssignmentExpression": context.options[0] !== "never" ? verify : prohibit

@IanVS IanVS added documentation and removed enhancement labels Jan 7, 2016

@alberto alberto closed this in 008ea39 Jan 7, 2016

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.