Skip to content
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-config-kibana] Upgrade eslint-config to 0.10.0. #13323

Merged

Conversation

Projects
None yet
3 participants
@cjcenizal
Copy link
Contributor

commented Aug 3, 2017

@simianhacker Would you mind going through the TSVB UI and making sure I haven't broken anything? I had to change a bunch of components to named exports, and I'm not sure I updated all of the import call sites to match.

@cjcenizal cjcenizal requested review from simianhacker and stacey-gammon Aug 3, 2017

@cjcenizal cjcenizal requested a review from spalger Aug 3, 2017

import AggSelect from './agg_select';
import AggRow from './agg_row';
import createChangeHandler from '../lib/create_change_handler';
import createSelectHandler from '../lib/create_select_handler';
import createTextHandler from '../lib/create_text_handler';

class FilterRatioAgg extends Component {
export const Static = props => {

This comment has been minimized.

Copy link
@cjcenizal

cjcenizal Aug 3, 2017

Author Contributor

I renamed this component because I think the original name was a typo.

import AggSelect from './agg_select';
import MetricSelect from './metric_select';
import AggRow from './agg_row';
import createChangeHandler from '../lib/create_change_handler';
import createSelectHandler from '../lib/create_select_handler';
import createTextHandler from '../lib/create_text_handler';

class DerivativeAgg extends Component {

This comment has been minimized.

Copy link
@spalger

spalger Aug 3, 2017

Member

Changing these components from classes to function makes a lot more changed lines than necessary. Is this a requirement of the new eslint rules? Is it autofixable? If there are auto-fixed changes and manual changes, it would be great if they were in separate commits so they could be reviewed with different scrutiny.

This comment has been minimized.

Copy link
@spalger

spalger Aug 3, 2017

Member

If the class -> function conversion isn't necessary, I'd be fine with it still but another separate commit would be very helpful.

This comment has been minimized.

Copy link
@cjcenizal

cjcenizal Aug 3, 2017

Author Contributor

Preferring stateless functional components is one of the rules I added, but no it isn't autofixable unfortunately. It also means moving a lot of default exports to named exports (which is also part of our style guide, I believe). I broke this PR up into 2 commits (automatic fixes and manual ones), for your convenience.

This comment has been minimized.

Copy link
@spalger

spalger Aug 7, 2017

Member

Awesome, thanks!

@cjcenizal cjcenizal force-pushed the cjcenizal:chore/upgrade-eslint-config-0.10.0 branch from 2e1ad7e to e422a3b Aug 3, 2017

@spalger

spalger approved these changes Aug 9, 2017

Copy link
Member

left a comment

LGTM

@thomasneirynck thomasneirynck self-requested a review Aug 9, 2017

@simianhacker
Copy link
Member

left a comment

PR's like this are practically un-review-able and quite frankly pretty risky based on the size alone. I would rather see you create 11 PR's for each new rule and the corresponding refactor then one massive PR like this. Another approach would be to try and isolate the reactor to logical components so they are not all jumbled up into one gigantic PR.

@cjcenizal

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2017

@simianhacker I completely understand + agree. I think I can provide some guidance on this PR which will help you review it in its current form.

The following rules had no violations:

The first commit contains autofixes -- do you want to review these? I'm not sure these can be affected by code review, unless you want to challenge a rule we've adopted. If you look at the commit with ?w=1 appended to ignore whitespace changes, there's very little to review: 595d37f?w=1. Here are the rules which have been applied:

The second commit consists of manual fixes, but if you look at the commit with whitespace ignored, it's also a lot easier to follow: e422a3b?w=1. Here are the rules I applied:

The prefer-stateless-function rule incurred the most changes, but they involved a straightforward pattern:

  • Convert the component into a stateless function, which involved a large whitespace change
  • Convert the default export to a named export (which is the part I'm most concerned about, and need your help with)

Does this help?

@thomasneirynck thomasneirynck removed their request for review Aug 9, 2017

@simianhacker

This comment has been minimized.

Copy link
Member

commented Aug 11, 2017

I reviewed this to the best of my abilities... reviewed the code and tested (manually) all the aggs that where refactored) LGETM

@cjcenizal

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2017

Thanks @simianhacker !

cjcenizal added some commits Aug 3, 2017

@cjcenizal cjcenizal force-pushed the cjcenizal:chore/upgrade-eslint-config-0.10.0 branch from e422a3b to 6a842f5 Aug 11, 2017

@cjcenizal cjcenizal merged commit fbaf4e6 into elastic:master Aug 11, 2017

2 checks passed

CLA Commit author has signed the CLA
Details
kibana-ci Build finished.
Details

@cjcenizal cjcenizal deleted the cjcenizal:chore/upgrade-eslint-config-0.10.0 branch Aug 11, 2017

cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Aug 11, 2017

[eslint-config-kibana] Upgrade eslint-config to 0.10.0. (elastic#13323)
* Upgrade eslint-config to 0.10.0.
* Fix linting violations with popover and typography stuff in UI Framework.

cjcenizal added a commit that referenced this pull request Aug 11, 2017

[eslint-config-kibana] Upgrade eslint-config to 0.10.0. (#13323) (#13481
)

* Upgrade eslint-config to 0.10.0.
* Fix linting violations with popover and typography stuff in UI Framework.

chrisronline added a commit to chrisronline/kibana that referenced this pull request Nov 20, 2017

[eslint-config-kibana] Upgrade eslint-config to 0.10.0. (elastic#13323)
* Upgrade eslint-config to 0.10.0.
* Fix linting violations with popover and typography stuff in UI Framework.

chrisronline added a commit to chrisronline/kibana that referenced this pull request Dec 1, 2017

[eslint-config-kibana] Upgrade eslint-config to 0.10.0. (elastic#13323)
* Upgrade eslint-config to 0.10.0.
* Fix linting violations with popover and typography stuff in UI Framework.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.