Skip to content

Add no-deprecated-react-apis rule#38

Closed
arnavsurve wants to merge 1 commit intomainfrom
rule/no-deprecated-react-apis
Closed

Add no-deprecated-react-apis rule#38
arnavsurve wants to merge 1 commit intomainfrom
rule/no-deprecated-react-apis

Conversation

@arnavsurve
Copy link
Contributor

Summary

  • Adds no-deprecated-react-apis rule that detects deprecated React patterns
  • Catches: componentWillMount, componentWillReceiveProps, componentWillUpdate, UNSAFE_ lifecycle methods, defaultProps, propTypes, string refs
  • Severity: warning

Test plan

  • Detects deprecated lifecycle methods (componentWillMount, etc.)
  • Detects UNSAFE_ lifecycle methods
  • Detects static defaultProps and Component.defaultProps assignments
  • Detects propTypes usage
  • Detects string refs
  • Allows useRef, callback refs, modern lifecycle methods
  • Config modes test updated with new rule count

🤖 Generated with Claude Code

Detects deprecated React patterns: componentWillMount/ReceiveProps/Update,
UNSAFE_ lifecycle methods, defaultProps, propTypes, and string refs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants