3 comments (3 comments)0 reactions (0 reactions)0 assignees (0 assignees)JavaScript2,734 forks (2,734 forks)batch import
acceptedhelp wantednew rule
Repository metrics
- Stars
- 9,293 stars (9,293 stars)
- PR merge metrics
- No merged PRs in 30d (No merged PRs in 30d)
Description
Obviously it could have been used by functions called from the constructor, but using setState in constructor is always an issue in react and causes a warning in debug mode.
Contributor guide
- Research direction
- Study existing ESLint rules in this plugin, especially those that detect lifecycle methods or state mutations. Look at the AST node for ClassBody and constructor to check for setState calls. Consider using the rule util functions for detecting React components.
- Tech stack
- javascriptreact
- Domain
- frontend
- Issue type
- Feature
- Prerequisites
- ESLintReact