Skip to content

Commit

Permalink
test(eslint-plugin-react-hooks): add coverage for unused custom hook (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
RedTn authored and cpojer committed Apr 25, 2019
1 parent d61da93 commit 793ef9b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ const tests = {
`,
options: [{additionalHooks: 'useCustomEffect'}],
},
{
code: `
function MyComponent(props) {
useCustomEffect(() => {
console.log(props.foo);
}, []);
}
`,
options: [{additionalHooks: 'useAnotherEffect'}],
},
{
// Valid because we don't care about hooks outside of components.
code: `
Expand Down

0 comments on commit 793ef9b

Please sign in to comment.