Skip to content

Commit

Permalink
Bug 1553931 - Add eslint-plugin-react-hooks and enable for paths usin…
Browse files Browse the repository at this point in the history
…g React r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D140876
  • Loading branch information
Mardak committed Mar 25, 2022
1 parent 7fc2a16 commit 70b90fb
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 113 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,5 +556,15 @@ module.exports = {
"mozilla/reject-chromeutils-import-params": "warn",
},
},
{
// Rules of Hooks broadly checks for camelCase "use" identifiers, so
// enable only for paths actually using React to avoid false positives.
extends: ["plugin:react-hooks/recommended"],
files: [
"browser/components/newtab/**",
"browser/components/pocket/**",
"devtools/**",
],
},
],
};
Loading

0 comments on commit 70b90fb

Please sign in to comment.