What's Changed
📝 Changes you should be aware of
The following rules have been deprecated and will be removed in the next major version:
no-default-propsno-prop-typesno-string-refs
For legacy codebases, use no-restricted-syntax as an alternative:
{
files: ['**/*.jsx', '**/*.tsx'],
rules: {
"no-restricted-syntax": [
"error",
{
"selector": "AssignmentExpression[operator='='][left.property.name='defaultProps']",
"message": "[Deprecated] Use ES6 default parameters instead."
},
{
"selector": "AssignmentExpression[operator='='][left.property.name='propTypes']",
"message": "[Deprecated] Use TypeScript or another type-checking solution instead."
},
{
"selector": "JSXAttribute[name.name='ref'][value.type='Literal']",
"message": "[Deprecated] Use callback refs instead."
}
]
}
}Full Changelog: v2.9.2...v2.9.3