Skip to content

refactor: enable noImplicitAny - #15027

Merged
jcfranco merged 6 commits into
devfrom
jcfranco/enable-no-implicit-any-on-components
Sep 1, 2026
Merged

jcfranco merged 6 commits into
devfrom
jcfranco/enable-no-implicit-any-on-components

Conversation

@jcfranco

@jcfranco jcfranco commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

monday.com sync: #12948178649

Related Issue: N/A

Summary

Enables noImplicitAny for components.

@github-actions github-actions Bot added the refactor Issues tied to code that needs to be significantly reworked. label Aug 14, 2026
@jcfranco jcfranco changed the title refactor: enable noImplicitAny refactor: enable noImplicitAny Aug 14, 2026
@jcfranco jcfranco added the skip visual snapshots Pull requests that do not need visual regression testing. label Aug 14, 2026
@jcfranco
jcfranco requested a lite review from Copilot August 19, 2026 15:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables TypeScript’s noImplicitAny within the packages/components workspace by removing the local override and updating component/test code to add explicit typings and safer narrowing/casting.

Changes:

  • Removes the noImplicitAny: false override so the shared TS config’s stricter setting applies.
  • Adds explicit types and safer object/key access patterns across component code and test helpers.
  • Adjusts a few runtime helpers to avoid unsafe dynamic property access (notably openCloseComponent, though one change currently breaks openProp support).

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/components/tsconfig.json Removes noImplicitAny override
packages/components/src/utils/time.browser.spec.ts Adds explicit param/return types
packages/components/src/utils/openCloseComponent.ts Refactors open-state detection
packages/components/src/utils/logger.browser.spec.ts Types globalThis test config
packages/components/src/utils/locale.browser.spec.ts Safer typed key iteration
packages/components/src/utils/dom.browser.spec.tsx Adds JSX factory import + param typing
packages/components/src/utils/config.browser.spec.ts Types globals + focus-trap stack
packages/components/src/tests/commonTests/browser/themed.ts Tightens CSS property typing
packages/components/src/tests/commonTests/browser/t9n.ts Uses object matcher for overrides
packages/components/src/tests/commonTests/browser/reflects.ts Safer key typing + assignment
packages/components/src/tests/commonTests/browser/open-close.ts Avoids dynamic index assignment
packages/components/src/tests/commonTests/browser/internal-label.ts Narrows _loading access
packages/components/src/tests/commonTests/browser/focus-trap.ts Avoids dynamic index assignment
packages/components/src/tests/commonTests/browser/floating-ui.ts Avoids dynamic index assignment
packages/components/src/tests/commonTests/browser/defaults.ts Safer key typing + assertions
packages/components/src/controllers/useTime.ts Removes dynamic localized key composition
packages/components/src/controllers/useForm/validation.ts Uses explicit ValidityState key list
packages/components/src/components/tooltip/tooltip.browser.e2e.tsx Narrows property to literal "open"
packages/components/src/components/tile/tile.tsx Makes slot-change logic explicit + types ref
packages/components/src/components/text-area/text-area.e2e.ts Adds missing numeric/event types
packages/components/src/components/table-row/table-row.tsx Removes implicit-any field
packages/components/src/components/split-button/split-button.e2e.ts Adds const assertions + typed iteration
packages/components/src/components/sort-handle/sort-handle.e2e.ts Types E2EPage parameter
packages/components/src/components/slider/slider.tsx Types internal fields + safer key iteration
packages/components/src/components/slider/slider.e2e.ts Fixes awaited property indexing
packages/components/src/components/slider/slider.browser.e2e.tsx Uses Object.entries destructuring
packages/components/src/components/sheet/sheet.browser.e2e.tsx Adds explicit setup return type
packages/components/src/components/scrim/scrim.e2e.ts Fixes implicit global via const
packages/components/src/components/pagination/pagination.e2e.ts Uses Object.entries destructuring
packages/components/src/components/notice/notice.stories.ts Types story helper parameters
packages/components/src/components/input-time-zone/utils.ts Safe message lookup + narrows prop union
packages/components/src/components/input-time-zone/input-time-zone.tsx Narrows timeZoneItems rendering branch
packages/components/src/components/input-time-picker/input-time-picker.tsx Types mouse event handler
packages/components/src/components/graph/utils.browser.spec.ts Types empty data series
packages/components/src/components/filter/filter.e2e.ts Types page as E2EPage
packages/components/src/components/combobox/combobox.tsx Adds explicit destructured param type
packages/components/src/components/color-picker/color-picker.tsx Fixes dynamic key access + type safety
packages/components/src/components/color-picker/color-picker.browser.e2e.tsx Safer iteration over object entries/values
packages/components/src/components/checkbox/checkbox.e2e.ts Types helper function parameters
packages/components/src/components/carousel/carousel.tsx Types timer handles properly
packages/components/src/components/card/card.tsx Types pointer event handler
packages/components/src/components/button/button.e2e.ts Avoids precedence pitfall in awaits
packages/components/src/components/action-menu/action-menu.tsx Types click handler as MouseEvent

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/components/src/utils/openCloseComponent.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated no new comments.

Suppressed comments (2)

packages/components/src/utils/openCloseComponent.ts:70

  • isOpen can return undefined because the default-state path reads component.open from an optional property. In practice, components using the default open prop should always provide a boolean, and keeping isOpen as boolean avoids propagating an unnecessary tri-state into the toggle logic.
    packages/components/src/components/dialog/dialog.tsx:54
  • The class no longer explicitly implements the open/close transition contract used by toggleOpenClose, which reduces compile-time guarantees that required fields (e.g., transitionEl, opened, onBeforeOpen, etc.) stay in sync with the helper’s expectations. Consider keeping the explicit implements with the new generic open prop key.
export class Dialog extends LitElement {

@jcfranco
jcfranco requested a lite review from Copilot August 28, 2026 18:00
@jcfranco
jcfranco marked this pull request as ready for review August 28, 2026 18:01
@jcfranco
jcfranco requested a review from benelan as a code owner August 28, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

packages/components/src/utils/dom.browser.spec.tsx:1

  • h is imported but not used in this test file, which can trigger lint/TS noUnusedLocals failures.

Comment thread packages/components/src/components/slider/slider.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 46 out of 46 changed files in this pull request and generated no new comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

packages/components/src/tests/commonTests/browser/internal-label.ts:89

  • blocking: messages is captured once (const { messages } = t9nComponent) and then polled inside the interval. If the t9n controller replaces t9nComponent.messages during loading (e.g., swapping in the resolved bundle), this loop will keep checking the stale object and can hang the test. Re-read t9nComponent.messages inside the interval (or avoid destructuring) so the latest _loading flag is observed.

@jcfranco
jcfranco requested a review from anveshmekala August 28, 2026 23:07
@jcfranco
jcfranco force-pushed the jcfranco/enable-no-implicit-any-on-components branch from df78136 to ca945c1 Compare August 29, 2026 08:00
@jcfranco
jcfranco changed the base branch from dev to jcfranco/15100-restore-space-between-tile-content-top-and-bottom August 29, 2026 08:27
@jcfranco
jcfranco force-pushed the jcfranco/enable-no-implicit-any-on-components branch from ca945c1 to c3fc5f2 Compare August 29, 2026 08:32
Base automatically changed from jcfranco/15100-restore-space-between-tile-content-top-and-bottom to dev August 31, 2026 16:51
@jcfranco
jcfranco force-pushed the jcfranco/enable-no-implicit-any-on-components branch from c3fc5f2 to 64429c0 Compare August 31, 2026 16:51
@jcfranco
jcfranco requested a review from a team August 31, 2026 18:15

@driskull driskull left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice!

@jcfranco
jcfranco merged commit dd24ab5 into dev Sep 1, 2026
12 checks passed
@jcfranco
jcfranco deleted the jcfranco/enable-no-implicit-any-on-components branch September 1, 2026 15:55
benelan added a commit that referenced this pull request Sep 1, 2026
* origin/dev: (47 commits)
  refactor(useFormTrigger): move void controller to constructor (#15108)
  refactor(slider): use refs instead of DOM queries (#15096)
  test(slider): migrate tests to browser mode (#15095)
  refactor: enable `noImplicitAny` (#15027)
  chore: release next
  feat(block): add background color token (#15099)
  fix(tile): restore top/bottom slot spacing (#15101)
  build(deps): update dependency eslint to v10.9.1 (#15036)
  build(deps): update dependency eslint-plugin-storybook to v10.5.10 (#14807)
  build(deps): update dependency @eslint-react/eslint-plugin to v5.18.6 (#14722)
  build(deps): update dependency eslint-plugin-perfectionist to v5.10.1 (#14801)
  build(deps): update dependency @eslint-react/kit to v5.18.6 (#14723)
  refactor: apply `transition-default` mixin (#8851)
  chore: release next
  feat(block): deprecate `collapsible` in favor of `expandable` (#15091)
  chore: release next
  style(radio-button-group): apply linter fixes (#15085)
  fix(radio-button-group): sync group `disabled` only when set (#15084)
  refactor: derive a shared commonTests helper for scale propagation (#15073)
  chore: release next
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Issues tied to code that needs to be significantly reworked. skip visual snapshots Pull requests that do not need visual regression testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants