-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Use a custom ESLint rule list #27
Conversation
|
||
// http://eslint.org/docs/rules/ | ||
|
||
'array-callback-return': ERROR, |
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.
What do you think about sorting these? Just kind of annoying to find things otherwise
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.
Yeah, totally. I was mostly looking at airbnb's configs, and they are split into multiple files, so I ended up with several sorted “regions”. I wouldn’t spend time on this right now because there are more pressing issues, but this would be nice.
'object-property-newline': [WARNING, { | ||
allowMultiplePropertiesPerLine: true, | ||
}], | ||
'one-var': [WARNING, 'never'], |
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.
It seems like it should be ok for people to do multiple declarations in a line? this config and one-var-declaration-per-line
are relevant
Doh, sorting the rules might have rendered most of my comments confused. Hrmm |
OK summarizing because the sorting borked a bunch of comments. To me these rules seem like they do not catch bugs, they just enforce one style over another equally-ok style:
|
It’s fine, thanks! I relaxed per your suggestions but I’m sticking with |
(It may be possible that people will complain, and if enough people do, we’ll turn |
OK, we'll see how it goes ;-) I personally am anti-var but it's still in tons and tons of sample code. Same goes for "require" - "import" is obviously better, but tons of sample code still uses "require". |
One thing we could do is add an autofix script. I think @ForbesLindesay wrote an autofix rule for |
I’ll get it in so we don’t rebase hell each other |
Note: travis probably failed because of |
fix jest moduleNameMapper to handle other styling libraries
Work in progress.
I think this also fixes #19.