-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Lodash: Remove completely from eslint-plugin
package
#43420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all code examples, so it doesn't use the package at all. Anyway, I'm sensing it became a habit to remove every possible usage 😄
Size Change: 0 B Total Size: 1.24 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I love it! @tyxla is going after Lodash as a concept 😄
What?
This PR removes all of the Lodash occurrences from the
@wordpress/eslint-plugin
package. While Lodash is used for docs and testing there and not as a real dependency, our goal is to completely remove Lodash from the repo, so this includes documentation and tests as well. This package accounts for roughly 10% of the_.get()
usages, so it's nice to see the number drop down a bit.Why?
Lodash is known to unnecessarily inflate the bundle size of packages, and in most cases, it can be replaced with native language functionality. See these for more information and rationale:
@wordpress/api-fetch
package haslodash
as a dependency #39495While this PR doesn't affect bundle size at all (because this package's code is not bundled), it still is a step forward in the direction of completely getting rid of Lodash in Gutenberg.
How?
We're replaced all Lodash usages with ones from
change-case
.Testing Instructions
npm run test:unit packages/eslint-plugin