Problem/Motivation

After #3433215: GitLab CI - ESLint - camel case variables the error count is as follows:

385 problems (342 errors, 43 warnings)

The next most numerous error I notice is "eqeqeq", where "==" or "!=" is used, when "===" or "!==".

The recommendation for JavaScript is to always use the latter form.

Steps to reproduce

See in pipeline: https://git.drupalcode.org/issue/smart_date-3433215/-/jobs/1145908

Proposed resolution

The comparison operators to be changed to the recommended form.

Remaining tasks

  • Change "==" and "!=" to "===" and "!==".
  • Test to ensure no unexpected effects.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork smart_date-3436008

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lostcarpark created an issue. See original summary.

lostcarpark’s picture

After this change, errors further reduced as follows:

346 problems (303 errors, 43 warnings)

lostcarpark’s picture

Status: Active » Needs review

I carried out some testing, and didn't notice any issues, but I certainly don't know all the ins and outs of the module's JS code.

It shouldn't make a difference unless the code is comparing variables of different types, which should be avoided.

mandclu made their first commit to this issue’s fork.

mandclu’s picture

Status: Needs review » Fixed

It looks good to me as well. Merged in. Thanks again @lostcarpark!

Status: Fixed » Closed (fixed)

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