react-hooks/memo-dependencies
eslint-plugin-react-hooks
import reactHooks from "eslint-plugin-react-hooks";
export default [
{
plugins: { "react-hooks": reactHooks },
rules: {
"react-hooks/memo-dependencies": "error",
},
},
];Validates that useMemo() and useCallback() specify comprehensive dependencies without extraneous values. See useMemo() docs for more information.
No code example for this rule
The linters' documentation does not include one we could extract.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
react-hooks/memo-dependencies
eslint-plugin-react-hooks
import reactHooks from "eslint-plugin-react-hooks";
export default [
{
plugins: { "react-hooks": reactHooks },
rules: {
"react-hooks/memo-dependencies": "error",
},
},
];react/memo-dependencies
react plugin · suspicious
{
"plugins": [
"react"
],
"rules": {
"react/memo-dependencies": "error"
}
}Biome does not have this rule.
Validates against deriving values from state in an effect
Validates against suppression of other rules
Validates that effect dependencies are exhaustive and without extraneous values