eslint-plugin-import: v2.23 no longer works with `Promise`-based Webpack configuration

Prior to v2.23, my webpack.config which returns a Promise<WebpackConfig[]> worked fine, but now it causes the following errors (LOTS of them):

Webpack config returns a `Promise`; that signature is not supported at the moment. Using empty object instead.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

I’m not clear on how synckit can actually work without C++ bindings, but I’m happy to hear more about it.

It is using worker-threads and Atomics.wait() under the hood, see also https://github.com/un-ts/synckit/blob/dba496db474d50415161e01c3bb38ccb18bc34ea/src/index.ts#L335

The idea came from sync-threads package and modern esbuild.

Separately, I don’t see any value in supporting something like this before eslint does. Until eslint supports it, we simply don’t need to.

I agree that the built-in webpack resolver does not need to support this usage, that’s why I said it could be implemented in a 3rd-party resolver, if the user desires it strongly.

@ImanMahmoudinasab

Honestly, none of these solutions looks clean and wise solution, IMO.

Then you have to wait ESLint to support pure ESM and async rules, which could take a long time.

Personally I don’t use webpack resolver, or even the Promise configuration. 😅

This can be implemented with https://github.com/un-ts/synckit for now because ESLint does not support async rules.