Skip to content
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

[New] no-unused-modules: add eslint v8 support #2194

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

coderaiser
Copy link
Contributor

Add support of ESLint v8, the /lib entry point has removed, and

const { FileEnumerator } = require("eslint/lib/cli-engine/file-enumerator");

should be changed to

const { FileEnumerator } = require("eslint/use-at-your-own-risk");

Here is how it looks like in v8 right now
image

Related to typescript-eslint/typescript-eslint#3735 and typescript-eslint/typescript-eslint#3737 (comment)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a duplicate of #2191. Separately, we won't be supporting eslint 8 officially until it's out of prerelease.

However, this seems like it might be useful to pull in early.

src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
@ljharb ljharb marked this pull request as draft August 16, 2021 21:46
@coderaiser coderaiser marked this pull request as ready for review August 17, 2021 10:44
@coderaiser coderaiser requested a review from ljharb August 17, 2021 10:44
src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
@coderaiser coderaiser requested a review from ljharb August 17, 2021 15:32
@coderaiser
Copy link
Contributor Author

Let's use try-catch it is very popular, make codebase flat and similar concept with tuples has Go, a lot people interested in such version, and it can became standard in the future.

Nesting you suggest me to add is horrible and not maintainable.

src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
@ljharb ljharb changed the title feature: no-unused-modules: add support of eslint v8 [New] no-unused-modules: add eslint v8 support Aug 26, 2021
@SimenB
Copy link
Contributor

SimenB commented Sep 17, 2021

Any chance of a release of this? While it might still give peer dep warnings etc until "proper" v8 support lands, I believe this should unblock modules using this plugin in their own migration work without resorting to patching the module 🙂

@ljharb
Copy link
Member

ljharb commented Sep 17, 2021

I'll try to make a pass through the open PRs and issues this weekend and see if I can cut a release.

@SimenB
Copy link
Contributor

SimenB commented Oct 10, 2021

v8 is released, a release of this PR would be awesome 🙂

https://github.com/eslint/eslint/releases/tag/v8.0.0

@ljharb
Copy link
Member

ljharb commented Oct 10, 2021

Yep, planning on it very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants