From 1cf8087be022cd3e08d80f93f8be665c22f1fe44 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Tue, 12 Aug 2025 10:31:54 -0700 Subject: [PATCH] =?UTF-8?q?[ci]=20Optimize=20ESLint=20performance=20with?= =?UTF-8?q?=20caching=20and=20generated=20file=20excl=E2=80=A6=20(#4926)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Qwen-Coder --- .github/workflows/update-manager-types.yaml | 5 +++++ .github/workflows/update-registry-types.yaml | 5 +++++ .gitignore | 3 +++ eslint.config.js | 5 ++++- package.json | 5 +++-- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-manager-types.yaml b/.github/workflows/update-manager-types.yaml index 7b3a340ba..8768766c0 100644 --- a/.github/workflows/update-manager-types.yaml +++ b/.github/workflows/update-manager-types.yaml @@ -61,6 +61,11 @@ jobs: exit 1 fi + - name: Lint generated types + run: | + echo "Linting generated ComfyUI-Manager API types..." + npm run lint:no-cache -- --fix ./src/types/generatedManagerTypes.ts + - name: Check for changes id: check-changes run: | diff --git a/.github/workflows/update-registry-types.yaml b/.github/workflows/update-registry-types.yaml index 5382ae1ff..e44ef4e55 100644 --- a/.github/workflows/update-registry-types.yaml +++ b/.github/workflows/update-registry-types.yaml @@ -61,6 +61,11 @@ jobs: exit 1 fi + - name: Lint generated types + run: | + echo "Linting generated Comfy Registry API types..." + npm run lint:no-cache -- --fix ./src/types/comfyRegistryTypes.ts + - name: Check for changes id: check-changes run: | diff --git a/.gitignore b/.gitignore index b49947757..a5347cd65 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +# ESLint cache +.eslintcache + node_modules dist dist-ssr diff --git a/eslint.config.js b/eslint.config.js index 53ad76e3f..7479bb107 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -14,7 +14,10 @@ export default [ ignores: [ 'src/scripts/*', 'src/extensions/core/*', - 'src/types/vue-shim.d.ts' + 'src/types/vue-shim.d.ts', + // Generated files that don't need linting + 'src/types/comfyRegistryTypes.ts', + 'src/types/generatedManagerTypes.ts' ] }, { diff --git a/package.json b/package.json index d6393d4af..968daf2d0 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,9 @@ "test:component": "vitest run src/components/", "prepare": "husky || true", "preview": "vite preview", - "lint": "eslint src", - "lint:fix": "eslint src --fix", + "lint": "eslint src --cache", + "lint:fix": "eslint src --cache --fix", + "lint:no-cache": "eslint src", "knip": "knip", "locale": "lobe-i18n locale", "collect-i18n": "playwright test --config=playwright.i18n.config.ts",