Skip to content

Commit 30e0206

Browse files
authored
Merge pull request #1045 from CarlRosell/fix-require-default-props
Test for require-default-props rule filter of undefined exception
2 parents e6fdd02 + 70cb06d commit 30e0206

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/lib/rules/require-default-props.js

+10
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,16 @@ ruleTester.run('require-default-props', rule, {
678678
].join('\n'),
679679
parser: 'babel-eslint'
680680
},
681+
{
682+
code: [
683+
'type Props = any;',
684+
685+
'const Hello = function({ foo }: Props) {',
686+
' return <div>Hello {foo}</div>;',
687+
'};'
688+
].join('\n'),
689+
parser: 'babel-eslint'
690+
},
681691
{
682692
code: [
683693
'import type ImportedProps from "fake";',

0 commit comments

Comments
 (0)