Problem/Motivation

There are a few eslint errors that should be fixed:

menu_select/js/menu_select.js
    3:32  error  'settings' is defined but never used  no-unused-vars
   39:52  error  'e' is defined but never used         no-unused-vars
  125:4   error  'Drupal' is not defined               no-undef
  125:12  error  'jQuery' is not defined               no-undef
  125:20  error  'once' is not defined                 no-undef

✖ 5 problems (5 errors, 0 warnings)
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

andrii momotov created an issue. See original summary.

andrii momotov’s picture

Assigned: Unassigned » andrii momotov

I assigned the task myself because I plan to fix this issue and make a Merge Request.
Please do not work on this issue.

andrii momotov’s picture

I have fixed the first two errors:
- 'settings' is defined but never used
- 'e' is defined but never used

Regarding the other three errors: 'Drupal', 'jQuery', 'once' is not defined, I plan to investigate what the correct approach is here. For now, I temporarily added the comment “eslint-disable-next-line no-undef” so that ESLint ignores the line where these three errors occur.

Work in progress. After the investigation, I will try to fix these three errors or share my findings. Thank you.

andrii momotov’s picture

Assigned: andrii momotov » Unassigned
Status: Active » Needs review

Since the dependencies are defined in menu_select.libraries.yml:

  dependencies:
    - core/drupal
    - core/jquery
    - core/once

ESLint should not be reporting errors like: “'Drupal', 'jQuery', 'once' is not defined”. It looks like this is just an ESLint visibility issue on my local machine, so I am not going to change anything in menu_select.js regarding this.

Therefore, the MR is ready for review. Please take a look. Thank you.

  • andrii momotov committed a2624a08 on 2.0.x
    WIP: Issue #3565157: Fix for errors: ''settings' is defined but never...
andrii momotov’s picture

Status: Needs review » Fixed

Merged MR. Thanks.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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