Reputation: 4571
I'm using eslint(JavaScript Standard Style) with jest
lint keeps me warning about jest's functions are not defined.
I tried
/* eslint-env jest */
It works but, I don't want to use it in every test.js file. so I tried.
.eslintrc (in root directory)
{
"env": {
"jest": true
}
}
but, doesn't work. any ideas?
Upvotes: 9
Views: 5814
Reputation: 350
Using:
"env": {
"jest": true
}
in the .eslintrc.json
file, it solved the problem for me.
Upvotes: 22