react-hooks/no-deriving-state-in-effects
eslint-plugin-react-hooks
Safe autofix
eslint.config.js
import reactHooks from "eslint-plugin-react-hooks";
export default [
{
plugins: { "react-hooks": reactHooks },
rules: {
"react-hooks/no-deriving-state-in-effects": "error",
},
},
];