Closed NamesMT closed 3 months ago
Unfortunately, top-level await is not yet supported because of https://github.com/unjs/jiti/issues/72, where it is still required to properly bail out module cache for re-imports. You might need to workaround to not use top-level await at this moment.
Thank you!,
For current state, workaround using an async wrapper seems to be working fine for all cases: CLI, Extension server, config-inspector
If![image](https://github.com/eslint/config-inspector/assets/23612546/6cd4336a-5bb2-467d-99b8-3d001c66cb38)
eslint.config.js
contains an await keyword,config-inspector
will throw an error.Extra context: In my config case of the following image:![image](https://github.com/eslint/config-inspector/assets/23612546/cfd11b29-b603-46f7-9bf5-8a18ff5ebd9c)
Removed the
await
at L13 allowsconfig-inspector
to shows all the configs normally (withNuxt()
returns a Promise), ESLint ran from CLI also seems to works, but the VSCode IDE's ESLint server will not be able to infer the configs ofwithNuxt()
and will complain about things likeno-undef
because globals fromwithNuxt()
isn't registered.