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

Rule Proposal: Require "shouldComponentUpdate" or PureRenderMixin to be applied #240

Closed
EvHaus opened this issue Oct 8, 2015 · 2 comments
Labels

Comments

@EvHaus
Copy link
Collaborator

EvHaus commented Oct 8, 2015

On our team, we want to ensure all components are optimized. This means either PureRenderMixin must be applied on the component, or the component must have a shouldComponentUpdate method defined. It would be great if ESLint could warn developers when they have forgotten to optimize.

@mxstbr
Copy link

mxstbr commented Feb 25, 2016

Is this by chance being worked on? This would be a great addition that'd be much appreciated!

@EvHaus
Copy link
Collaborator Author

EvHaus commented May 12, 2016

I've taken a stab at this in the eslint-plugin-cumul8 repo (npm install eslint-plugin-cumul8). Will test this in various codebases before submitting as a PR to eslint-plugin-react Looking to others for testing and feedback.

Documentation here: https://github.com/Eight-Solutions/eslint-plugin-cumul8/blob/master/docs/rules/react-require-optimization.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants