Skip to content

Commit

Permalink
Checks if prop is
Browse files Browse the repository at this point in the history
  • Loading branch information
karolina-benitez committed Aug 26, 2020
1 parent bcfdbd5 commit bb88433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/prefer-read-only-props.js
Expand Up @@ -13,7 +13,7 @@ function isFlowPropertyType(node) {
}

function isCovariant(node) {
return node.variance && node.variance.kind === 'plus';
return node.variance && node.variance.kind === 'plus' || node.parent.parent.parent.id && node.parent.parent.parent.id.name === '$ReadOnly';
}

// ------------------------------------------------------------------------------
Expand Down

0 comments on commit bb88433

Please sign in to comment.