We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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-linebreak
After some discussion in Slack, it seems like most of us agree that having operator-linebreak set to before is not ideal in at least some cases.
before
Some like before for:
foo = 1 + 2;
but not for
{ foo && bar.map(var => ( <Component /> )) }
or
if (someCondition || otherCondition) { }
We could use after but there are cases where some seem not like that either.
after
answer = everything ? 42 : foo;
versus what some prefer
The answer might be some customization using none and overrides
none
overrides
I'm thinking the rule might look like:
/*eslint operator-linebreak: ["error", "before", { "overrides": { "&&": "after", "||": "after" }}]*/
What other overrides would we want?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
After some discussion in Slack, it seems like most of us agree that having
operator-linebreak
set tobefore
is not ideal in at least some cases.Some like
before
for:but not for
or
We could use
after
but there are cases where some seem not like that either.versus what some prefer
The answer might be some customization using
none
andoverrides
I'm thinking the rule might look like:
What other overrides would we want?
The text was updated successfully, but these errors were encountered: