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
Issue fork pathauto-3411805
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
Comment #3
nikolay shapovalov commentedNeed to fix 3 violations:
Comment #4
nikolay shapovalov commentedReady for review.
Comment #5
d-xpert commentedChanges looks good ,
All Eslint errors seems to be addressed for now.
Comment #6
rajeshreeputraChanges looks good.
Comment #8
berdirAs commented, I don't see why services.yml needs to change. If anything we should try to use autowire to reduce bloat but that seems like a separate issue and won't work for all services.
Comment #10
mably commentedChanged to
services.ymlhave been rolled back.Changes to JS file have been a bit refactored to reduce usage of jQuery.
Comment #11
roberttabigue commentedHi,
I reviewed the ESLINT results in the GitLab CI pipeline and confirmed that the errors no longer exist.
Here is the link for reference:
ESLINT: https://git.drupalcode.org/issue/pathauto-3411805/-/jobs/8388784
I'm moving this now to "RTBC".
Thank you!
Comment #13
mably commented