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.
In your package.json, specify the test environment for jest as "jsdom" as follows:
package.json
"jsdom"
"jest": { "testEnvironment": "jsdom" }
I faced the same issue and it worked well for me.