Using eslint with typescript – Unable to resolve path to module

You can set the ESLint module import resolution by adding this snippet to your .eslintrc.json configuration file: { “settings”: { “import/resolver”: { “node”: { “extensions”: [“.js”, “.jsx”, “.ts”, “.tsx”] } } }, … } More informations about resolvers: https://github.com/benmosher/eslint-plugin-import#resolvers.

How to use ESLint with Jest

The docs show you are now able to add: “env”: { “jest/globals”: true } To your .eslintrc which will add all the jest related things to your environment, eliminating the linter errors/warnings. You may need to include plugins: [“jest”] to your esconfig, and add the eslint-plugin-jest plugin if it still isn’t working.

How to fix missing dependency warning when using useEffect React Hook

If you aren’t using fetchBusinesses method anywhere apart from the effect, you could simply move it into the effect and avoid the warning useEffect(() => { const fetchBusinesses = () => { return fetch(“theURL”, {method: “GET”} ) .then(res => normalizeResponseErrors(res)) .then(res => { return res.json(); }) .then(rcvdBusinesses => { // some stuff }) .catch(err => … Read more

tech