-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update linter to work with ESLint 8 #1021
Comments
I looked a bit into it when I migrated |
FYI - ESLint 8.0.0 has been released. |
It looks like a breaking change was to remove the CLIEngine from the exports: eslint/eslint@24c9f2a#diff-3814d8caba69e5fdf3b23eed56ec7d708b8ede5aed6d686ac579421877938ec7 The CLIEngine is also not exposed via the package.json exports, therefore we likely won't be able to access it directly without creating a new ESLint. |
The |
Thanks @cjihrig ... I've started the work here: geek@0ea7ce4 looks like a similar experience with adding in more async functions |
We may also need to wait for babel/babel#13782 to land |
@geek does cjihrig/belly-button@4a151b3 make any difference? I was able to get ESLint 8 running. |
Ah, that's related to transpiling :-/ |
babel/babel#13782 has landed and apparently released: https://babeljs.io/blog/2021/10/29/7.16.0 |
@cjihrig thanks, yeah I started incorporating it last weekend, but ran into some issues. Hoping to have a PR next week. |
I ran into an issue with https://github.com/nodejs/node/blob/873119385f4b59d9a0df75284790203102054ea1/lib/internal/modules/cjs/loader.js#L975 assuming a sync function, which we assign at Line 119 in e7b0550
With the async change in eslint for |
Good catch @geek. I didn't check whether it was purposefully |
@cjihrig I don't see a way to make this work. If I try to load the cli engine directly it throws ERR_PACKAGE_PATH_NOT_EXPORTED due to not being part of the official eslint export. |
I took a look at this, and I agree it's not pretty! My recommendation is to call |
There is a PR implementing the suggestion in my previous comment here: #1035 |
Support plan
Context
What problem are you trying to solve?
ESLint 8 is currently in beta. It would be good to start migrating to ESLint 8 before it goes stable because there are some updates to be made in Lab. Lab uses ESLint's
CLIEngine
class, which has been removed in ESLint 8.Do you have a new or modified API suggestion to solve the problem?
Update Lab's ESLint according to the migration guide.
The text was updated successfully, but these errors were encountered: