Problem/Motivation
Eslint is not running correctly in CI. In CI we're getting the following error:
Oops! Something went wrong! :(
ESLint: 8.55.0
ESLint couldn't find the config "airbnb-base" to extend from. Please check that the name of the config is correct.
The config "airbnb-base" was referenced from the config file in "/builds/project/navigation/web/modules/custom/navigation/.eslintrc.json".
This error has been happening since we originally added Gitlab CI. See the job run from back then.
There are others who have run into this. There is also an issue filed against the Gitlab Templates project. I've commented there and will watch it.
Steps to reproduce
Observe a pipeline run on any MR to date on the project, specifically looking at the eslint job. The above error is reported.
Proposed resolution
Collaborate with the Gitlab Templates project on a solution.
Document a correct and viable, sample customization of .eslintrc.json
. For instance our needs (above what core already specifies) are simply:
- Allow an additional
globals
(eg.FloatingUIDOM
- Have the ability to run eslint using yarn on a checkout of the module (see our package.json)
Note that there are two places in Drupal docs that talk about custom eslint configuration:
https://project.pages.drupalcode.org/gitlab_templates/jobs/eslint/
https://www.drupal.org/docs/develop/standards/javascript-coding-standard...