Skip to content

Commit 12087bf

Browse files
committed
[no-unused-prop-types] test from #933
1 parent cbd4d74 commit 12087bf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/lib/rules/no-unused-prop-types.js

+16
Original file line numberDiff line numberDiff line change
@@ -2069,6 +2069,22 @@ ruleTester.run('no-unused-prop-types', rule, {
20692069
'}'
20702070
].join('\n'),
20712071
parser: 'babel-eslint'
2072+
}, {
2073+
// issue #933
2074+
code: [
2075+
'type Props = {',
2076+
' onMouseOver: Function,',
2077+
' onClick: Function,',
2078+
'};',
2079+
2080+
'const MyComponent = (props: Props) => (',
2081+
'<div>',
2082+
' <button onMouseOver={() => props.onMouseOver()} />',
2083+
' <button onClick={() => props.onClick()} />',
2084+
'</div>',
2085+
');'
2086+
].join('\n'),
2087+
parser: 'babel-eslint'
20722088
}
20732089
],
20742090

0 commit comments

Comments
 (0)