From 154c4c1a5195eb4b992d43c9e3b24d03e64b144a Mon Sep 17 00:00:00 2001 From: CodiceFabbrica Date: Wed, 18 Mar 2026 16:41:54 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20:ferris=5Fwheel:=20=E9=85=8D=E7=BD=AE.ps1?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E7=BC=96=E7=A0=81=E5=8F=8A=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 7 ++++++- .gitattributes | 5 +++++ eslint.config.js | 1 + prettier.config.js | 7 +++++++ scripts/publish.ps1 | 4 ++-- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig index 0f06ecf..6a4f588 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,12 @@ root = true [*] charset = utf-8 indent_style = space -# indent_size = 2 +indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +[*.ps1] +charset = utf-8-bom +end_of_line = crlf +indent_size = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0663416 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Default: auto-detect +* text=auto eol=lf + +# PowerShell scripts must use CRLF +*.ps1 text eol=crlf diff --git a/eslint.config.js b/eslint.config.js index ccdc122..5ba222e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,6 +27,7 @@ export default [ "patches/", "wxcomponents/", "lib/", + "scripts/", ], languageOptions: { globals: { diff --git a/prettier.config.js b/prettier.config.js index 27575e1..ecfdfc1 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -24,5 +24,12 @@ export default { printWidth: 120, }, }, + { + files: ["*.ps1"], + options: { + endOfLine: "crlf", + tabWidth: 4, + }, + }, ], }; diff --git a/scripts/publish.ps1 b/scripts/publish.ps1 index ef77c1d..7a49cc8 100644 --- a/scripts/publish.ps1 +++ b/scripts/publish.ps1 @@ -1,4 +1,4 @@ -# 发布所有子包到私有 npm 仓库 +# 发布所有子包到私有 npm 仓库 # 使用方法: powershell scripts/publish.ps1 # 注意: 发布仓库地址使用各子包 package.json 中的 publishConfig.registry 配置 # 版本管理请先通过 pnpm release (standard-version) 完成,本脚本仅负责构建和发布 @@ -88,4 +88,4 @@ if ($push -eq "y" -or $push -eq "Y") { } Write-Host "" -Write-Host "🎉 所有包发布完成!版本: v$CURRENT_VERSION" -ForegroundColor Green \ No newline at end of file +Write-Host "🎉 所有包发布完成!版本: v$CURRENT_VERSION" -ForegroundColor Green