Skip to content

Commit

Permalink
Document #3008 adds a test to no-unused-prop-types
Browse files Browse the repository at this point in the history
-  to figure out why there's a false positive
- adds easy way to keep  investivating issue
- No side effects
  • Loading branch information
thinklikeadesigner authored and ljharb committed Jul 22, 2021
1 parent 01ab399 commit f5baf33
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/lib/rules/no-unused-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -3948,6 +3948,22 @@ ruleTester.run('no-unused-prop-types', rule, {
`,
features: ['types'],
},
{
code: `
interface SlideProps {
isActive: boolean;
}
function App(){
return (
<div>
{({ isActive }: SlideProps) => <button doo = {isActive} />}
</div>
)
}
`,
features: ['types'],
},
]),

invalid: parsers.all([].concat(
Expand Down

0 comments on commit f5baf33

Please sign in to comment.