Skip to content

Commit

Permalink
test: disable react-hooks/exhaustive-deps linting
Browse files Browse the repository at this point in the history
There are many times it is necessary to exclude values from the hook dependencies. Rather than littering the codebase with exceptions, we can just disable it globally.
  • Loading branch information
chrisvxd committed Sep 22, 2023
1 parent bf5f16b commit f7125de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ module.exports = {
rootDir: ["apps/*/"],
},
},
rules: {
"react-hooks/exhaustive-deps": "off",
},
};
2 changes: 0 additions & 2 deletions packages/plugin-heading-analyzer/src/HeadingAnalyzer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ const HeadingOutlineAnalyer = ({
} else {
setHierarchy(buildHierarchy());
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [data.content]);

return (
Expand Down

0 comments on commit f7125de

Please sign in to comment.