Skip to content

fix(linter): Add import/named to lint rules#1050

Merged
adhityamamallan merged 2 commits intocadence-workflow:masterfrom
adhityamamallan:fix-lint
Oct 23, 2025
Merged

fix(linter): Add import/named to lint rules#1050
adhityamamallan merged 2 commits intocadence-workflow:masterfrom
adhityamamallan:fix-lint

Conversation

@adhityamamallan
Copy link
Member

@adhityamamallan adhityamamallan commented Oct 23, 2025

Summary

  • Add import/named rule to .eslintrc to enable detecting import issues
  • Use deep imports for Lodash
  • Fix other misc lint issues (unused imports/variables)

Test plan

Ran the linter locally.

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/named rule 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.

@adhityamamallan adhityamamallan merged commit bee89b2 into cadence-workflow:master Oct 23, 2025
5 checks passed
@adhityamamallan adhityamamallan deleted the fix-lint branch October 23, 2025 13:45
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>
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.

3 participants