From 868972e889c2c88ea81f63d2dd3eb5a1dbbda22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Tue, 19 Aug 2025 16:24:04 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=9B=B4=E6=96=B0=20.editorconfig=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 扩展配置到更多文件类型,包括 CSS 预处理器文件 - 添加 end_of_line 和 max_line_length 设置 - 统一使用 LF 换行符 - 设置最大行长度为 120 字符 --- .editorconfig | 4 +++- {tests => e2e}/playwright/api-page.spec.ts | 0 {tests => e2e}/playwright/test-1.spec.ts | 0 eslint.config.ts | 2 +- package.json | 2 +- playwright.config.ts | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) rename {tests => e2e}/playwright/api-page.spec.ts (100%) rename {tests => e2e}/playwright/test-1.spec.ts (100%) diff --git a/.editorconfig b/.editorconfig index ecea360..60391f4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,8 @@ -[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}] +[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}] charset = utf-8 indent_size = 2 indent_style = space insert_final_newline = true trim_trailing_whitespace = true +end_of_line = lf +max_line_length = 120 diff --git a/tests/playwright/api-page.spec.ts b/e2e/playwright/api-page.spec.ts similarity index 100% rename from tests/playwright/api-page.spec.ts rename to e2e/playwright/api-page.spec.ts diff --git a/tests/playwright/test-1.spec.ts b/e2e/playwright/test-1.spec.ts similarity index 100% rename from tests/playwright/test-1.spec.ts rename to e2e/playwright/test-1.spec.ts diff --git a/eslint.config.ts b/eslint.config.ts index d170449..bfa0fd3 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -61,7 +61,7 @@ export default defineConfigWithVueTs( { ...pluginPlaywright.configs['flat/recommended'], - files: ['tests/playwright/**/*.{test,spec}.{js,ts,jsx,tsx}'], + files: ['e2e/playwright/**/*.{test,spec}.{js,ts,jsx,tsx}'], }, ...pluginOxlint.configs['flat/recommended'], skipFormatting, diff --git a/package.json b/package.json index 4494a4e..e846699 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "knip": "pnpm dlx knip" }, "lint-staged": { - "{src,tests/playwright}/**/*.{js,jsx,ts,tsx,vue}": [ + "{src,e2e/playwright}/**/*.{js,jsx,ts,tsx,vue}": [ "prettier --write", "eslint --fix", "oxlint --fix" diff --git a/playwright.config.ts b/playwright.config.ts index e412d1e..f0430aa 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -63,7 +63,7 @@ export default defineConfig({ reporter: 'html', /* Retry on CI only */ retries: process.env.CI ? 2 : 0, - testDir: './tests/playwright', + testDir: './e2e/playwright', /* Maximum time one test can run for. */ timeout: 30 * 1000, /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */