Skip to content

Commit bd23406

Browse files
authored
Merge pull request jsx-eslint#1332 from DianaSuvorova/issue_#1107
`no-unused-prop-types`: add `.map` test case from jsx-eslint#1107
2 parents fe69b04 + caadc6a commit bd23406

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/lib/rules/no-unused-prop-types.js

+15
Original file line numberDiff line numberDiff line change
@@ -1914,6 +1914,21 @@ ruleTester.run('no-unused-prop-types', rule, {
19141914
' test: React.PropTypes.bool',
19151915
'};'
19161916
].join('\n')
1917+
}, {
1918+
// issue 1107
1919+
code: [
1920+
'const Test = props => <div>',
1921+
' {someArray.map(l => <div',
1922+
' key={l}>',
1923+
' {props.property + props.property2}',
1924+
' </div>)}',
1925+
'</div>',
1926+
1927+
'Test.propTypes = {',
1928+
' property: React.propTypes.string.isRequired,',
1929+
' property2: React.propTypes.string.isRequired',
1930+
'}'
1931+
].join('\n')
19171932
}
19181933
],
19191934

0 commit comments

Comments
 (0)