xo icon indicating copy to clipboard operation
xo copied to clipboard

Fix ESLint plugin load error

Open fisker opened this issue 3 years ago • 7 comments

Fixes #546

I think the only problem is, user can override plugins before, but now can't, ESLint will always load the plugins xo installed.

I saw a comment from #546, but I'm not sure what the problem is.

fisker avatar Aug 08 '21 15:08 fisker

I saw a comment from #546, but I'm not sure what the problem is.

@Richienb Would you be able to comment on this? And review the PR.

sindresorhus avatar Aug 23 '21 15:08 sindresorhus

Does this also fix https://github.com/xojs/xo/issues/555?

Richienb avatar Aug 24 '21 00:08 Richienb

Does this also fix #555?

I'm not sure, but I don't think this will fix that, the typescript can be installed in a location that @typescript-eslint/parser can't find it. The resolvePluginsRelativeTo won't affect resolve logic in @typescript-eslint/parser.

fisker avatar Aug 26 '21 05:08 fisker

I feel this PR is not a good solution now, I think this may break monorepo. I'm going to convert it to draft.

fisker avatar Aug 26 '21 05:08 fisker

I thought I found a better solution, but it didn't work.

I've opened an issue in ESLint, if it get fixed, maybe we can pass plugins that xo installed, so ESLint won't try to load them.

fisker avatar Sep 18 '21 02:09 fisker

The issue you opened upstream has been fixed 🚀

fregante avatar Aug 06 '22 15:08 fregante

In that case this can be fixed by load plugins ourselves. I don't have time to work on this. It will be great if someone want give this a shot. BTW, ESLint have a new FlatESLint haven't play with it yet.

fisker avatar Aug 06 '22 15:08 fisker