GitlabCI: Fix ESLINT validation errors

Created on 18 August 2024, 8 months ago
Updated 5 September 2024, 8 months ago

Problem/Motivation

The last pipeline for the current development branch 2.1.x reported quite a few errors for the job ESLINT, see:

Steps to reproduce

Build > Pipeline > Run pipeline :
https://git.drupalcode.org/project/colorbox/-/pipelines
Select branch: 2.1.x

Proposed resolution

Fix all errors reported by ESLINT:

  • Apply automated correction of errors with the --fix flag.
  • Fix all other errors manually, based on suggestions.
  • Ignore certain files, or rules, if necessary to be excluded from validation.

 

Feel free to let us know if you have any questions or concerns on any aspects of this ticket or the project in general, we would be glad to help.
Thanks in advance!

πŸ“Œ Task
Status

Needs work

Version

2.1

Component

Code

Created by

πŸ‡«πŸ‡·France dydave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dydave
  • Pipeline finished with Success
    8 months ago
    Total: 433s
    #257024
  • Merge request !43Resolve #3468719 "Gitlabci fix eslint" β†’ (Open) created by dydave
  • Pipeline finished with Success
    8 months ago
    Total: 218s
    #257030
  • Status changed to Needs review 8 months ago
  • πŸ‡«πŸ‡·France dydave

    Quick follow-up on this issue:

    A few additional commits were added to the current merge request MR!43 with a few comments, see above at #2.

    But mostly, at this point:
    Last build on MR: https://git.drupalcode.org/issue/colorbox-3468719/-/pipelines/257030

     

    We would greatly appreciate if a maintainer or someone with write permission could take a look at ticket's merge request MR!43 and let us know if there would be any more work needed.

    Feel free to let us know if you have any questions or concerns on this initial merge request or any aspect of this ticket in general, we would surely be glad to help.
    Thanks in advance for your feedback and reviews.

  • Status changed to Needs work 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States paulmckibben Atlanta, GA

    Hi @DYDave,

    Thank you for all the work you have done to fix the ESLint errors and refactor the code for modern javascript.
    I left some comments in the merge request, but they are all the same (different files): when attaching behaviors, is adding the requirement for context === document going to break colorbox for ajax-loaded content? e.g. in a multi-page view where results are loaded using ajax.

    I did not try to test this, and it's possible I missed something where this scenario could still work. Please let me know what you think.

    Thanks!

Production build 0.71.5 2024