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

perf: Cherry-pick Lodash imports for smaller bundles #2870

Merged
merged 1 commit into from
May 1, 2024

Conversation

jrood
Copy link
Contributor

@jrood jrood commented Apr 29, 2024

Overview

Use Cherry-picked Lodash imports for smaller bundles

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

PR Links and Envs

Repository PR Link PR Env
Monolith Monolith PR Monolith Env
Portal Portal Link Portal Env

@jrood jrood changed the title Cherry-pick Lodash imports for smaller bundles perf: Cherry-pick Lodash imports for smaller bundles Apr 29, 2024
@jrood jrood force-pushed the jrood.lodash-cherry-pick-imports branch 3 times, most recently from 0071d2e to ef0343d Compare May 1, 2024 18:05
@jrood jrood marked this pull request as ready for review May 1, 2024 19:17
@jrood jrood requested a review from a team as a code owner May 1, 2024 19:17
Copy link
Member

@jakemhiller jakemhiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I love this
  2. what do you think about adding eslint-plugin-lodash and linting this, so it doesn't get reversed in the future?

in the root .eslintrc.json

{     
      ...
      "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
      "plugins": ["lodash"],
      "rules": {
        "lodash/import-scope": ["error", "method-package"],
        ...

Copy link
Contributor

@dreamwasp dreamwasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥲

@jrood
Copy link
Contributor Author

jrood commented May 1, 2024

  1. I love this
  2. what do you think about adding eslint-plugin-lodash and linting this, so it doesn't get reversed in the future?

in the root .eslintrc.json

{     
      ...
      "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
      "plugins": ["lodash"],
      "rules": {
        "lodash/import-scope": ["error", "method-package"],
        ...

ooh, yes I'll add that!

@jrood jrood force-pushed the jrood.lodash-cherry-pick-imports branch from f1f5dfe to 4bbac12 Compare May 1, 2024 20:11
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
plugins: ['lodash'],
rules: {
'lodash/import-scope': ['error', 'method'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used method rather than method-package here for lodash/map rather than lodash.map

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://6632a3b5cfe16b0f122f7c7c--gamut-preview.netlify.app

Deploy Logs

@jrood jrood added the Ship It :shipit: Automerge this PR when possible label May 1, 2024
@codecademydev codecademydev merged commit 0ee58af into main May 1, 2024
19 of 20 checks passed
@codecademydev codecademydev deleted the jrood.lodash-cherry-pick-imports branch May 1, 2024 20:29
@codecademydev codecademydev removed the Ship It :shipit: Automerge this PR when possible label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants