Skip to content

Commit 3743e6d

Browse files
committed
Add additional test with flow annotations to prop-types
1 parent 1ced710 commit 3743e6d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/lib/rules/prop-types.js

+14
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,20 @@ ruleTester.run('prop-types', rule, {
13761376
'}'
13771377
].join('\n'),
13781378
parser: 'babel-eslint'
1379+
}, {
1380+
code: [
1381+
'type Person = {|',
1382+
' ...data,',
1383+
' lastname: string',
1384+
'|};',
1385+
'class Hello extends React.Component {',
1386+
' props: Person;',
1387+
' render () {',
1388+
' return <div>Hello {this.props.firstname}</div>;',
1389+
' }',
1390+
'}'
1391+
].join('\n'),
1392+
parser: 'babel-eslint'
13791393
}
13801394
],
13811395

0 commit comments

Comments
 (0)