From 8b9645dcd7e02418c0eb2435b0a3e2cb02c29e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E5=BF=86=E5=A4=A9=E5=A0=82?= <1455668754@qq.com> Date: Mon, 31 Aug 2026 17:20:33 +0800 Subject: [PATCH] =?UTF-8?q?chore(eslint-config):=20=E5=85=B3=E9=97=AD=20pe?= =?UTF-8?q?rfectionist=20=E8=AF=AD=E4=B9=89=E6=8E=92=E5=BA=8F=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关闭 sort-enums、sort-interfaces、sort-switch-case 和 sort-object-types,允许枚举成员、interface/type 成员及 switch 分支 按语义或数值顺序(如状态码按码值)排列,而非强制字母序。 --- .../lint-configs/eslint-config/src/configs/perfectionist.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts index cb8c98c3a..3665065e0 100644 --- a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts +++ b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts @@ -11,6 +11,9 @@ export async function perfectionist(): Promise { perfectionistPlugin.configs['recommended-natural'], { rules: { + 'perfectionist/sort-enums': 'off', + 'perfectionist/sort-interfaces': 'off', + 'perfectionist/sort-switch-case': 'off', 'perfectionist/sort-exports': [ 'error', { @@ -85,6 +88,7 @@ export async function perfectionist(): Promise { type: 'natural', }, ], + 'perfectionist/sort-object-types': 'off', 'perfectionist/sort-objects': [ 'off', {