From 863ae93c24b465d14939ca2ffc5f616a64499884 Mon Sep 17 00:00:00 2001 From: Marco Comi <9998393+kin0992@users.noreply.github.com> Date: Sat, 8 Aug 2026 11:31:41 +0200 Subject: [PATCH] Enable sortImports by default in oxfmt config Alphabetically sorting imports alongside the existing package.json key sorting keeps import blocks consistent across consumers without manual upkeep. Reformatted infra/index.ts to comply with the new rule. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/sort-imports-oxfmt.md | 5 +++++ infra/index.ts | 2 +- packages/oxc-config/oxfmt.js | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/sort-imports-oxfmt.md diff --git a/.changeset/sort-imports-oxfmt.md b/.changeset/sort-imports-oxfmt.md new file mode 100644 index 0000000..8e675a5 --- /dev/null +++ b/.changeset/sort-imports-oxfmt.md @@ -0,0 +1,5 @@ +--- +'@kin0992/oxc-config': minor +--- + +Enable `sortImports` by default in the shared oxfmt config, alongside the already-enabled `sortPackageJson`. Import statements in JS/TS/TSX/JSX files are now automatically sorted. diff --git a/infra/index.ts b/infra/index.ts index 7d020ac..afb4bc3 100644 --- a/infra/index.ts +++ b/infra/index.ts @@ -1,5 +1,5 @@ -import * as pulumi from '@pulumi/pulumi'; import * as github from '@pulumi/github'; +import * as pulumi from '@pulumi/pulumi'; const cfg = new pulumi.Config('devToolkit'); const repoName = cfg.get('repoName') ?? 'dev-toolkit'; diff --git a/packages/oxc-config/oxfmt.js b/packages/oxc-config/oxfmt.js index 2d85547..34e81f1 100644 --- a/packages/oxc-config/oxfmt.js +++ b/packages/oxc-config/oxfmt.js @@ -9,6 +9,7 @@ export default { quoteProps: 'as-needed', objectWrap: 'preserve', proseWrap: 'preserve', + sortImports: true, sortPackageJson: true, ignorePatterns: [ 'dist/**',