Problem/Motivation
We are updating eslint as part of #3101543: Update core JavaScript dependencies listed in package.json.
It seems like eslint 5.4.0 introduced .eslintrc overrides, and for that reason, .eslintrc files are being read from subfolders.
There's an invalid .eslintrc.json file in the scaffold fixtures which leads to following error message:
Failed to read JSON file at /Users/lauri.eskola/Projects/drupal/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-assets-fixture/assets/.eslintrc.json.
Proposed resolution
Make the file a valid .eslintrc.json file so that it doesn't lead into an error.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
lauriiiComment #3
lauriiiThis problem can be reproduced by running
./node_modules/.bin/eslint --config=tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-assets-fixture/assets/.eslintrc.json .in the./corefolder.Comment #4
lauriiiComment #5
phenaproximaConfirmed the bug and the fix.
Running
npx eslint --config=tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-assets-fixture/assets/.eslintrc.json .in HEAD yielded this error:After applying the patch, I got a full eslint report as expected. So, marking this RTBC on the presumption that it will pass tests.
Comment #8
alexpottCommitted and pushed 1012c94717 to 9.0.x and 9ed2d8e183 to 8.9.x. Thanks!
Will backport to 8.8.x once it is unfrozen.
Comment #9
alexpott