Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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"
]
}
Comment | File | Size | Author |
---|---|---|---|
#8 | core-jshint-config-update-1995996-8.patch | 645 bytes | nod_ |
#5 | remove_VIE.patch | 205 bytes | droplet |
#1 | jshint-error.txt | 3.38 KB | nod_ |
core-jshint-config-update.patch | 889 bytes | nod_ | |
Comments
Comment #1
nod_That's make us go from 15 errors currently, to 38 :)
Comment #2
nod_Nothing much to discuss here. The goal is to make the configuration as strict as possible without getting in the way. Now that most of core is fixed we can be a bit stricter. I think the current patch will be as strict as we can get.
Comment #3
Wim LeersConfiguration changes: all sensible.
Tested manually: works as expected.
RTBC +1
Comment #4
alexpottCommitted cd59b94 and pushed to 8.x. Thanks!
Comment #5
droplet CreditAttribution: droplet commentedVIE.js is removed ?
Quick patch, if needed i will open a new issue.
Comment #6
nod_oh that's right! I forgot about it.
I'm fine with keeping this issue for updating the config over time. Unless core committers prefer a new issue every time.
Comment #7
Wim LeersLikewise,
core/misc/create
andcore/misc/vie
should be removed from.jshintignore
.Comment #8
nod_good catch
Comment #10
alexpott#8: core-jshint-config-update-1995996-8.patch queued for re-testing.
Comment #11
nod_Comment #12
alexpottCommitted ee5c2c1 and pushed to 8.x. Thanks!