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

Reduce unnecessary depdendency burden of eslint-plugin-nx #11937

Closed
1 task
luxaritas opened this issue Sep 8, 2022 · 5 comments · Fixed by #13222
Closed
1 task

Reduce unnecessary depdendency burden of eslint-plugin-nx #11937

luxaritas opened this issue Sep 8, 2022 · 5 comments · Fixed by #13222
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: feature

Comments

@luxaritas
Copy link
Contributor

luxaritas commented Sep 8, 2022

Description

Currently, eslint-plugin-nx relies on @nrwl/workspace, which itself relies on a number of packages including @nrwl/jest. It would be great to remove this dependency so that the transitive dependencies are no longer included

Motivation

In my specific case, I'm using "Nx Core" (not using @nrwl/workspace or any other nrwl plugins), and my environment uses Vitest rather than Jest, so I was surprised to see jest-related dependencies being installed. While this isn't a huge issue, it would be great to cut down on unneeded dependencies.

Suggested Implementation

It appears that @nrwl/workspace is being used for AST, file, and runtime lint utils. It seems reasonably to move these utils into nx and remove the @nrwl/workspace dependency.

@AgentEnder AgentEnder added the scope: linter Issues related to Eslint support in Nx label Sep 11, 2022
@meeroslav
Copy link
Contributor

meeroslav commented Sep 12, 2022

Hey @luxaritas, I totally agree. Some of these should end up in devkit and some should go to linter.
These parts were there historically because TSLint rule is part of the workspace package.

Detaching this would require getting rid of TSLint which is planned for one of the future versions. Unfortunately, it doesn't have a high priority right now.

@luxaritas
Copy link
Contributor Author

luxaritas commented Sep 12, 2022

Out of curiosity, is there a reason why moving the implementation and then importing in (or even re-exporting from) workspace wouldn't work? I suppose that could create some internal complexity/"noise" (particularly re-exports).

@luxaritas
Copy link
Contributor Author

Looks like tslint is now getting stripped out: #12279

@meeroslav
Copy link
Contributor

Yes, we will move the above-mentioned logic from @nrwl/workspace soon!

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: linter Issues related to Eslint support in Nx type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants