Skip to content

Commit

Permalink
Added test case for more deeply nested props #2662
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkovar committed Jun 16, 2020
1 parent fcae315 commit 861fdc4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/lib/rules/forbid-prop-types.js
Expand Up @@ -1497,5 +1497,20 @@ ruleTester.run('forbid-prop-types', rule, {
forbid: ['objectOf']
}],
errors: 1
},
{
code: [
'import { shape, any } from "prop-types";',
'function C({ a }) { return a; }',
'C.propTypes = {',
' a: shape({',
' b: any',
' })',
'};'
].join('\n'),
options: [{
forbid: ['any']
}],
errors: 1
}]
});

0 comments on commit 861fdc4

Please sign in to comment.