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

Add componentDidCatch to lifecycle for react/sort-comp #2040

Closed
mofojed opened this issue May 28, 2019 · 8 comments · Fixed by #2043 or #2060
Closed

Add componentDidCatch to lifecycle for react/sort-comp #2040

mofojed opened this issue May 28, 2019 · 8 comments · Fixed by #2043 or #2060

Comments

@mofojed
Copy link

mofojed commented May 28, 2019

There was previously a ticket to add the new React lifecycle methods to the config: jsx-eslint/eslint-plugin-react#1767

It looks like the other methods were added to lifecycle, but componentDidCatch was not: https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/rules/react.js#L274

@rahilvora
Copy link

If this is still open, can I work on it?

@ljharb
Copy link
Collaborator

ljharb commented Jul 17, 2019

Sure, that'd be great, thanks!

@rahilvora
Copy link

Cool, ill look into it.

@rahilvora
Copy link

I see componentDidCatch is already added in the rules

@rahilvora
Copy link

Should we close this issue?

@mofojed
Copy link
Author

mofojed commented Jul 22, 2019

It needs to be added to the lifecycle methods. It is not there in the tree you specified or in master:

@rahilvora
Copy link

I am sorry about that. I'll create a PR asap.

@rahilvora
Copy link

PR for this #2060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants