Skip to content

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

Merged
ljharb merged 1 commit intoimport-js:mainfrom
coderaiser:patch-1
Aug 26, 2021
Merged

[New] no-unused-modules: add eslint v8 support#2194
ljharb merged 1 commit intoimport-js:mainfrom
coderaiser:patch-1

Conversation

@coderaiser
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/rules/no-unused-modules.js Outdated
@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
Comment thread src/rules/no-unused-modules.js Outdated
Comment thread src/rules/no-unused-modules.js Outdated
@coderaiser coderaiser requested a review from ljharb August 17, 2021 15:32
@coderaiser
Copy link
Copy Markdown
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.

Comment thread src/rules/no-unused-modules.js Outdated
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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