-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment key "jest/globals" is unknown #44
Comments
I believe ESLint processes the configuration file as it reads it, so try declaring the |
I'm still seeing this error after swapping the order. |
I completely misread your code, sorry. If you're extending from the recommended jest plugin (instead of just using the plugin), you shouldn't need to explicitly declare https://github.com/jest-community/eslint-plugin-jest/blob/master/index.js#L21 |
I didn't notice that, thanks! Removing the Jest env fixed it. |
Note that I have the same error and I cannot use the "extends" solution, see #128 |
'jest/globals' env now is unknown for eslint. Used 'jest' instead like it was suggested here jest-community/eslint-plugin-jest#44 (comment)
'jest/globals' env now is unknown for eslint. Used 'jest' instead like it was suggested here jest-community/eslint-plugin-jest#44 (comment)
The overrides: [
{
files: ['**/*.test.js'],
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
},
], |
I have also faced this issue and solved by following steps: Update Package.json(Remove "react-app/jest" from extends array "eslintConfig": { "extends": [ "react-app" ] }, |
This was causing an issue with updated configurations. See: jest-community/eslint-plugin-jest#44 (comment)
I couldn't use
{ "jest/globals": true }
as recommended in the readme, so I'm using the built in Jest env with{ "jest": true }
.Config
Dependencies
The text was updated successfully, but these errors were encountered: