javascript
javascript copied to clipboard
Support of new eslint flat config
Hi,
eslint.config.js
should be added in https://github.com/airbnb/javascript/blob/cda44dad403979d313a4b02ce55f0bb6cc3a24b2/packages/eslint-config-airbnb-base/rules/imports.js#L94 in order to support new eslint flat config.
Thanks!
sadly yes, that's true.
I can do the PR if you want, is there a release branch?
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.
how should i contribute , where to start
@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
A PR for adding eslint.config.js
is up: https://github.com/airbnb/javascript/pull/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.
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?
I gave up with airbnb config, now I configure the rules I want directly in my flat config (without the airbnb package).
is this library not suported ?
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).
Correct; just like with every eslint major, all the plugins this config depends on have to support it before we can.
For reference, tracking issues for plugins which need to be resolved first:
https://github.com/import-js/eslint-plugin-import/issues/2556
https://github.com/jsx-eslint/eslint-plugin-react/issues/3699 https://github.com/jsx-eslint/eslint-plugin-react/issues/3685
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/978
@ljharb have I missed anything?
eslint-find-rules, as well.
Hello! Have we got any expectation when approximately airbnb flatconfig will be ready? Some days, weeks, or months?
@iserdmi nope. in the past it's taken multiple months to support a new eslint major, but this one is more disruptive and difficult to migrate to, so it might take longer.