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)
It is using
worker-threads
andAtomics.wait()
under the hood, see also https://github.com/un-ts/synckit/blob/dba496db474d50415161e01c3bb38ccb18bc34ea/src/index.ts#L335The idea came from
sync-threads
package and modernesbuild
.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
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 supportasync
rules.