Skip to content

Commit

Permalink
Additional test case for literals as prop keys in prop-types
Browse files Browse the repository at this point in the history
Resolves #1299
  • Loading branch information
alexzherdev committed Jul 24, 2018
1 parent 9bd3456 commit ab4ad96
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/lib/rules/prop-types.js
Expand Up @@ -901,6 +901,14 @@ ruleTester.run('prop-types', rule, {
'}'
].join('\n'),
parser: 'babel-eslint'
}, {
code: [
'type Props = {\'data-action\': string};',
'function Button({ \'data-action\': dataAction }: Props) {',
' return <div data-action={dataAction} />;',
'}'
].join('\n'),
parser: 'babel-eslint'
}, {
code: [
'import type Props from "fake";',
Expand Down

0 comments on commit ab4ad96

Please sign in to comment.