I have implemented a custom useEffect hook in react (let's say named useEffectCustom), and I would like the react lint rules to be applied to my custom hook. For instance:
[count, setCount] = useState(0);
// There is a warning fired by the linter here (missing dependencies: count and setCount)
useEffect(() => setCount(count+1), [])
// I would like this piece of code fires a warning as well!
useEffectCustom(() => setCount(count+1), [])
Does anyone know how to tell eslint to apply the same rule as useEffect on my custom hook?
NB: I'm not using CRA, I can modify almost anything I want in my project!