Problem/Motivation

Since #3270438: Remove CKEditor 4 from core, the JSON in core/.eslintrc.legacy.json is broken due to a trailing comma.

Steps to reproduce

Try to use core/eslintrc.legacy.json config file to scan JS file.

flter@P-MRS-ZOYA:~/sites/docker-drupal-project10$ make quality-js
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.34s.

Oops! Something went wrong! :(

ESLint: 8.29.0

Failed to read JSON file at /project/app/core/.eslintrc.legacy.json:

Cannot read config file: /project/app/core/.eslintrc.legacy.json
Error: Unexpected token } in JSON at position 312

Makefile:329: recipe for target 'quality-js' failed
make: *** [quality-js] Error 2

Proposed resolution

Remove the comma.

Remaining tasks

Provide a MR.

Issue fork drupal-3330028

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

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
StatusFileSize
new738 bytes

MR created.

And here is a patch for easier Composer usage.

celdia’s picture

I have reproduced the bug, tested the patch and it works fine.

Manoj Raj.R’s picture

Looked the changes in the Patch.
Of course as per the Drupal Standard, the comma should not be put in line 16.

RTBC +1

celdia’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed e177d2ed02 to 10.1.x and 37ca07212d to 10.0.x. Thanks!

  • alexpott committed e177d2ed on 10.1.x
    Issue #3330028 by Grimreaper: Broken .eslintrc.legacy.json
    

  • alexpott committed 37ca0721 on 10.0.x
    Issue #3330028 by Grimreaper: Broken .eslintrc.legacy.json
    
    (cherry...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.