Skip to content

Sort null, undefined and void in union types#34142

Merged
Raushen merged 5 commits into
DevExpress:26_1from
Raushen:Linter-null-type
Jun 29, 2026
Merged

Sort null, undefined and void in union types#34142
Raushen merged 5 commits into
DevExpress:26_1from
Raushen:Linter-null-type

Conversation

@Raushen

@Raushen Raushen commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Raushen Raushen self-assigned this Jun 26, 2026
@Raushen Raushen requested review from a team and Copilot June 26, 2026 11:54
@Raushen Raushen requested review from a team as code owners June 26, 2026 11:54
@Raushen Raushen added the 26_1 label Jun 26, 2026
@github-actions github-actions Bot added the .d.ts label Jun 26, 2026

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

This pull request introduces an ESLint rule to enforce consistent ordering of “nullish” members in TypeScript union types (primarily for .d.ts files), and updates existing declaration files to comply with that rule across the DevExtreme type surface (including the generated dx.all.d.ts bundle and framework wrapper typings).

Changes:

  • Added eslint-plugin-perfectionist to the workspace and packages/devextreme, and enabled perfectionist/sort-union-types for js/**/*.d.ts.
  • Reordered union types in multiple .d.ts files to place null/undefined (and related “void” cases) at the end.
  • Propagated the updated type ordering into the Angular TreeList wrapper typings (itemsExpr).

Reviewed changes

Copilot reviewed 4 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-workspace.yaml Adds eslint-plugin-perfectionist to the shared catalog for consistent dependency management.
pnpm-lock.yaml Locks the newly added ESLint plugin (and its transitive deps) for reproducible installs.
packages/devextreme/package.json Adds eslint-plugin-perfectionist as a devDependency used by the package ESLint config.
packages/devextreme/eslint.config.mjs Enables perfectionist/sort-union-types for js/**/*.d.ts to enforce nullish union ordering.
packages/devextreme/js/common/charts.d.ts Reorders unions (notably image/url) so undefined appears at the end.
packages/devextreme/js/viz/polar_chart.d.ts Reorders unions so undefined is placed at the end for relevant members.
packages/devextreme/js/common/grids.d.ts Reorders union return type to keep ordering consistent (`PromiseLike
packages/devextreme/js/ui/card_view.d.ts Reorders union return type for setFieldValue for consistent union ordering.
packages/devextreme/js/ui/tree_list.d.ts Reorders itemsExpr callback parameter union to move undefined to the end.
packages/devextreme/js/ui/chat.d.ts Reorders unions so null is placed at the end for template options.
packages/devextreme/js/format_helper.d.ts Reorders the format() input union to keep nullish types at the end.
packages/devextreme/js/core/utils/type.d.ts Reorders isPrimitive type guard union to move nullish types to the end.
packages/devextreme/js/core/renderer.d.ts Reorders renderer() parameter union for consistent type ordering.
packages/devextreme/js/core/index.d.ts Reorders Scalar union to place `undefined
packages/devextreme/ts/dx.all.d.ts Regenerates/updates the consolidated typings to reflect the new union ordering.
packages/devextreme-angular/src/ui/tree-list/index.ts Aligns Angular wrapper itemsExpr typings with the updated core declaration signature.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Copilot AI review requested due to automatic review settings June 26, 2026 12:28
@Raushen Raushen requested a review from a team as a code owner June 26, 2026 12:28

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 45 out of 58 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/devextreme/eslint.config.mjs
@Raushen Raushen closed this Jun 26, 2026
@Raushen Raushen reopened this Jun 26, 2026
@Raushen Raushen changed the title Sort null, undefined and void types Sort null, undefined and void in union types Jun 26, 2026
anna-shakhova
anna-shakhova previously approved these changes Jun 26, 2026
marker-dao
marker-dao previously approved these changes Jun 26, 2026
pharret31
pharret31 previously approved these changes Jun 26, 2026
…Linter-null-type

# Conflicts:
#	pnpm-lock.yaml
Copilot AI review requested due to automatic review settings June 26, 2026 14:45
@Raushen Raushen dismissed stale reviews from pharret31, marker-dao, and anna-shakhova via cc39441 June 26, 2026 14:45

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 45 out of 58 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

@Raushen Raushen enabled auto-merge June 29, 2026 08:54
@Raushen Raushen added this pull request to the merge queue Jun 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 29, 2026
@Raushen Raushen added this pull request to the merge queue Jun 29, 2026
Merged via the queue into DevExpress:26_1 with commit 2da1e15 Jun 29, 2026
105 of 106 checks passed
@Raushen Raushen deleted the Linter-null-type branch June 29, 2026 09:53
Raushen added a commit to Raushen/DevExtreme that referenced this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants