A new version of JSHint is out: http://www.jshint.com/blog/2013-03-05/1-1-0/ and http://www.jshint.com/blog/2013-05-07/2-0-0/ it introduces a few nice options.
I'd like to add the following:
"unused": "vars"
: This would show something fishy going on in the code, uneeded parameters are too many in core and don't highlight potential problems the same way unused vars do."strict": true
: We're using strict mode everywhere, this can enforce it.- Remove
"expr": true
: Not sure why it's in there to begin with.
In jshintignore added
core/misc/jquery.ui.touch-punch.js
core/misc/domready
That would make .jshintrc like this:
{
"browser" : true,
"curly" : true,
"eqeqeq" : true,
"forin" : true,
"latedef" : true,
"newcap" : true,
"noarg" : true,
"strict" : true,
"trailing" : true,
"undef" : true,
"unused" : "vars",
"predef" : [
"Drupal",
"drupalSettings",
"domready",
"jQuery",
"_",
"matchMedia",
"Backbone",
"Modernizr",
"VIE",
"CKEDITOR"
]
}
Attachment | Size | Status | Test result | Operations |
---|---|---|---|---|
core-jshint-config-update.patch | 889 bytes | Idle | PASSED: [[SimpleTest]]: [MySQL] 55,754 pass(es). | View details | Re-test |