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_view.js

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rballou’s picture

Original set of errors:

ajax_view.js: line 43, col 21, 'queryString' is already defined.
ajax_view.js: line 12, col 1, 'Drupal' is not defined.
ajax_view.js: line 13, col 1, 'Drupal' is not defined.
ajax_view.js: line 14, col 7, 'Drupal' is not defined.
ajax_view.js: line 14, col 26, 'Drupal' is not defined.
ajax_view.js: line 14, col 51, 'Drupal' is not defined.
ajax_view.js: line 15, col 12, 'Drupal' is not defined.
ajax_view.js: line 16, col 7, 'Drupal' is not defined.
ajax_view.js: line 16, col 39, 'Drupal' is not defined.
ajax_view.js: line 21, col 1, 'Drupal' is not defined.
ajax_view.js: line 22, col 1, 'Drupal' is not defined.
ajax_view.js: line 27, col 1, 'Drupal' is not defined.
ajax_view.js: line 32, col 19, 'Drupal' is not defined.
ajax_view.js: line 73, col 1, 'Drupal' is not defined.
ajax_view.js: line 77, col 30, 'Drupal' is not defined.
ajax_view.js: line 80, col 1, 'Drupal' is not defined.
ajax_view.js: line 89, col 1, 'Drupal' is not defined.
ajax_view.js: line 97, col 1, 'Drupal' is not defined.
ajax_view.js: line 106, col 5, 'Drupal' is not defined.
ajax_view.js: line 108, col 5, 'Drupal' is not defined.
ajax_view.js: line 113, col 22, 'Drupal' is not defined.
ajax_view.js: line 116, col 24, 'Drupal' is not defined.
ajax_view.js: line 119, col 1, 'Drupal' is not defined.
ajax_view.js: line 119, col 81, 'status' is defined but never used.

24 errors

The attached patch cleans up all of the issues listed.

rballou’s picture

Status: Active » Needs review
nod_’s picture

Oh crap, there was a problem with config and what we have.

drupal was thought to be introduced by a patch but it never went anywere. We should be using Drupal, not drupal, I updated the JSHint issue.

Sorry about that :(

rballou’s picture

No worries. I will go back and change that!

tim.plunkett’s picture

Status: Needs review » Needs work
Issue tags: +Needs manual testing
tim.plunkett’s picture

Issue tags: +VDC

Tagging VDC as well.

rballou’s picture

Attaching the updated patch without the Drupal name change.

rballou’s picture

Status: Needs work » Needs review

Forgot status change.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

Works for me :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

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