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
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
Comment #3
lostcarpark commentedAfter this change, errors further reduced as follows:
346 problems (303 errors, 43 warnings)Comment #4
lostcarpark commentedI 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.
Comment #7
mandclu commentedIt looks good to me as well. Merged in. Thanks again @lostcarpark!