fix: 调优 Biome lint 规则,关闭 formatter 避免大规模代码变更

- 关闭 formatter 和 organizeImports(保持原始代码风格,减少 git diff)
- lint/format script 改为 biome lint(只做规则检查)
- 新增关闭规则:noConsole, noArrayIndexKey, noConfusingLabels,
  useIterableCallbackReturn, noVoidTypeReturn, noConstantCondition,
  noUnusedFunctionParameters, noUselessEmptyExport, useArrowFunction,
  useLiteralKeys, useImportType, useNodejsImportProtocol
- 零源码改动,仅调整配置文件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-01 07:34:29 +08:00
parent c6491372d0
commit 30e863c9b8
4 changed files with 25 additions and 17 deletions

View File

@@ -8,14 +8,14 @@ if [ -z "$STAGED_FILES" ]; then
exit 0
fi
echo "Running Biome check on staged files..."
echo "Running Biome lint on staged files..."
# 使用 biome check 对暂存文件进行检查(仅 lint不自动修复
echo "$STAGED_FILES" | xargs bunx biome check --no-errors-on-unmatched
# 使用 biome lint 对暂存文件进行检查(仅 lint格式化,不自动修复)
echo "$STAGED_FILES" | xargs bunx biome lint --no-errors-on-unmatched
if [ $? -ne 0 ]; then
echo ""
echo "Biome check failed. Fix errors or use --no-verify to bypass."
echo "Biome lint failed. Fix errors or use --no-verify to bypass."
exit 1
fi