I\'m building a React app, with create-react-app.
I got the following error when running ESLint: 8:3 error \'document\' is not defined no-undef.
8:3 error \'document\' is not defined no-undef.
If you have .eslintrc.json file then add following code snippet.
.eslintrc.json
{ ...otherSettings, "env": { "browser": true, "node": true } }
if you do not have .eslintrc.json then you can add these settings in you package.json file.
package.json
{ ...otherSettings, "eslintConfig": { "globals": { "window": true } } }