Skip to content

chore(dashboard): enable useConsistentTypeDefinitions - #5447

Merged
robertkasza merged 1 commit into
mainfrom
chore/dashboard-consistent-type-definitions
Nov 25, 2026
Merged

robertkasza merged 1 commit into
mainfrom
chore/dashboard-consistent-type-definitions

Conversation

@robertkasza

@robertkasza robertkasza commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Checklist

  • No breaking changes
  • Tests pass (biome check, tsc --noEmit, Vitest on DataGrid.test.tsx; full suite left to CI)
  • New features have new tests (n/a)
  • Documentation is updated (n/a; the rule already exists in the JS design rules)
  • Title of the PR is in the correct format

Goal

The dashboard's JS design rules call for interface on object shapes and type on unions and other composite types, but no lint rule enforced it, so both styles coexisted. This branch makes Biome enforce the rule for the whole dashboard/ workspace and brings existing code into line. Nothing should change at runtime: the branch only touches types, lint config and one test type.

Type: Refactoring

Changes

  • Lint enforcement: dashboard/biome.json turns on style/useConsistentTypeDefinitions at error level with its default interface style. biome check now rejects any new type X = { ... } object alias. Union, intersection and function aliases are still allowed.
  • Codebase conversion: the rule's autofix turned 78 object aliases in 60 files into interface X { ... } declarations. Members, optional markers, JSDoc and exports are unchanged. Intersections that sit next to them, such as MetadataRemoteRelationship = RemoteRelationshipItem & {...}, stay type aliases. All touched files are ES modules, so the new interfaces can't merge with global declarations.
  • Index-signature compatibility: unlike object type aliases, interfaces get no implicit index signature. That broke MockDataDetails in DataGrid.test.tsx, which must satisfy TColumnData extends UnknownDataGridRow (Record<string, unknown>). It now declares extends UnknownDataGridRow. tsc --noEmit reports no other assignability breaks.

Key files

  • dashboard/biome.json (+1/-0): enables the rule.
  • dashboard/src/features/orgs/projects/storage/dataGrid/components/DataGrid/DataGrid.test.tsx (+3/-2): the only hand-written change, the index-signature fix.
  • dashboard/src/**, 59 files (+161/-151 total): mechanical alias-to-interface autofix, including 4 test files.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Vercel Deployment Info - dashboard

@robertkasza robertkasza self-assigned this Nov 24, 2026
@robertkasza
robertkasza force-pushed the chore/dashboard-consistent-type-definitions branch from 532ea7e to e65def2 Compare November 25, 2026 08:03
The JS design rules ask for interface for object shapes and type for
unions, but nothing enforced it. Enable Biome's
useConsistentTypeDefinitions (default style: interface) and apply its
fix, which converts 78 object type aliases in 60 files. Unions and
intersections are untouched.

Interfaces have no implicit index signature, so the DataGrid test's
MockDataDetails no longer fit UnknownDataGridRow; it now extends that
type.

Checks: biome check, tsc --noEmit, and Vitest on DataGrid.test.tsx.
The other changes are type-only.
@robertkasza
robertkasza force-pushed the chore/dashboard-consistent-type-definitions branch from e65def2 to fca9f80 Compare November 25, 2026 13:18
@robertkasza
robertkasza enabled auto-merge (squash) November 25, 2026 13:18
@robertkasza
robertkasza merged commit 0fbf21e into main Nov 25, 2026
10 checks passed
@robertkasza
robertkasza deleted the chore/dashboard-consistent-type-definitions branch November 25, 2026 13:54
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