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: user/user.js, user/user.permissions.js

Files: 
CommentFileSizeAuthor
#7 core-jshint-user-1684880-7.patch568 bytesnod_
PASSED: [[SimpleTest]]: [MySQL] 56,258 pass(es). View
#2 user-js.patch2.67 KBdroplet
PASSED: [[SimpleTest]]: [MySQL] 37,264 pass(es). View

Comments

nod_’s picture

core/modules/user/user.js: line 21, col 113, ['confirmTitle'] is better written in dot notation.
core/modules/user/user.js: line 27, col 174, ['strengthTitle'] is better written in dot notation.
core/modules/user/user.js: line 162, col 20, 'indicatorText' is already defined.
core/modules/user/user.permissions.js: line 22, col 23, '$ancestor' is already defined.
core/modules/user/user.permissions.js: line 22, col 49, 'method' is already defined.
core/modules/user/user.permissions.js: line 47, col 7, '$ancestor' used out of scope.
core/modules/user/user.permissions.js: line 47, col 17, 'method' used out of scope.
droplet’s picture

Status: Active » Needs review
FileSize
2.67 KB
PASSED: [[SimpleTest]]: [MySQL] 37,264 pass(es). View
nod_’s picture

Status: Needs review » Reviewed & tested by the community

Apply, still works and JSHint is happy.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

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

nod_’s picture

Status: Closed (fixed) » Needs work

New JSHint config #1995996: Update JSHint configuration.

core/modules/user/user.js: line 56, col 91, Expected an assignment or function call and instead saw an expression.
nod_’s picture

Status: Needs work » Needs review
FileSize
568 bytes
PASSED: [[SimpleTest]]: [MySQL] 56,258 pass(es). View
droplet’s picture

Status: Needs review » Reviewed & tested by the community

Real tested, working :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed bdf0286 and pushed to 8.x. Thanks!

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