-
Notifications
You must be signed in to change notification settings - Fork 35
Linting setup #1259
Linting setup #1259
Conversation
You can see by the rising error count that Code Climate internally uses ESLint and checks the rules configured by the project. |
.eslintrc
Outdated
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"tabWidth": 4, |
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 personally prefer 2
spaces for React applications as some components require deeper nesting in their render()
methods and a max-len
of 80
forces wrapping JSX statements too often
Also this is the perfect opportunity to ever change something like that
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'd be fine with that
.eslintrc
Outdated
"es6": true | ||
}, | ||
"parser": "babel-eslint", | ||
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"], |
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 think eslint-config-airbnb
is solid and I usually use it among eslint:recommended
and plugin:react/recommended
. What do you think?
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.
👍
@pablosichert @ottosichert @wiadev pls ping me when it's ready to be integrated. |
@pablosichert pls solve the package.json conficts. |
cd8c0de
to
9b46b12
Compare
I reverted the formatting changes in |
9b46b12
to
52a0007
Compare
Vote 👍 or 👎 : Dangling commas |
+1 for dangling comma "always-multiline". |
Let's put the vote on the comment directly, more polls will follow. Every option we decide for will automatically be transformed for the entire codebase. So we can take the option we find most optimal, regardless of how the code looks right now. 😄 |
Hint for next polls: Use multiple reactions for each rule option:
|
Hi @pablosichert @ottosichert |
b8fc9a8
to
5ffac34
Compare
Hey @metas-ts, config is mostly done, but it'll take me a day to manually resolve edge cases and to verify that all automatic transformations work flawlessly. Since there are still some (urging) features on the list for this week, I need to defer this PR to at least Friday. EDIT: to this point, rebasing with master works without conflicts. (Just did this morning.) But I need to block a day when I want to do all the transformations to make sure master didn't move on. |
5ffac34
to
b9d2eb4
Compare
32a43d9
to
e9d764e
Compare
Having this option "error" would be favorable, but there are too many errors to fix right now.
d8f3980
to
41a29bb
Compare
We are done with integrating the linter and fixing all The configuration for the linter is https://github.com/prettier/prettier out of the box.
|
#1206
This PR includes the new configuration for the linting setup and automatic code transformation, without touching any code yet.
I propose we take a week to agree on the settings and transform the code afterwards.
Please review and add your suggestions @wiadev and @ottosichert.