From 77038a8ef686a457898383cc18d119d60fb6ecb3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:51:33 +1100 Subject: [PATCH] build(ui): harden knip config, support @knipignore jsdoc tag --- invokeai/frontend/web/knip.ts | 16 ++-------------- invokeai/frontend/web/package.json | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/invokeai/frontend/web/knip.ts b/invokeai/frontend/web/knip.ts index f2057fa904..64c18e12bf 100644 --- a/invokeai/frontend/web/knip.ts +++ b/invokeai/frontend/web/knip.ts @@ -6,22 +6,10 @@ const config: KnipConfig = { 'src/app/store/middleware/debugLoggerMiddleware.ts', // Autogenerated types - shouldn't ever touch these 'src/services/api/schema.ts', + 'src/features/nodes/types/v1/**', + 'src/features/nodes/types/v2/**', ], ignoreBinaries: ['only-allow'], - rules: { - files: 'warn', - dependencies: 'warn', - unlisted: 'warn', - binaries: 'warn', - unresolved: 'warn', - exports: 'warn', - types: 'warn', - nsExports: 'warn', - nsTypes: 'warn', - enumMembers: 'warn', - classMembers: 'warn', - duplicates: 'warn', - }, }; export default config; diff --git a/invokeai/frontend/web/package.json b/invokeai/frontend/web/package.json index ad9663fc20..7848c52b92 100644 --- a/invokeai/frontend/web/package.json +++ b/invokeai/frontend/web/package.json @@ -24,7 +24,7 @@ "build": "pnpm run lint && vite build", "typegen": "node scripts/typegen.js", "preview": "vite preview", - "lint:knip": "knip", + "lint:knip": "knip --tags=-@knipignore", "lint:dpdm": "dpdm --no-warning --no-tree --transform --exit-code circular:1 src/main.tsx", "lint:eslint": "eslint --max-warnings=0 .", "lint:prettier": "prettier --check .",