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

Bug: Migrate away from lodash method packages #18160

Open
1 task done
susnux opened this issue Mar 1, 2024 · 6 comments
Open
1 task done

Bug: Migrate away from lodash method packages #18160

susnux opened this issue Mar 1, 2024 · 6 comments
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion blocked This change can't be completed until another issue is resolved bug ESLint is working incorrectly

Comments

@susnux
Copy link

susnux commented Mar 1, 2024

Lodash method packages are deprecated and will not receive any updated with Lodash 5, meaning they will be a security risk in the future.

Ref: https://lodash.com/per-method-packages

Currently lodash.merge is a dependency:

"lodash.merge": "^4.6.2",

So the best would be to migrate to import merge directly from lodash.

What did you expect to happen?

Do not use lodash.merge but import merge from lodash.

Link to Minimal Reproducible Example

"lodash.merge": "^4.6.2",

Participation

  • I am willing to submit a pull request for this issue.
@susnux susnux added bug ESLint is working incorrectly repro:needed labels Mar 1, 2024
@Rec0iL99
Copy link
Member

Rec0iL99 commented Mar 1, 2024

Hi @susnux, thanks for the issue. This looks like a Change Request and not a Bug Report. Could you please use the appropriate template here?

@Rec0iL99 Rec0iL99 added the needs info Not enough information has been provided to triage this issue label Mar 1, 2024
@bmish
Copy link
Sponsor Member

bmish commented Mar 2, 2024

Based on https://lodash.com/per-method-packages, it sounds like it would make sense to switch, would be interested to see a PR.

@mdjermanovic
Copy link
Member

We removed lodash dependency for reasons described in #14098, so we're not going to use it again. lodash.merge dependency was actually added as a replacement for previously used merge from lodash (#14287).

We could consider replacing lodash.merge with another package or a custom implementation, or just leave this as is until ESLint v10 when we'll drop support for eslintrc and remove this dependency anyway because it is used only in eslintrc mode.

@aladdin-add
Copy link
Member

👍 to leave this as is until ESLint v10.

@nzakas
Copy link
Member

nzakas commented Mar 6, 2024

I agree with leaving the package until ESLint v10.

lodash.merge is also used in the tests for no-invalid-this, so I'd suggest we replace that reference in the meantime. It looks like it's probably not needed there.

@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion and removed needs info Not enough information has been provided to triage this issue labels Mar 6, 2024
@mdjermanovic
Copy link
Member

lodash.merge is also used in the tests for no-invalid-this, so I'd suggest we replace that reference in the meantime. It looks like it's probably not needed there

I prepared #18179 to remove this and another use of lodash.merge.

The remaining one is blocked on ESLint v10.

@mdjermanovic mdjermanovic added blocked This change can't be completed until another issue is resolved and removed repro:needed labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion blocked This change can't be completed until another issue is resolved bug ESLint is working incorrectly
Projects
Status: Blocked
Development

No branches or pull requests

6 participants