-
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
Manual extend without using "extends" #128
Comments
Ok I found a workaround, instead of using env: configs.recommended.env Which is the exact same as env: {
'jest/globals': true
} I'm actually using env: {
'jest': true
} As described in https://eslint.org/docs/user-guide/configuring#specifying-environments I let this issue open to make sure someone see it.. There maybe is a real problem. Feel free to close |
Note that the Not sure why it doesn't work normally, though |
I'm also seeing
with config module.exports = {
//...
overrides: [
{
files: ["**/__tests__/**/*"],
plugins: ["jest"],
env: {
"jest/globals": true,
},
},
]
} versions: |
Just for the record (in case someone has the same problem that I have) I was able to make this work by doing: Object.assign({}, require('eslint-plugin-jest').configs.recommended, {
files: ['node-tests/**/*.js'],
plugins: ['jest'],
env: {
browser: false,
node: true,
jest: true,
},
}) if I remove the Object.assign({}, require('eslint-plugin-jest').configs.recommended, {
files: ['node-tests/**/*.js'],
plugins: ['jest'],
}) |
Please note that support for |
Closing, since we're on ESLint 7 now. |
Unfortunately I cannot use the recommended
"extends": ["plugin:jest/recommended"]
method because I'm using glob override config andextends
is not supported, see eslint/eslint#8813With ESLint v4 that wasn't a problem I just did some "manual" extend like that:
The problem came with ESLint v5 where I get the same error as #44
And I cannot @pauloborges use answer because of the glob override config and
extends
issue.Is there a workaround? Why is this
Environment key "jest/globals" is unknown
appearing with ESLint v5? Is there a way to manually registerjest/globals
?I'm a bit stuck 🤔
The text was updated successfully, but these errors were encountered: