Rules
no-default-props
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
π
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Disallows using defaultProps
property in favor of ES6 default parameters.
The defaultProps
will be removed from functional components in React 19 in place of ES6 default parameters. If youβre using defaultProps
, it is recommend to migrate to ES6 default parameters.
Examples
Failing
Passing
Implementation
See Also
no-prop-types
Disallows usingpropTypes
property in favor of TypeScript or another type-checking solution.