-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint.config.(js|mjs|cjs) is required for ESLint v9 and above #701
Comments
Drupal (10) uses eslint 8. I was able to run this on localgov_alert_banner using |
Thanks @andybroomfield that's a useful clue. Perhaps it bumped to 9 along the way to resolve some other dependencies. |
I see similar errors with ESLint 8 and ESLint 9 with the generated code so I think it will be on the right lines. Oops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "airbnb-base" to extend from. Please check that the name of the config is correct. |
I think that might need to be installed by going to web/core and running |
Steps to repdoruce
Run npm run lint:js
Results in the output:
Oops! Something went wrong! :(
ESLint: 9.16.0
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
Proposted resolution
Add a minimal eslint.config.mjs file.
Note: For me, the tool from the above migration-guide led to errors, which may be valid.
This minimal config below works to get the js lint to run for me, but I don't think it is importing the Drupal rules, we should confirm the output of the linter is as expected and picking up the rules from the Drupal core file.
The text was updated successfully, but these errors were encountered: