Manual extend without using "extends"
See original GitHub issueUnfortunately I cannot use the recommended "extends": ["plugin:jest/recommended"]
method because I’m using glob override config and extends
is not supported, see https://github.com/eslint/eslint/issues/8813
With ESLint v4 that wasn’t a problem I just did some “manual” extend like that:
import { configs } from "eslint-plugin-jest";
export default {
plugins : configs.recommended.plugins,
env : configs.recommended.env,
"extends": [
"plugin:jest/recommended"
]
rules : {
...configs.recommended.rules,
...OVERRIDES
}
};
The problem came with ESLint v5 where I get the same error as https://github.com/jest-community/eslint-plugin-jest/issues/44
Environment key "jest/globals" is unknown
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 register jest/globals
?
I’m a bit stuck 🤔
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to extend classes in Kotlin without using inheritance
In this tutorial, we compare and contrast inheritance and Kotlin extensions to understand the pros and cons of each.
Read more >extends - JavaScript - MDN Web Docs - Mozilla
The extends keyword is used in class declarations or class expressions to create a class that is a child of another class.
Read more >Extending - Manual - PHP
Example #1 Extending the built-in classes. <?php /** * My Reflection_Method class */ class My_Reflection_Method extends ReflectionMethod
Read more >Does extending class need another 'use' to call namespace?
No, you need the "use" statement in both files. Use is a file-level keyword and isn't affected by inheritance.
Read more >Extending Classes | Think Java | Trinket
In Java, classes may extend only one superclass. Classes that do not specify a superclass with extends automatically inherit from java.lang.Object .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I found a workaround, instead of using
Which is the exact same as
I’m actually using
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
I’m also seeing
with config
versions: eslint@5.15.1 eslint-plugin-jest@22.3.2