From f9673379d7bc31607bed06c308aa85799c8a91ac Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 5 May 2026 19:00:54 -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 b350e1c..26fca6a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ node_modules dist dist-ssr *.local +.eslintcache +.tsbuildinfo .ai/ yarn.lock diff --git a/eslint.config.js b/eslint.config.js index 6c03fc3..3aaab50 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -9,7 +9,7 @@ import htmlEslint from "@html-eslint/eslint-plugin"; import customRules from "./eslint-rules/index.js"; export default defineConfig( - globalIgnores(["dist"]), + globalIgnores(["dist", ".agents"]), { name: "app/ts", files: ["**/*.{ts,tsx}"], diff --git a/package.json b/package.json index f55381a..6488d86 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!'" }, "dependencies": { "@nostrify/nostrify": "^0.52.0", diff --git a/tsconfig.json b/tsconfig.json index 70b8913..fd4b962 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,10 @@ /* Linting */ "strict": true, + /* Incremental compilation for faster re-runs of `tsc --noEmit` */ + "incremental": true, + "tsBuildInfoFile": "./.tsbuildinfo", + "paths": { "@/*": ["./src/*"] }