Resolve eslint issues reported by Gitlab CI automated testing

Created on 18 December 2023, 11 months ago
Updated 20 December 2023, 11 months ago

Problem/Motivation

eslint is now being run by the Gitlab CI automated testing. The output indicates there are syntax issues to fix in project JS files.

$ $CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/eslint --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=$CI_PROJECT_DIR/$_WEB_ROOT/core --ext=.js,.yml . || true
/builds/project/workbench_tabs/web/modules/custom/workbench_tabs/js/workbench_tabs_trigger.js
6:2 warning Unexpected unnamed function func-names
6:20 warning 'settings' is defined but never used no-unused-vars
7:1 error Delete `⏎` prettier/prettier
8:3 error 'use strict' is unnecessary inside of modules strict
11:43 warning Unexpected unnamed function func-names
12:9 error 'messageTrigger' is never reassigned. Use 'const' instead prefer-const
13:9 error 'messageContents' is never reassigned. Use 'const' instead prefer-const
20:30 warning Unexpected unnamed function func-names
22:7 error 'toggleMessages' was used before it was defined no-use-before-define
26:29 error Replace `'scroll',·scrollFactory(messageContents.clientHeight,·messageContents,·messageTrigger),·{·passive:·true·}` with `⏎······'scroll',⏎······scrollFactory(⏎········messageContents.clientHeight,⏎········messageContents,⏎········messageTrigger,⏎······),⏎······{·passive:·true·},⏎····` prettier/prettier
26:39 error 'scrollFactory' was used before it was defined no-use-before-define
30:23 warning Unexpected unnamed function func-names
30:33 error Replace `messageHeight,·messageContents,·messageTrigger` with `⏎····messageHeight,⏎····messageContents,⏎····messageTrigger,⏎··` prettier/prettier
31:12 warning Unexpected unnamed function func-names
31:22 warning 'e' is defined but never used no-unused-vars
38:11 error 'closeMessages' was used before it was defined no-use-before-define
45:6 error Insert `;` prettier/prettier
49:24 warning Unexpected unnamed function func-names
51:7 error 'openMessages' was used before it was defined no-use-before-define
52:6 error Delete `⏎···` prettier/prettier
54:7 error 'closeMessages' was used before it was defined no-use-before-define
59:23 warning Unexpected unnamed function func-names
65:22 warning Unexpected unnamed function func-names
68:5 error Delete `⏎` prettier/prettier
✖ 24 problems (14 errors, 10 warnings)
9 errors and 0 warnings potentially fixable with the `--fix` option.

Steps to reproduce

Run eslint against the project files with the same settings at Gitlab CI's automation.

Proposed resolution

Fix the issues and confirm with Gitlab CI testing output that eslint is passing all of the module's files.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇺🇸United States ddavisboxleitner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024