Skip to content

Conversation

@laurakwhit
Copy link
Collaborator

@laurakwhit laurakwhit commented Jan 28, 2026

Description & motivation 💭

This PR migrates from ESLint v8 legacy config to ESLint v9 with the modern flat config format and fixes various linting issues errors and warnings.

ESLint Migration

Configuration Changes:

  • Migrated from .eslintrc.cjs to eslint.config.js with flat config format
  • Upgraded typescript-eslint/eslint-plugin and typescript-eslint/parser from v6 to v8 for ESLint v9 compatibility
  • Replaced eslint-plugin-import with eslint-plugin-import-x (maintained fork with native flat config support)
  • Added proper ignores for build outputs (.vercel, .svelte-kit, etc.)

New Dependencies:

  • eslint/js - ESLint recommended config
  • typescript-eslint - Modern TypeScript ESLint package
  • globals - Global variable definitions
  • eslint-plugin-import-x - Import ordering and validation

Stylelint Configuration

  • Added declaration-property-value-no-unknown rule to allow Tailwind's theme() function in CSS properties

Code Quality Fixes

Portal Component Refactor:

Linting Error Fixes:

  • Fixed unused variable warnings (e.g., unused error parameters in catch blocks)
  • Added some missing keys to Svelte {#each} blocks
  • Updated Playwright tests to use modern locator API instead of deprecated waitForSelector()
  • Fixed various import ordering issues

Formatting:

  • Ran Prettier to ensure consistent code style across the codebase

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

All linting commands should pass:

  • pnpm lint
  • pnpm eslint
  • pnpm stylelint

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

DT-3596

Docs

Any docs updates needed?

@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Feb 3, 2026 0:02am

Request Review

}: EventParameters): string => {
return `${routeForWorkflow(parameters)}/history/events/${eventId || requestId}`;
}: EventParameters): ResolvedPathname => {
return resolve(`${routeForWorkflow(parameters)}/history/events/[id]`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

@temporal-cicd
Copy link
Contributor

temporal-cicd bot commented Jan 28, 2026

Warnings
⚠️

📊 Strict Mode: 48 errors in 8 files (17.1% of 280 total)

src/lib/utilities/route-for.ts (2)
  • L131:4: Type 'string | undefined' is not assignable to type 'string'.
  • L210:4: Type 'string | undefined' is not assignable to type 'string'.
src/lib/services/events-service.ts (11)
  • L75:43: Argument of type 'EventSortOrder | undefined' is not assignable to parameter of type 'EventSortOrder'.
  • L78:4: Argument of type '(token: string) => Promise' is not assignable to parameter of type '(token?: NextPageToken | undefined) => Promise'.
  • L88:18: Property 'history' does not exist on type 'WithoutNextPageToken'.
  • L108:20: Parameter 'full' implicitly has an 'any' type.
  • L108:26: Parameter 'current' implicitly has an 'any' type.
  • L114:19: Parameter 'e' implicitly has an 'any' type.
  • L128:4: Argument of type '(token: string) => Promise' is not assignable to parameter of type '(token?: NextPageToken | undefined) => Promise'.
  • L142:17: Property 'history' does not exist on type 'WithoutNextPageToken'.
  • L143:50: Property 'history' does not exist on type 'WithoutNextPageToken'.
  • L154:28: No overload matches this call.
  • L195:6: No overload matches this call.
src/lib/utilities/is-event-type.ts (5)
  • L214:55: Function lacks ending return statement and return type does not include 'undefined'.
  • L241:19: Element implicitly has an 'any' type because expression of type '"userMetadata" | "workflowExecutionStartedEventAttributes" | "workflowExecutionCompletedEventAttributes" | "workflowExecutionFailedEventAttributes" | "workflowExecutionTimedOutEventAttributes" | ... 52 more ... | "nexusOperationCancelRequestFailedEventAttributes"' can't be used to index type 'HistoryEvent | CommonHistoryEvent | IterableEvent'.
  • L460:6: 'event.markerRecordedEventAttributes' is possibly 'null' or 'undefined'.
  • L460:6: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
  • L494:4: 'event.workflowExecutionUpdateCompletedEventAttributes' is possibly 'null' or 'undefined'.
src/lib/utilities/format-event-attributes.ts (13)
  • L79:38: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L80:58: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L84:10: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L89:10: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L93:11: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L103:25: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L116:46: No overload matches this call.
  • L118:25: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L124:42: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L148:23: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'CombinedAttributes'.
  • L207:9: Type '("userMetadata" | "workflowExecutionStartedEventAttributes" | "workflowExecutionCompletedEventAttributes" | "workflowExecutionFailedEventAttributes" | "workflowExecutionTimedOutEventAttributes" | ... 52 more ... | "nexusOperationCancelRequestFailedEventAttributes")[] | undefined' must have a 'Symbol.iterator' method that returns an iterator.
  • L230:6: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Partial<Record<AttributeGroup, ("userMetadata" | "workflowExecutionStartedEventAttributes" | "workflowExecutionCompletedEventAttributes" | "workflowExecutionFailedEventAttributes" | ... 53 more ... | "nexusOperationCancelRequestFailedEventAttributes")[]>>'.
  • L257:34: 'groupedAttributes.summary' is possibly 'undefined'.
src/lib/utilities/get-single-attribute-for-event.ts (12)
  • L126:13: 'getStackTrace' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
  • L228:20: Type 'object | null' is not assignable to type 'string | Record<string, unknown> | IPayloads'.
  • L230:35: No overload matches this call.
  • L235:20: Type 'object | null' is not assignable to type 'string | Record<string, unknown> | IPayloads'.
  • L237:53: 'value' is possibly 'null'.
  • L237:53: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  • L239:25: 'value' is possibly 'undefined'.
  • L269:19: Function lacks ending return statement and return type does not include 'undefined'.
  • L270:44: No overload matches this call.
  • L308:41: Argument of type 'unknown' is not assignable to parameter of type 'Payload'.
  • L324:46: No overload matches this call.
  • L337:34: 'event.attempt' is possibly 'null' or 'undefined'.
src/lib/holocene/menu/menu-item.svelte (2)
  • L52:4: Type 'null' is not assignable to type 'string'.
  • L53:4: Type 'null' is not assignable to type 'string'.
src/lib/utilities/omit.ts (2)
  • L19:6: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ [K in keyof Source]: Source[K]; }'.
  • L19:20: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
src/lib/models/workflow-status.ts (1)
  • L14:62: A type predicate's type must be assignable to its parameter's type.

Generated by 🚫 dangerJS against 997b25f

rules: {
...sharedRules,
'svelte/require-each-key': 'warn',
'svelte/no-navigation-without-resolve': 'warn',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Still getting a bunch of theses warnings despite the routing utility functions (in route-for.ts) already returning a ResolvedPathname. Seems that the ESLint rule can't detect this so either we leave as is, disable specific lines or just go ahead and disable it (e.g. add { ignoreGoto: true }).

Copy link
Collaborator

Choose a reason for hiding this comment

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

ignoreGoto imo or just warn

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll just leave as warn for now.

Copy link
Contributor

@rossedfort rossedfort left a comment

Choose a reason for hiding this comment

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

💯

<Dot
point={[x, y]}
classification={group.lastEvent.classification}
icon={'retry'}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm so glad eslint catches this now 🙌

confirmType="destructive"
cancelText={translate('common.cancel')}
confirmDisabled={!jobIdValid}
confirmDisabled={!$jobIdValid}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, this was likely causing a bug, nice!

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