eslint-plugin-svelte icon indicating copy to clipboard operation
eslint-plugin-svelte copied to clipboard

Move to `postcss-load-config` 5.0

Open ai opened this issue 1 year ago • 7 comments

This project is using postcss-load-config 3.0, but the latest version is 5.0.

In new version we removed Node.js 12—16, improved ESM and TS support, and moved to async API.

ai avatar Dec 01 '23 04:12 ai

ESLint currently needs to work synchronously, so we can't use the new version of postcss-load-config where the sync API has been dropped 😓

ota-meshi avatar Dec 01 '23 05:12 ota-meshi

It was dropped because of ESM/TS support where we have only async API.

Is it possible to preload config by async API in some initializer before ESLint rules call?

ai avatar Dec 01 '23 05:12 ai

I've been looking for it many times but can't find it. Probably not supported. https://github.com/eslint/eslint/issues/15394

If we need to upgrade postcss-load-config right now, I think we'll probably need to use something like synckit to synchronize it. https://github.com/un-ts/synckit

ota-meshi avatar Dec 01 '23 05:12 ota-meshi

Is there anything blocked? I believe @ota-meshi is very similar with synckit, and if you agree I can raise a PR for it.

JounQin avatar Jan 11 '24 10:01 JounQin

I'm sure that using synckit could solve the problem, but I don't have the time to implement it right now 😓

ota-meshi avatar Jan 11 '24 10:01 ota-meshi

I'm sure that using synckit could solve the problem, but I don't have the time to implement it right now 😓

and if you agree I can raise a PR for it.

I'll raise a PR for it.

JounQin avatar Jan 11 '24 10:01 JounQin

@ota-meshi Here you are. #665

JounQin avatar Jan 11 '24 11:01 JounQin