Fix eslint violations

Created on 1 January 2024, 6 months ago
Updated 13 February 2024, 5 months ago

Problem/Motivation

Source: https://git.drupalcode.org/project/pathauto/-/jobs/552977

Command:

 ../../../core/node_modules/.bin/eslint --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=../../../core --ext=.js,.yml .
 

Result:

/builds/project/pathauto/web/modules/custom/pathauto/config/install/pathauto.settings.yml
  15:1  error  Expected indentation of 2 spaces but found 1 spaces  yml/indent
  16:1  error  Expected indentation of 2 spaces but found 1 spaces  yml/indent
  17:1  error  Expected indentation of 2 spaces but found 1 spaces  yml/indent
  18:1  error  Expected indentation of 2 spaces but found 1 spaces  yml/indent
  19:1  error  Expected indentation of 2 spaces but found 1 spaces  yml/indent
  20:1  error  Expected indentation of 2 spaces but found 1 spaces  yml/indent
/builds/project/pathauto/web/modules/custom/pathauto/pathauto.info.yml
   7:1  error  Expected indentation of 2 spaces but found 0 spaces  yml/indent
   8:1  error  Expected indentation of 2 spaces but found 0 spaces  yml/indent
  13:1  error  Expected indentation of 2 spaces but found 0 spaces  yml/indent
/builds/project/pathauto/web/modules/custom/pathauto/pathauto.js
   1:2   warning  Unexpected unnamed function                                                                                                                                                                func-names
   2:3   error    'use strict' is unnecessary inside of modules                                                                                                                                              strict
   2:3   error    Expected newline after "use strict" directive                                                                                                                                              lines-around-directive
   4:5   warning  Unexpected unnamed method 'attach'                                                                                                                                                         func-names
   4:5   error    Expected method shorthand                                                                                                                                                                  object-shorthand
   5:17  error    Replace `.find('.path-form')` with `โŽยทยทยทยทยทยทยทยท.find('.path-form')โŽยทยทยทยทยทยทยทยท`                                                                                                                 prettier/prettier
   5:54  warning  Unexpected unnamed function                                                                                                                                                                func-names
   5:64  error    'context' is already declared in the upper scope on line 4 column 23                                                                                                                       no-shadow
   6:1   error    Insert `ยทยท`                                                                                                                                                                                prettier/prettier
   6:9   error    Unexpected var, use let or const instead                                                                                                                                                   no-var
   7:9   error    Replace `varยทautomaticยท=ยท$('.js-form-item-path-0-pathautoยทinput',ยทcontext` with `ยทยทvarยทautomaticยท=ยท$(โŽยทยทยทยทยทยทยทยทยทยทยทยท'.js-form-item-path-0-pathautoยทinput',โŽยทยทยทยทยทยทยทยทยทยทยทยทcontext,โŽยทยทยทยทยทยทยทยทยทยท`  prettier/prettier
   7:9   error    Unexpected var, use let or const instead                                                                                                                                                   no-var
   9:9   error    Insert `ยทยท`                                                                                                                                                                                prettier/prettier
  10:1   error    Insert `ยทยท`                                                                                                                                                                                prettier/prettier
  11:9   error    Replace `}โŽยทยทยทยทยทยทยท` with `ยทยท}`                                                                                                                                                             prettier/prettier
  12:14  error    Unnecessary 'else' after 'return'                                                                                                                                                          no-else-return
  13:1   error    Replace `ยทยทยทยทยทยทยทยทยทยทreturnยทDrupal.t('Alias:ยท@alias',ยท{'@alias':ยทpath` with `ยทยทยทยทยทยทยทยทยทยทยทยทreturnยทDrupal.t('Alias:ยท@alias',ยท{ยท'@alias':ยทpathยท`                                                 prettier/prettier
  14:7   error    Replace `ยทยท}โŽยทยทยทยทยทยทยท` with `ยทยทยทยท}`                                                                                                                                                         prettier/prettier
  16:1   error    Insert `ยทยท`                                                                                                                                                                                prettier/prettier
  17:9   error    Insert `ยทยท`                                                                                                                                                                                prettier/prettier
  18:1   error    Insert `ยทยท`                                                                                                                                                                                prettier/prettier
  19:6   error    Insert `,`                                                                                                                                                                                 prettier/prettier
โœ– 31 problems (28 errors, 3 warnings)
  27 errors and 0 warnings potentially fixable with the `--fix` option.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024