Skip to content
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

Support of new eslint flat config #2804

Open
OlivierZal opened this issue Aug 6, 2023 · 13 comments
Open

Support of new eslint flat config #2804

OlivierZal opened this issue Aug 6, 2023 · 13 comments

Comments

@OlivierZal
Copy link

Hi,

eslint.config.js should be added in

'**/.eslintrc.js' // eslint config
in order to support new eslint flat config.

Thanks!

@ljharb
Copy link
Collaborator

ljharb commented Aug 7, 2023

sadly yes, that's true.

@OlivierZal
Copy link
Author

I can do the PR if you want, is there a release branch?

@ljharb
Copy link
Collaborator

ljharb commented Aug 8, 2023

Actually we may need to wait until all of our peer deps support flat config. If that’s already working, then a PR to the default branch is fine.

@Krushna-Nanda
Copy link

how should i contribute , where to start

@OlivierZal
Copy link
Author

OlivierZal commented Aug 24, 2023

@ljharb, I don't know the exact process on this project, but here's a PR from a fork: https://github.com/airbnb/javascript/pull/2818/files

@filiptammergard
Copy link

A PR for adding eslint.config.js is up: #2849

You can already use flat config, even when using plugins and configs that don't yet support it, by using ...compat: https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config Many project already to this.

I don't think we need to wait for full flat config support to allow importing dev dependencies from flat config files.

@sergeushenecz
Copy link

sergeushenecz commented Apr 6, 2024

After upgrade to eslint 9.0.0. now i see error
I used ...compat.extends('airbnb'), and all was ok.
But now i see
Error: Failed to load config "airbnb" to extend from.
Maybe someone know how does it fix?

@OlivierZal

This comment was marked as off-topic.

@sergeushenecz
Copy link

is this library not suported ?

@OlivierZal
Copy link
Author

Every config needs to be updated to support new v9 eslint API, which has breaking changes.

Since v9 has been released yesterday, we probably need to wait for configs’ compatibility (see eslint/typescript, which has a dedicated issue with thread about it and tracking).

@ljharb
Copy link
Collaborator

ljharb commented Apr 6, 2024

Correct; just like with every eslint major, all the plugins this config depends on have to support it before we can.

@adrian-gierakowski
Copy link

For reference, tracking issues for plugins which need to be resolved first:

import-js/eslint-plugin-import#2556

jsx-eslint/eslint-plugin-react#3685

jsx-eslint/eslint-plugin-jsx-a11y#978

@ljharb have I missed anything?

@ljharb
Copy link
Collaborator

ljharb commented Apr 27, 2024

eslint-find-rules, as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
@ljharb @adrian-gierakowski @sergeushenecz @filiptammergard @OlivierZal @Krushna-Nanda and others