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: block/block.js
Comments
Comment #1
nod_Comment #2
droplet commentedShould it predefined alert to JSHint Config too ?
Comment #3
nod_I'd rather avoid comments that are only use for JSHint.
I've never actually ran into this alert and explicitly going through window.alert is fine. A comment explaining that we're not using alert on purpose would avoid someone wanting to write it as usual.
Comment #4
sxnc commentedRan throught JSHint and file came back clean, no errors.
Comment #5
nod_from #4, thanks :)
Comment #6
catchCommitted/pushed to 8.x, thanks!