-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[no-unused-prop-types] test cases #1343
Conversation
code: [ | ||
'type ObjectType = {', | ||
' usedDirectly: string;', | ||
' usedFromArray: string;', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this example only pass when skipShapeProps is false, but fail when it's true?
If so, could we add an explicit config option?
' greeting: string;', | ||
'};', | ||
|
||
'type Props = AProps & BProps;', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so this should either mean "name and age and greeting", or "name and age, or greeting" - in the former case, "age" is missing, in the latter case, "greeting" and "name" are mutually exclusive. Shouldn't this be an error?
12087bf
to
15d0f74
Compare
');' | ||
].join('\n'), | ||
parser: 'babel-eslint', | ||
options: [{skipShapeProps: false}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to clarify; this example should work identically both with and without skipShapeProps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it doesn't have any effect. The props are not shape.
fixes #933