From 65788705c3f02078391ff0a19575dcaa4970b758 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 5 May 2026 19:00:53 -0500 Subject: [PATCH] Speed up npm run test with eslint/tsc caching Ignore .agents skill bundles from eslint (template files not part of the build), enable eslint --cache and tsc --incremental so warm re-runs skip unchanged files. --- .gitignore | 2 ++ eslint.config.js | 2 +- package.json | 2 +- tsconfig.json | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 412ad3b0..6d940b8d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ node_modules dist dist-ssr *.local +.eslintcache +.tsbuildinfo yarn.lock deploy.sh diff --git a/eslint.config.js b/eslint.config.js index a809dc32..7efa2132 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -8,7 +8,7 @@ import htmlParser from "@html-eslint/parser"; import customRules from "./eslint-rules/index.js"; export default tseslint.config( - { ignores: ["dist", "android", "ios"] }, + { ignores: ["dist", "android", "ios", ".agents"] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ["**/*.{ts,tsx}"], diff --git a/package.json b/package.json index 26fb6bc3..d88dffee 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "npm i --silent && vite", "build": "npm i --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'Project built successfully!'", - "test": "npm i --silent && tsc --noEmit && eslint && vitest run --reporter=dot --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'All tests passed!'", + "test": "npm i --silent && tsc --noEmit && eslint --cache && vitest run --reporter=dot --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'All tests passed!'", "cap:sync": "npx cap sync && node scripts/patch-cap-config.mjs", "keygen": "keytool -genkey -v -keystore android/app/my-upload-key.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias upload", "icons": "bash scripts/generate-icons.sh" diff --git a/tsconfig.json b/tsconfig.json index 8749c5ef..c3acb85e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,10 @@ "noImplicitAny": false, "noFallthroughCasesInSwitch": false, + /* Incremental compilation for faster re-runs of `tsc --noEmit` */ + "incremental": true, + "tsBuildInfoFile": "./.tsbuildinfo", + "baseUrl": ".", "paths": { "@/*": ["./src/*"]