You can just add "jasmine": true
to your .jshintrc
file.
MINOR CORRECTION - there should be "" around predef in the .jshintrc file.
Fixed by adding this to the jshint
options in my Gruntfile.coffee
:
predef: [
"jasmine"
"describe"
"xdescribe"
"before"
"beforeEach"
"after"
"afterEach"
"it"
"xit"
"it"
"inject"
"expect"
"spyOn"
]
.jshintrc
:
"predef": [
"jasmine",
"describe",
"xdescribe",
"before",
"beforeEach",
"after",
"afterEach",
"it",
"xit",
"it",
"inject",
"expect",
"spyOn",
]
I fixed this in Gruntfile.js adding jasmine: true
to the options of the jshint task:
jshint:
{
options:
{
...
node: true,
jasmine: true,
...
},
...
},
Like the OP, I'm not using a .jshintrc file either.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With