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 functionality.
Create patch and upload for the testbot.
Files: modules/views/js/ajax.js
Comment | File | Size | Author |
---|---|---|---|
#9 | view_ajax.jshint.patch | 721 bytes | droplet |
#5 | core-js-jshint-views-ajax-drupal.patch | 4.66 KB | rballou |
#3 | core-js-jshint-views-ajax.combined.patch | 9.26 KB | rballou |
#3 | core-js-jshint-views-ajax.unused.patch | 3.69 KB | rballou |
#2 | core-js-jshint-views-ajax.patch | 8.52 KB | rballou |
Comments
Comment #1
rballou CreditAttribution: rballou commentedInitial JSHint pass:
Comment #2
rballou CreditAttribution: rballou commentedCleaned up Drupal, the regexp character escaping issues, and the radix parameter. I still need to come back and assess/change the unused variables (normally part of the function arguments).
Comment #3
rballou CreditAttribution: rballou commentedCleaned up the unused variables. I have added two patches: the "combined" patch is both sets of changes, the "unused" is just the second set of changes.
Comment #5
rballou CreditAttribution: rballou commentedUpdated the patch to keep Drupal as Drupal
Comment #6
dawehner#5: core-js-jshint-views-ajax-drupal.patch queued for re-testing.
Comment #8
nod_Updated the jshint config, here are the errors that needs fixing now:
Comment #9
droplet CreditAttribution: droplet commentedComment #10
nod_Works :)
Comment #11
catchCommitted/pushed to 8.x, thanks!