Skip to content

feat: rename sortTypeOnlyImports/sortTypeOnlyExports value none to inline - #885

Merged
dsherret merged 2 commits into
mainfrom
feat-sort-type-only-inline
Nov 4, 2026
Merged

dsherret merged 2 commits into
mainfrom
feat-sort-type-only-inline

Conversation

@dsherret

@dsherret dsherret commented Nov 4, 2026

Copy link
Copy Markdown
Member

Closes #671

Renames the none value of importDeclaration.sortTypeOnlyImports and exportDeclaration.sortTypeOnlyExports to inline, which describes what it does: type-only named imports and exports are sorted inline with the others.

none keeps working:

  • dprint config update rewrites "none" to "inline" in the config file.
  • A config that hasn't been updated still resolves none to inline, without a diagnostic (a diagnostic would stop formatting).
  • The schema lists inline and keeps none, described as deprecated, so existing configs still validate.

The resolved configuration serializes the value as "inline" and still deserializes "none".

For Rust users, NamedTypeImportsExportsOrder::None is renamed to NamedTypeImportsExportsOrder::Inline.

Tests

  • Unit tests in resolve_config.rs cover resolving each value (including none), the serde round trip, and which values dprint config update rewrites.
  • NamedImports_SortNamedTypeImports_Inline.txt and NamedExports_SortNamedTypeExports_Inline.txt use inline, and the existing _None.txt specs still use none.

@dsherret
dsherret added this pull request to stack #890 November 4, 2026 22:34
@dsherret
dsherret merged commit b7a3853 into main Nov 4, 2026
1 check passed
@dsherret
dsherret deleted the feat-sort-type-only-inline branch November 4, 2026 22:34
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.

Rename "importDeclaration.sortTypeOnlyImports": "none" to "inline"

1 participant