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

CommentFileSizeAuthor
#2 blockjs.patch950 bytesdroplet

Comments

nod_’s picture

core/modules/block/block.js: line 93, col 9, 'alert' is not defined.
droplet’s picture

Status: Active » Needs review
StatusFileSize
new950 bytes

Should it predefined alert to JSHint Config too ?

nod_’s picture

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.

sxnc’s picture

Ran throught JSHint and file came back clean, no errors.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

from #4, thanks :)

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.