dimanche 13 avril 2014

Why doesn't yeoman's jshint grunt task behave the same as jshint command?


Vote count:

0




I'm using yeoman with angular-generator. It includes a task to check for JavaScript style errors using jshint: grunt jshint


When I run it I see some indentations errors:



app/scripts/app.js
line 11 col 2 Expected ']' to have an indentation at 3 instead at 2.
line 15 col 1 Expected '}' to have an indentation at 3 instead at 1.


I checked that these come from this setting in the .jshintrc config:



{
"indent": 2
}


However when I check the file manually using the jshint command (installed using npm install -g jshint) I don't see those errors:



$ jshint app/scripts/app.js
<nothing here>


Even though jshint's docs say that it will pick up the config from .jshintrc. Moreover, I have been unable to make the command line jshint command to report any errors at all about indentation (other errors are reported fine).



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire