I uses RequireJS AMD in my project. When i run jshint on my project, it throws error like
In AMD Scripts
\'define\' is not defined.
<
If you're trying to run JSHint in WebStorm with Mocha, as I am, go into:
WebStorm > Preferences > Languages & Frameworks > JavaScript > Code Quality Tools > JSHint
Scroll down to "Environments" and make sure you have selected the checkbox to enable "Mocha" which will set up the definitions for JSHint for Mocha for you.
jshint: {
options: {
mocha: true,
}
}
is what you want