Skip to content

Commit

Permalink
Handle TSTypeReference in no-unused-prop-types
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed Feb 1, 2022
1 parent 7463448 commit 90f1bc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/propTypes.js
Expand Up @@ -967,7 +967,8 @@ module.exports = function propTypesInstructions(context, components, utils) {
ignorePropsValidation = true;
}
break;
case 'TSTypeAnnotation': {
case 'TSTypeAnnotation':
case 'TSTypeReference': {
const tsTypeAnnotation = new DeclarePropTypesForTSTypeAnnotation(propTypes, declaredPropTypes);
ignorePropsValidation = tsTypeAnnotation.shouldIgnorePropTypes;
declaredPropTypes = tsTypeAnnotation.declaredPropTypes;
Expand Down

0 comments on commit 90f1bc2

Please sign in to comment.