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 ajax_example sub-module

Initial errors detected by 27/01/2024

/modules/ajax_example/js/ajax-example.js
   6:2  warning  Unexpected unnamed function         func-names
   7:1  error    Delete `⏎`                          prettier/prettier
  10:5  warning  Unexpected unnamed method 'attach'  func-names
  10:5  error    Expected method shorthand           object-shorthand
  16:6  error    Insert `,`                          prettier/prettier
  17:5  error    Delete `⏎`                          prettier/prettier

Proposed resolution

  1. Check the parent issue for detailed instructions about how to run eslint locally
  2. Run eslint agains the submodule: ajax_example
  3. Fix the issues found and make a MR with the fixes.

Issue fork examples-3417488

Command icon 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

jlbellido created an issue. See original summary.

jlbellido’s picture

Adding GlobalContributionWeekend2024 tag

jlbellido’s picture

Issue summary: View changes
jlbellido’s picture

Issue summary: View changes
jlbellido’s picture

avpaderno’s picture

Title: Pass Eslint validations: Ajax example » Pass ESLint validations: Ajax Example
avpaderno’s picture

The JavaScript file has been removed in [# #3350455].