Skip to content

Commit c6498b8

Browse files
committed
Add test for 'type Props = any' for require-default-props rule
1 parent cf1a8ef commit c6498b8

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
@@ -688,6 +688,16 @@ ruleTester.run('require-default-props', rule, {
688688
].join('\n'),
689689
parser: 'babel-eslint'
690690
},
691+
{
692+
code: [
693+
'type Props = any;',
694+
695+
'const Hello = function({ foo }: Props) {',
696+
' return <div>Hello {foo}</div>;',
697+
'};'
698+
].join('\n'),
699+
parser: 'babel-eslint'
700+
},
691701
{
692702
code: [
693703
'import type ImportedProps from "fake";',

0 commit comments

Comments
 (0)