Skip to content

Commit 4e80833

Browse files
authored
Merge pull request jsx-eslint#1898 from alexzherdev/1299-test-case-flow-literals
Additional test case for literals as prop keys in prop-types
2 parents 9bd3456 + ab4ad96 commit 4e80833

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/lib/rules/prop-types.js

+8
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,14 @@ ruleTester.run('prop-types', rule, {
901901
'}'
902902
].join('\n'),
903903
parser: 'babel-eslint'
904+
}, {
905+
code: [
906+
'type Props = {\'data-action\': string};',
907+
'function Button({ \'data-action\': dataAction }: Props) {',
908+
' return <div data-action={dataAction} />;',
909+
'}'
910+
].join('\n'),
911+
parser: 'babel-eslint'
904912
}, {
905913
code: [
906914
'import type Props from "fake";',

0 commit comments

Comments
 (0)