-
-
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 jsx-handler-names #3408
[eslint] Enforce jsx-handler-names #3408
Conversation
@oliviertassinari I wish we had tests for all these handlers right now! Something to note, unfortunately the eslint rule is only for JSX. Which means there is an opportunity for inconsistency. See here: https://github.com/oliviertassinari/material-ui/blob/eslint-jsx-handler-names/src/DropDownMenu/DropDownMenu.jsx#L286 Maybe a quick search in |
Me too. Don't worry, my agressive changes are regarding using the
I agree with you but the conflict potential of this PR with others is already high. I would say, let's take care of this with another PR. |
Farewell ugly underscore 😜 👍 |
@alitaheri React components full of underscore dangle'd class methods is the stuff of my nightmares. Readability is so much better with these changes @oliviertassinari !! |
Ping me when you think I should rebase. |
@oliviertassinari Outside of what I mentioned initially, it looked good to me. Getting this merged would be great, I almost posted an issue by accident today regarding inconsistent use of comma dangled event handler methods 😄 |
😄. This PR may have conflict with many others PRs. I think that we should apply this change and the ES6 classes migration in a row. |
@oliviertassinari I agree! |
Is there a PR for that? I can help combine them before merging to master if you'd like |
By in a row, I was meaning at the same time, like the same day, not combined 😁. We merge this one, then, we run the codemod for the ES6 classe. |
I know this sounds crazy but I'm thinking we should save both of these for right before we do the directory restructure. Those three probably represent the biggest code changes in this release that will impact existing PRs. I'd say do this order:
I would like to do steps 3, 4, and 5 in a phase when we aren't merging any other PRs and we can do it in a short time span (same day like @oliviertassinari mentioned). After that, existing PRs can be resubmitted or updated against the new and moved ES6 class based components. Edit: It sounds like a lot of work but I think we're pretty close. I think the biggest step is reviewing existing PRs and getting them merged before the migration. |
@newoga That sounds sensible. When we finally "do it", might want to set it up on a temporary branch before merging it into master. |
I agree. And while we've been doing a better job with new PRs, do you think perhaps we should take a break from refactoring, and all double-down on catching up with the PR backlog? I know it's painful, but the longer we leave it, the harder fixing merge conflicts becomes. |
Yeah I think this is a good idea. I think we're just going to have to focus on the existing PRs and decide which ones will get in @oliviertassinari @alitaheri, are you good with this? |
That sounds like an good idea.
We have different types of pending PRs. I think that they needs different care:
|
That makes sense 👍 I think we should take care of the backlog. It's getting bloated and scary 😨 |
@oliviertassinari - is now the time rebase and apply this? (And any other desired eslint rules?) |
@mbrookes That sounds like the right moment. I will try to rebase before the ES6 classes conversion. |
@@ -86,7 +86,6 @@ export default class TableExampleComplex extends React.Component { | |||
fixedFooter={this.state.fixedFooter} | |||
selectable={this.state.selectable} | |||
multiSelectable={this.state.multiSelectable} | |||
onRowSelection={this._onRowSelection} |
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.
_onRowSelection
is missing.
I have just rebased this PR. |
This one is for @nathanmarks.
I have done some aggressive clean up. Be careful when reviewing 🚨.