Просмотр исходного кода

Use pnpm instead of npx and add --unsafe flag for Biome

- Changed from npx to pnpm biome in lefthook.yml (project uses pnpm)
- Added --unsafe flag to apply safe fixes as per Biome official docs
- Configured pnpm to only build lefthook dependency (not other deps)

Co-authored-by: yuki-takei <1638767+yuki-takei@users.noreply.github.com>
copilot-swe-agent[bot] 2 месяцев назад
Родитель
Сommit
6cef1e82df
2 измененных файлов с 15 добавлено и 2 удалено
  1. 1 1
      lefthook.yml
  2. 14 1
      package.json

+ 1 - 1
lefthook.yml

@@ -6,5 +6,5 @@ pre-commit:
   commands:
   commands:
     biome-format:
     biome-format:
       glob: "*.{js,jsx,ts,tsx,json,jsonc}"
       glob: "*.{js,jsx,ts,tsx,json,jsonc}"
-      run: npx biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
+      run: pnpm biome check --write --unsafe --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
       stage_fixed: true
       stage_fixed: true

+ 14 - 1
package.json

@@ -103,7 +103,20 @@
       "@lykmapipo/common>flat": "5.0.2",
       "@lykmapipo/common>flat": "5.0.2",
       "@lykmapipo/common>mime": "3.0.0",
       "@lykmapipo/common>mime": "3.0.0",
       "@lykmapipo/common>parse-json": "5.2.0"
       "@lykmapipo/common>parse-json": "5.2.0"
-    }
+    },
+    "ignoredBuiltDependencies": [
+      "@swc/core",
+      "core-js",
+      "dtrace-provider",
+      "esbuild",
+      "leveldown",
+      "protobufjs",
+      "puppeteer",
+      "ttf2woff2"
+    ],
+    "onlyBuiltDependencies": [
+      "lefthook"
+    ]
   },
   },
   "engines": {
   "engines": {
     "node": "^18 || ^20"
     "node": "^18 || ^20"