-
Notifications
You must be signed in to change notification settings - Fork 8.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
Migrate to AirBnB style guide. #8315
Comments
I strongly support this change, though I think this is only reasonable if we also apply the change to 4.6, which is a lot riskier. In any case though, I think this is the right move going forward. I would also be open to other suggestions besides the AirBnB styleguide if anyone has them, but at this point I'm not aware of any styleguide that has the same critical mass as that one, and our codebase is already similar in a lot of important ways. |
@epixa, why do you think feel so strongly that we apply the change to 4.6 as well? Is it because it will be difficult for developers to adhere to two different styles depending on which repo they are editing in? Since we recently decided to back port critical bug fixes only (which, unless I misunderstood, that includes 4.6 as well as 5.0?) then this doesn't seem critical to me. |
@stacey-gammon I agree with you. The situation has changed since I made that comment |
Did we agree on moving forward with this? If not, does anyone remember what the blocker was? More discussion or something else? I'm excited about the prospect of this change so would be interested in starting to go through the steps @cjcenizal mentioned above, as long as it has been mutually agreed upon. |
Yep, we do want to move forward with this. We probably need to finish our eslint upgrade process that @spalger began, which he's going to be working on soonish. It's a big change that is going to break a bunch of PRs, so he's going to figure out the extent of the damage in that regard before we rush forward, but once that is in motion it will be turned around very quickly. |
I'm keeping this one around, I tagged @elastic/kibana-operations. It's old but still relevant I think. |
This issue is quite old, and there seems to be very little desire to change our style guide. If that sentiment changes, we can raise this discussion among the teams. |
Let's agree to migrate our codebase to the AirBnB style guide (continuation of #7435 (comment), related to #4949).
Why?
This will reduce the amount of rules people need to consider when writing/reviewing code, give us a clear end goal to move our code towards, and give us a clear baseline around which we can discuss specific deviations/customizations.
The process
Extend eslint-config-airbnb
"devDependencies": { "eslint-config-airbnb": "12.0.0" }
).extends: 'airbnb'
to index.js.Update the JS style guide docs
Introduce AirBnB's rules one by one
no-unused-vars
rule in Upgrade eslint #8101).Creating custom rules
For rules which seem controversial or objectively sub-par, conduct an analysis of the pros and cons of the rule and viable alternatives, and generate a team discussion to arrive at a decision about whether to adopt the original or a customized version of the rule.
Custom rules
The text was updated successfully, but these errors were encountered: