Reputation: 3457
I have a web app created by yeoman
webapp generator, that has this structure:
myApp
app
node_modules
grunt
grunt-contrib-jshint
test
I try to change the quotmark: "single"
option for jshint
to quotmark: true
to turn off the error for double quote. I try to set it in:
However, it seems that my change is not registered when I run grunt:
grunt jshint
Do I have to make that change anywhere else?
Upvotes: 5
Views: 4476
Reputation: 12730
First, never touch anything in node_modules. In fact, set your editor and whatever else to not search/list that folder.
Second, you should look at the valid options for jshint: http://jshint.com/docs/options/#quotmark
Third, edit your .myApp/.jshintrc file with the valid option you want. Pick single or double quotes and stick with that throughout your project. Thats why it complains.
Upvotes: 1
Reputation: 3457
I found out the problem I am having. I was having this:
var myVar = [
{
"name": "a name" // jshint warning: Mixed double and single quotes.
}
];
The correct option I should set is "quotmark": false
instead of "quotmark": true
to turn off the quote mark checking, even though I don't see why it should be an issue in my case.
The .jshintrc
file to set this option is: myApp/.jshintrc
Thanks everyone for your help. I really appreciate it!
Upvotes: 1
Reputation: 48486
How does your Gruntfile look like? You should have something like
jshint: {
options: {
jshintrc: '.jshintrc' // relative to Gruntfile
}
}
Upvotes: 6