From 569ee080e7903d29ee12e5b69b351074a964c778 Mon Sep 17 00:00:00 2001 From: oratis Date: Fri, 29 May 2026 23:48:38 +0800 Subject: [PATCH] chore(tooling): enforce lint in pre-commit + ignore Rust build output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eslint was scanning apps/desktop/src-tauri/target/ (generated Cargo JS), producing 49 spurious errors locally — CI only escaped because it lints before cargo build. Add target/ + release-artifacts/ to the ignore list, then wire `pnpm lint` into the pre-commit hook so lint regressions are caught before they land instead of only in CI. Co-Authored-By: Claude Opus 4.8 (1M context) --- .husky/pre-commit | 3 +++ eslint.config.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 6cc60ec..0987320 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,6 +4,9 @@ set -e +echo "▎ pre-commit: lint" +pnpm lint + echo "▎ pre-commit: typecheck" pnpm -r typecheck diff --git a/eslint.config.js b/eslint.config.js index 811a7b6..abf5eef 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -13,7 +13,9 @@ export default [ '**/dist/**', '**/dist-electron/**', '**/node_modules/**', + '**/target/**', // Rust/Cargo build output (generated JS in src-tauri/target) '**/.tsbuildinfo', + 'release-artifacts/**', 'apps/desktop/electron/**', // requires electron types — pending M6-rest ], },