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
Merged

Conversation

@coderaiser
Copy link
Contributor

@coderaiser coderaiser commented Aug 16, 2021

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
Collaborator

@ljharb ljharb left a comment

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.

Loading

src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
Loading
@ljharb ljharb marked this pull request as draft Aug 16, 2021
@coderaiser coderaiser marked this pull request as ready for review Aug 17, 2021
@coderaiser coderaiser requested a review from ljharb Aug 17, 2021
src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
Loading
src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
Loading
@coderaiser coderaiser requested a review from ljharb Aug 17, 2021
@coderaiser
Copy link
Contributor Author

@coderaiser coderaiser commented Aug 17, 2021

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.

Loading

src/rules/no-unused-modules.js Outdated Show resolved Hide resolved
Loading
@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
ljharb
ljharb approved these changes Aug 26, 2021
ljharb
ljharb approved these changes Aug 26, 2021
@ljharb ljharb merged commit 49ada27 into import-js:main Aug 26, 2021
92 checks passed
Loading
@coderaiser coderaiser deleted the patch-1 branch Aug 26, 2021
@SimenB
Copy link
Contributor

@SimenB 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 🙂

Loading

@ljharb
Copy link
Collaborator

@ljharb 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.

Loading

@SimenB
Copy link
Contributor

@SimenB 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

Loading

@ljharb
Copy link
Collaborator

@ljharb ljharb commented Oct 10, 2021

Yep, planning on it very soon.

Loading

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

Successfully merging this pull request may close these issues.

None yet

3 participants