-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
🐛 Unable to migrate ESLint configuration that extends @antfu/eslint-config #4802
Comments
From what I can see the issue might be caused by the config returning a promise instead of an array |
Are there really cases where a configuration might be a promise? |
Probably, literally |
it seems using top-level await for resolving the config antfu/eslint-config#323 |
That's very unfortunate, I'm not sure we can support this configuration with the current infrastructure. We rely on To support it, it means we need to ship a shim just to resolve the promise, very inconvenient. cc @Conaclos who worked on the feature |
Can you provide the command with which biome tries to evaluate the config? |
The config is loaded in
I noticed it's not a top-level await, just the default export is a Promise. It seems Biome already supports TLA, so |
Maybe we can support such a config by flattening the Promise? |
:( |
I think another part of the issue is that the antfu config doesn't return an array of eslint config objects in a typical way, it returns a Promise that resolves to a FlatConfigComposer
|
Idk, but I think this project might be useful for exploring how to most correctly convert a flat configuration into an object with settings of eslint, etc. |
for people running into this issue, I used |
|
Note that Regarding the current issue, we could perhaps use |
|
@Kamillaova Could you try |
@Conaclos yes, this is a dirty workaround. Regarding the current issue there are two underlying problems: the fact that it can return a promise and the fact that the promise here is not an array but instead a FlatConfigComposer |
Environment information
What happened?
git clome https://github.com/Kamillaova/biome-eslint-migration-error-mre
direnv allow
# or skippnpm i --frozen-lockfile
biome migrate eslint --write
# ornode_modules/.bin/biome
without direnvExpected result
Successful migration
Code of Conduct
The text was updated successfully, but these errors were encountered: