Skip to content

Commit 6948172

Browse files
[ci] Add caching support to format and knip commands (#5107)
- Enable caching for prettier and knip commands to improve CI performance - Add no-cache variants for consistency with existing lint scripts - Exclude generated type files from prettier formatting - Add .prettiercache to .gitignore for proper cache management Follows the same optimization pattern as ESLint caching from PR #4926.
1 parent 28d74be commit 6948172

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ bun.lockb
1313
pnpm-lock.yaml
1414
yarn.lock
1515

16-
# ESLint cache
16+
# Cache files
1717
.eslintcache
18+
.prettiercache
1819

1920
node_modules
2021
dist

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/types/comfyRegistryTypes.ts
2+
src/types/generatedManagerTypes.ts

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
"build:types": "vite build --config vite.types.config.mts && node scripts/prepare-types.js",
1515
"zipdist": "node scripts/zipdist.js",
1616
"typecheck": "vue-tsc --noEmit",
17-
"format": "prettier --write './**/*.{js,ts,tsx,vue,mts}'",
18-
"format:check": "prettier --check './**/*.{js,ts,tsx,vue,mts}'",
17+
"format": "prettier --write './**/*.{js,ts,tsx,vue,mts}' --cache",
18+
"format:check": "prettier --check './**/*.{js,ts,tsx,vue,mts}' --cache",
19+
"format:no-cache": "prettier --write './**/*.{js,ts,tsx,vue,mts}'",
20+
"format:check:no-cache": "prettier --check './**/*.{js,ts,tsx,vue,mts}'",
1921
"test:browser": "npx playwright test",
2022
"test:unit": "vitest run tests-ui/tests",
2123
"test:component": "vitest run src/components/",
@@ -25,7 +27,8 @@
2527
"lint:fix": "eslint src --cache --fix",
2628
"lint:no-cache": "eslint src",
2729
"lint:fix:no-cache": "eslint src --fix",
28-
"knip": "knip",
30+
"knip": "knip --cache",
31+
"knip:no-cache": "knip",
2932
"locale": "lobe-i18n locale",
3033
"collect-i18n": "playwright test --config=playwright.i18n.config.ts",
3134
"json-schema": "tsx scripts/generate-json-schema.ts",

0 commit comments

Comments
 (0)