- Issue created by @alexpott
- First commit to issue fork.
- Status changed to Needs work
about 1 year ago 2:22pm 13 November 2023 - π³π±Netherlands megachriz
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?
- Status changed to Needs review
about 1 year ago 3:55pm 13 November 2023 - π³π±Netherlands megachriz
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".
- π¬π§United Kingdom alexpott πͺπΊπ
I've merged in π Add javascript test coverage Fixed
-
alexpott β
committed 46f7547b on 2.0.x authored by
MegaChriz β
Issue #3400804 by MegaChriz, alexpott: Fix eslint and stylelint issue
-
alexpott β
committed 46f7547b on 2.0.x authored by
MegaChriz β
- Status changed to Fixed
11 months ago 3:47pm 20 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.