Problem/Motivation

The eslint step is failing gitlab. We should unskip it and fix it.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

alexpott created an issue. See original summary.

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

megachriz’s picture

Status: Active » Needs work

I'm not so familiar yet with the coding standards on JavaScript. I'm also not that strong on JavaScript.

I don't know yet how I should fix the following warning:

warning  Unexpected unnamed function  func-name

For example, that warning is given about the following line:

$(Drupal.blockFloatStack()).each(function() {

So it looks like eslint doesn't allow anonymous functions? But I see them used in Drupal's code base as well. For example in core/modules/media/js/type_form.js on line 48:

.each(function () {

And in core/misc/autocomplete.js on line 226:

$autocomplete.autocomplete(autocomplete.options).each(function () {

So what do I need to do here to pass eslint?

megachriz’s picture

Status: Needs work » Needs review

Okay, I see now that it still gives the warning about "Unexpected unnamed function", but GitLab CI does mark eslint as passed anyway. Then this can move to "Needs review".

alexpott’s picture

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

  • alexpott committed 46f7547b on 2.0.x authored by MegaChriz
    Issue #3400804 by MegaChriz, alexpott: Fix eslint and stylelint issue
    
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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