Problem/Motivation

GitLab CI is reporting the following on the eslint task:

/builds/issue/project_browser-3441425/web/modules/custom/project_browser-3441425/js/project_browser.admin.js
  39:14  error  Prefer matches to $.is  jquery/no-is
✖ 1 problem (1 error, 0 warnings)

This would seem to be caused by #3227079: Support generating Code Quality JSON reports (for GitLab CI integration), which was intended to make validation in contrib more consistent with core.

Steps to reproduce

See pipeline output...

https://git.drupalcode.org/issue/project_browser-3441425/-/jobs/1377824

Proposed resolution

Ideally, the .is call should be replaced by .matches. However, that would require refactoring to use non-JQuery objects.

I think the simplest approach is to add a // eslint-disable-next-line comment to suppress the error.

I would like to refactor the JavaScript to remove JQuery completely, but I feel that should be left for a follow-on task.

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

Status: Active » Needs review

After fix ESLINT is passing.

Unfortunately there's another PHPCS issue, and I think this one is on us. Opened #3443930: PHPCS errors from 3310884 to look at that.

fjgarlin’s picture

Status: Needs review » Reviewed & tested by the community

Agree on limiting the scope of this issue. Thank for creating the follow ups.
This one looks good and the eslint job is passing now. RTBC.

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

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for getting us past this.

Status: Fixed » Closed (fixed)

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