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

chore: add lodash eslint #45627

Merged
merged 1 commit into from
Nov 2, 2023
Merged

chore: add lodash eslint #45627

merged 1 commit into from
Nov 2, 2023

Conversation

crazyair
Copy link
Member

@crazyair crazyair commented Nov 2, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at 3795086

Added eslint-plugin-lodash to enforce consistent and optimized usage of lodash functions across the codebase. Refactored several files to import specific lodash modules instead of the whole library. Updated .eslintrc.js to enable the lodash plugin and rule.

🔍 Walkthrough

🤖 Generated by Copilot at 3795086

  • Add eslint-plugin-lodash dependency to package.json to enable lodash plugin and rules for eslint (link)
  • Add lodash plugin and lodash/import-scope rule to .eslintrc.js to enforce importing specific lodash modules instead of the entire lodash package (link, link)
  • Change import order of kebabCase function from lodash to lodash/kebabCase in components/config-provider/__tests__/theme.test.tsx and tests/shared/demoTest.tsx to follow lodash/import-scope rule (link, link)
  • Change import order of uniqueId function from lodash to lodash/uniqueId in components/form/demo/custom-feedback-icons.tsx to follow lodash/import-scope rule (link)
  • Change import order of cloneDeep function from lodash to lodash/cloneDeep in components/upload/__tests__/upload.test.tsx to follow lodash/import-scope rule (link)
  • Change import order of remove, sortBy, and unionBy functions from lodash to lodash/remove, lodash/sortBy, and lodash/unionBy respectively in scripts/generate-authors.ts to follow lodash/import-scope rule (link)
  • Remove _ prefix from remove, sortBy, and unionBy functions in execute function of scripts/generate-authors.ts to match the imported names (link, link)

Copy link

stackblitz bot commented Nov 2, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Nov 2, 2023

Preview Is ready

Copy link
Contributor

github-actions bot commented Nov 2, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 398.29 KB
./dist/antd-with-locales.min.js 457.6 KB

Copy link

argos-ci bot commented Nov 2, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Nov 2, 2023, 6:41 AM

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (300c1f3) 100.00% compared to head (3795086) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #45627   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          694       694           
  Lines        11682     11682           
  Branches      3122      3122           
=========================================
  Hits         11682     11682           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants