From 80e1bc87bc3d39b6f39f2d90a8dd78306d59bd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <7971419+crazyair@users.noreply.github.com> Date: Tue, 22 Aug 2023 13:11:18 +0800 Subject: [PATCH] style: remove importOrderSeparation from prettier config (#44336) --- .dumi/theme/builtins/Previewer/Previewer.tsx | 3 ++- .prettierrc | 6 ++---- package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.dumi/theme/builtins/Previewer/Previewer.tsx b/.dumi/theme/builtins/Previewer/Previewer.tsx index a37144956f..fb23c55e0f 100644 --- a/.dumi/theme/builtins/Previewer/Previewer.tsx +++ b/.dumi/theme/builtins/Previewer/Previewer.tsx @@ -1,6 +1,7 @@ +import React from 'react'; import type { IPreviewerProps } from 'dumi'; import { useTabMeta } from 'dumi'; -import React from 'react'; + import CodePreviewer from './CodePreviewer'; import DesignPreviewer from './DesignPreviewer'; diff --git a/.prettierrc b/.prettierrc index d1c91d8d04..73e7db810c 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,10 +4,8 @@ "trailingComma": "all", "printWidth": 100, "proseWrap": "never", - "importOrder": ["^(react|react-dom)$", "^([a-z]|@[a-z])", ".*"], - "importOrderSeparation": true, - "importOrderSortSpecifiers": true, - "plugins": ["@trivago/prettier-plugin-sort-imports"], + "importOrder": ["^(react|react-dom)$", "^([a-z]|@[a-z])", "", ".*"], + "plugins": ["@ianvs/prettier-plugin-sort-imports"], "overrides": [ { "files": ".prettierrc", diff --git a/package.json b/package.json index 77b4966344..0a13a017ca 100644 --- a/package.json +++ b/package.json @@ -172,6 +172,7 @@ "@dnd-kit/utilities": "^3.2.1", "@emotion/react": "^11.10.4", "@emotion/server": "^11.4.0", + "@ianvs/prettier-plugin-sort-imports": "^4.1.0", "@qixian.cs/github-contributors-list": "^1.1.0", "@size-limit/file": "^8.1.0", "@stackblitz/sdk": "^1.3.0", @@ -181,7 +182,6 @@ "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.2", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/fs-extra": "^11.0.1", "@types/gtag.js": "^0.0.13", "@types/http-server": "^0.12.1",