Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up of #1664940: [Policy, patch] Decide on JSHint configuration and part of #1415788: Javascript winter clean-up
Run jshint on the files with the configuration from the parent issue or use jshint.com with the following options:
/*jshint forin:true, noarg:true, eqeqeq:true, undef:true, curly:true, browser:true, expr:true, latedef:true, newcap:true, trailing:true */
/*global Drupal, jQuery */
Fix any warnings or errors the tool finds.
Check manually that the fixes did not break any functionalities
Create patch and upload for the testbot.
Files: toolbar/toolbar.js
Comment | File | Size | Author |
---|---|---|---|
#15 | core-jshint-toolbar-1684876-15.patch | 1.88 KB | nod_ |
#11 | toolbar.jshint.patch | 1.8 KB | droplet |
#10 | core-jshint-toolbar-1684876-10.patch | 2.26 KB | nod_ |
#3 | toolbar.patch | 936 bytes | droplet |
Comments
Comment #1
nod_Comment #2
nod_Comment #3
droplet CreditAttribution: droplet commentedComment #4
nod_thanks
Comment #5
nod_oups
Comment #6
alexpottCommitted 560b809 and pushed to 8.x. Thanks!
Comment #7
tim.plunkettThis broke toolbar in vertical mode. Fix is over in #1968328: Expandable children are gone from vertical toolbar.
Comment #9
nod_New JSHint config #1995996: Update JSHint configuration.
Comment #10
nod_Comment #11
droplet CreditAttribution: droplet commentedComment #12
droplet CreditAttribution: droplet commented#10 RTBC. :)
Comment #13
nod_yeah, you're right. Better keep it JSHint-only. Thanks.
( edit ) haha that's a fun cross-post. I'll leave the jshint overlay issue alone :p
Comment #14
alexpottThis still appears to need work...
Comment #15
nod_d'oh!
removing $tray meant the $button variable is not used anymore. that'll teach me.
Comment #16
nod_ok with patch applied no more jshint errors for the file
Comment #17
alexpottCommitted 60e162c and pushed to 8.x. Thanks!