Problem/Motivation
At #3417482: [Meta] Pass Eslint validations we are aiming to have all the eslint validation checks passing for the Examples module.
On this issue, we'll be focused on the field_example sub-module
Initial errors detected by 27/01/2024
modules/field_example/field_example.js
9:2 warning Unexpected unnamed function func-names
10:1 error Delete `⏎` prettier/prettier
11:3 error 'use strict' is unnecessary inside of modules strict
14:5 warning Unexpected unnamed method 'attach' func-names
14:5 error Expected method shorthand object-shorthand
15:56 warning Unexpected unnamed function func-names
16:9 error Unexpected var, use let or const instead no-var
16:13 error Identifier 'edit_field' is not in camel case camelcase
17:9 error Unexpected var, use let or const instead no-var
17:29 error Replace `.closest('div').parent()` with `⏎··········.closest('div')⏎··········.parent()⏎··········` prettier/prettier
21:30 warning Unexpected unnamed function func-names
22:11 error Identifier 'edit_field' is not in camel case camelcase
23:21 error Identifier 'edit_field' is not in camel case camelcase
25:6 error Insert `,` prettier/prettier
modules/field_example/field_example.links.menu.yml
2:1 error Expected indentation of 2 spaces but found 1 spaces yml/indent
2:8 error Multiple spaces found before 'Field Example' no-multi-spaces
3:1 error Expected indentation of 2 spaces but found 1 spaces yml/indent
3:13 error Multiple spaces found before 'field_example.description' no-multi-spaces
Proposed resolution
- Check the parent issue for detailed instructions about how to run eslint locally
- Run eslint against the submodule: field_example
- Fix the issues found and make a MR with the fixes.
Issue fork examples-3417499
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
avpadernoComment #5
avpadernoComment #7
avpaderno