I'm using visual studio code v1.19.1 to write unit test with mocha.
I found that when I hover the mouse over the after
keyword, vs code says [standard] 'after' is not defined. (no-undef)
. This means that it doesn't recognize after
keyword.
It seems that this problem has something to do with JavaScript Standard Style plugin.
I've read this StackOverflow question. But adding
"standard": {
"env": [ "mocha" ]
}
or
"standard": {
"globals": [
"describe",
"context",
"before",
"beforeEach",
"after",
"afterEach",
"it",
"expect"
]
}
to package.json
doesn't work in my case.
What might be wrong with my visual studio code or javascript standard style plugin?