Rules
no-prop-types
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Presets
xrecommendedrecommended-typescriptrecommended-type-checked
Description
Disallow propTypes in favor of TypeScript or another type-checking solution.
PropTypes were deprecated in April 2017 (v15.5.0).
The propType checks will be removed from the React package, and using them will be silently ignored. If you’re using propTypes, it is recommend to migrate to TypeScript or another type-checking solution.
Examples
Failing
Passing
Implementation
Further Reading
See Also
no-default-props
Disallows usingdefaultPropsproperty in favor of ES6 default parameters.