-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[eslint] Enforce operator-linebreak and no-multiple-empty-lines #3516
[eslint] Enforce operator-linebreak and no-multiple-empty-lines #3516
Conversation
@@ -51,6 +52,7 @@ rules: | |||
no-var: 2 | |||
object-curly-spacing: [2, never] | |||
one-var: [2, never] | |||
operator-linebreak: [2, "after"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we do this: [2, "after", { "overrides": { "?": "before", ":": "before"} }]
to promote this style:
const foo = open
? 'open'
: 'close';
this style is a lot cleaner for ternary, and a lot more readable when it's nested:
const foo = halfOpen
? 'halfOpen'
: open
? 'open'
: 'close';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolute not! 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather keep the style consistent and do no use the overrides
option.
What do we do here 😁?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Carry on, nevermind my comment. As long as there is consistency I'm happy 😍 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome and I'm already done 😁.
I think this is safe to merge. 👍 Let's do it 😎 |
@alitaheri @oliviertassinari I think we should use this: http://eslint.org/docs/rules/no-nested-ternary.html 😜 |
Holding for PR catch-up. |
I think that it's safe to merge this PR. We haven't seen any conflict in a week, while merging many PRs. |
@oliviertassinari I'm going to re-run the build and will merge if all is 👍 |
Ok, travis GUI output was screwed up at first (seemed cached from the initial build actually). I deleted my posts regarding it and the raw log. The errors are visible in the gui now. @oliviertassinari can you fix these up quickly:
|
? theme.hoveredAvatarColor | ||
: theme.inactiveAvatarColor); | ||
((isActive || isCompleted) ? | ||
theme.activeAvatarColo : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a mistake?
We need tests to catch this sort of stuff so we can work with confidence. We shouldn't need to manually review typos like this 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😨
…ty-lines [eslint] Enforce operator-linebreak and no-multiple-empty-lines
…empty-lines [eslint] Enforce operator-linebreak and no-multiple-empty-lines
No description provided.