'How to enforce a certain dependency in a useEffect

I have a Context to preserve the currency and in every page i create i need my useEffect have this currency as a dependency in case it's changed the api call gets reevaluated and the whole page get the new data with this currency change without having to refesh the page

so I need to know if there's an eslint rule that can gives a warn or an error if useEffect misses a certain dependency, so that no one forgets it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source