fix(linter): Add import/named to lint rules#1050
Merged
adhityamamallan merged 2 commits intocadence-workflow:masterfrom Oct 23, 2025
Merged
fix(linter): Add import/named to lint rules#1050adhityamamallan merged 2 commits intocadence-workflow:masterfrom
adhityamamallan merged 2 commits intocadence-workflow:masterfrom
Conversation
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances linting capabilities by enabling the import/named ESLint rule to catch import-related issues. The changes address various lint violations identified after enabling this rule, primarily focusing on converting Lodash imports to deep imports for better tree-shaking and removing unused imports.
Key changes:
- Added
import/namedrule to ESLint configuration to detect invalid named imports - Converted all Lodash imports from named imports to deep imports (e.g.,
import { pick } from 'lodash'→import pick from 'lodash/pick') - Removed unused imports and variables across multiple files
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .eslintrc.js | Added import/named rule to enable detection of invalid named imports |
| src/views/workflow-page/workflow-page-header/workflow-page-header.tsx | Removed unused Suspense import |
| src/views/workflow-history/workflow-history-context-provider/workflow-history-context-provider.types.ts | Removed unused type import |
| src/views/workflow-history/workflow-history-context-provider/workflow-history-context-provider.tsx | Removed unused imports (clearLocalStorageValue and type import) |
| src/views/workflow-actions/workflow-actions.tsx | Converted Lodash pick to deep import |
| src/views/workflow-actions/workflow-actions.styles.ts | Removed unused ButtonOverrides type import |
| src/views/workflow-actions/workflow-action-start-retry-policy/tests/workflow-action-start-retry-policy.test.tsx | Converted Lodash get to deep import |
| src/views/workflow-actions/workflow-action-start-optional-section/tests/workflow-action-start-optional-section.test.tsx | Converted Lodash get to deep import |
| src/views/workflow-actions/workflow-action-start-form/workflow-action-start-form.tsx | Converted Lodash get and isObjectLike to deep imports |
| src/views/domains-page/helpers/get-all-domains.ts | Added ESLint disable comment for legitimate cache import from React |
| src/views/domain-workflows-archival/config/domain-workflows-archival-filters.config.ts | Converted Lodash omit to deep import |
| src/utils/logger/console/register-console-logger.ts | Converted Lodash isString to deep import |
| src/route-handlers/start-workflow/start-workflow.ts | Converted Lodash isEmpty to deep import |
| src/components/multi-select-filter/multi-select-menu/multi-select-menu.tsx | Converted Lodash isEqual to deep import |
| src/components/cron-schedule-input/cron-schedule-input-popover/cron-schedule-input-popover.styles.ts | Simplified styled component definition by removing unnecessary function wrapper |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Assem-Uber
approved these changes
Oct 23, 2025
Assem-Uber
pushed a commit
to Assem-Uber/cadence-web
that referenced
this pull request
Oct 24, 2025
*Add import/named rule to .eslintrc to enable detecting import issues * Use deep imports for Lodash * Fix other misc lint issues (unused imports/variables) Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Assem-Uber
added a commit
that referenced
this pull request
Oct 27, 2025
* Search attribute component Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Fix type check Signed-off-by: Assem Hafez <assem.hafez@uber.com> * revert errors to have key and value Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Address the nits * change button label * Create hook for fetching search attributes Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Refactor error message helpers * feat: Create hook for fetching search attributes (#1046) * Create hook for fetching search attributes Signed-off-by: Assem Hafez <assem.hafez@uber.com> * use stringifyUrl Signed-off-by: Assem Hafez <assem.hafez@uber.com> --------- Signed-off-by: Assem Hafez <assem.hafez@uber.com> * fix: propagate user headers between internal api requests (#1049) * propagate user headers from server renders * fix tests * dynamically import headers * log propagated header keys * add test cases * import headers inline * Add import/named to lint rules (#1050) *Add import/named rule to .eslintrc to enable detecting import issues * Use deep imports for Lodash * Fix other misc lint issues (unused imports/variables) Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com> * remove type Signed-off-by: Assem Hafez <assem.hafez@uber.com> * lint fixes Signed-off-by: Assem Hafez <assem.hafez@uber.com> --------- Signed-off-by: Assem Hafez <assem.hafez@uber.com> Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com> Co-authored-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Assem-Uber
added a commit
that referenced
this pull request
Oct 29, 2025
* Search attribute component Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Fix type check Signed-off-by: Assem Hafez <assem.hafez@uber.com> * revert errors to have key and value Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Address the nits * change button label * Create hook for fetching search attributes Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Refactor error message helpers * feat: Create hook for fetching search attributes (#1046) * Create hook for fetching search attributes Signed-off-by: Assem Hafez <assem.hafez@uber.com> * use stringifyUrl Signed-off-by: Assem Hafez <assem.hafez@uber.com> --------- Signed-off-by: Assem Hafez <assem.hafez@uber.com> * fix: propagate user headers between internal api requests (#1049) * propagate user headers from server renders * fix tests * dynamically import headers * log propagated header keys * add test cases * import headers inline * Add import/named to lint rules (#1050) *Add import/named rule to .eslintrc to enable detecting import issues * Use deep imports for Lodash * Fix other misc lint issues (unused imports/variables) Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com> * remove type Signed-off-by: Assem Hafez <assem.hafez@uber.com> * lint fixes Signed-off-by: Assem Hafez <assem.hafez@uber.com> * align multi json add button design with search attributes * add parsing for double Signed-off-by: Assem Hafez <assem.hafez@uber.com> * Add search attributes to start form Signed-off-by: Assem Hafez <assem.hafez@uber.com> * move label to form Signed-off-by: Assem Hafez <assem.hafez@uber.com> * change test case for search attributes validation Signed-off-by: Assem Hafez <assem.hafez@uber.com> * change test case for search attributes validation Signed-off-by: Assem Hafez <assem.hafez@uber.com> --------- Signed-off-by: Assem Hafez <assem.hafez@uber.com> Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com> Co-authored-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
import/namedrule to .eslintrc to enable detecting import issuesTest plan
Ran the linter locally.