GitLab CI - ESLint - no-var and prefer-const

Created on 2 April 2024, about 1 year ago
Updated 19 April 2024, 12 months ago

Problem/Motivation

Currently ESLint is reporting the following;

✖ 346 problems (303 errors, 43 warnings)

A couple of quite similar issues with eslint checks.

  • no-var - "var" declaration should not be used - "let" or "const" should be used instead.
  • prefer-const - If a variable never has its value reassigned, it should be declared with "const".

Steps to reproduce

Please see previous pipeline log: https://git.drupalcode.org/project/smart_date/-/jobs/1161523

Proposed resolution

Always use "const" for declarations that don't need to be updated.
Always use "let" for variables that get updated.

Remaining tasks

Check the correct for each declaration and update.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

Fixed

Version

4.1

Component

Code

Created by

🇮🇪Ireland lostcarpark

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