mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary Clean up stale knip configuration, upgrade to v6, and remove unused exports. ## Changes - **What**: Upgrade knip 5.75.1 → 6.0.1; remove 13 stale/redundant config entries; remove custom CSS compiler (replaced by v6 built-in); move CSS plugin deps to design-system package; fix husky pre-commit binary detection; remove 3 unused exports (`MaintenanceTaskRunner`, `ClipspaceDialog`, `Load3dService`) - **Dependencies**: knip ^5.75.1 → ^6.0.1; tailwindcss-primeui and tw-animate-css moved from root to packages/design-system ## Review Focus - The husky pre-commit change from `pnpm exec lint-staged` to `npx --no-install lint-staged` works around a knip script parser limitation ([knip#743](https://github.com/webpro-nl/knip/issues/743)) - knip v6 drops Node.js 18 support (requires ≥20.19.0) and removes `classMembers` issue type Co-authored-by: Amp <amp@ampcode.com>
77 lines
2.1 KiB
TypeScript
77 lines
2.1 KiB
TypeScript
import type { KnipConfig } from 'knip'
|
|
|
|
const config: KnipConfig = {
|
|
workspaces: {
|
|
'.': {
|
|
entry: [
|
|
'{build,scripts}/**/*.{js,ts}',
|
|
'src/assets/css/style.css',
|
|
'src/scripts/ui/menu/index.ts',
|
|
'src/types/index.ts',
|
|
'src/storybook/mocks/**/*.ts'
|
|
],
|
|
project: ['**/*.{js,ts,vue}', '*.{js,ts,mts}', '!.claude/**']
|
|
},
|
|
'apps/desktop-ui': {
|
|
entry: ['src/i18n.ts'],
|
|
project: ['src/**/*.{js,ts,vue}']
|
|
},
|
|
'packages/tailwind-utils': {
|
|
project: ['src/**/*.{js,ts}']
|
|
},
|
|
'packages/shared-frontend-utils': {
|
|
project: ['src/**/*.{js,ts}']
|
|
},
|
|
'packages/registry-types': {
|
|
project: ['src/**/*.{js,ts}']
|
|
},
|
|
'packages/ingest-types': {
|
|
project: ['src/**/*.{js,ts}']
|
|
}
|
|
},
|
|
ignoreBinaries: ['python3'],
|
|
ignoreDependencies: [
|
|
// Weird importmap things
|
|
'@iconify-json/lucide',
|
|
'@iconify/json',
|
|
'@primeuix/forms',
|
|
'@primeuix/styled',
|
|
'@primeuix/utils',
|
|
'@primevue/icons'
|
|
],
|
|
ignore: [
|
|
// Auto generated API types
|
|
'src/workbench/extensions/manager/types/generatedManagerTypes.ts',
|
|
'packages/ingest-types/src/zod.gen.ts',
|
|
// Used by stacked PR (feat/glsl-live-preview)
|
|
'src/renderer/glsl/useGLSLRenderer.ts',
|
|
// Workflow files contain license names that knip misinterprets as binaries
|
|
'.github/workflows/ci-oss-assets-validation.yaml',
|
|
// Pending integration in stacked PR
|
|
'src/components/sidebar/tabs/nodeLibrary/CustomNodesPanel.vue',
|
|
// Agent review check config, not part of the build
|
|
'.agents/checks/eslint.strict.config.js'
|
|
],
|
|
vite: {
|
|
config: ['vite?(.*).config.mts']
|
|
},
|
|
vitest: {
|
|
config: ['vitest?(.*).config.ts'],
|
|
entry: [
|
|
'**/*.{bench,test,test-d,spec}.?(c|m)[jt]s?(x)',
|
|
'**/__mocks__/**/*.[jt]s?(x)'
|
|
]
|
|
},
|
|
playwright: {
|
|
config: ['playwright?(.*).config.ts'],
|
|
entry: ['**/*.@(spec|test).?(c|m)[jt]s?(x)', 'browser_tests/**/*.ts']
|
|
},
|
|
tags: [
|
|
'-knipIgnoreUnusedButUsedByCustomNodes',
|
|
'-knipIgnoreUnusedButUsedByVueNodesBranch',
|
|
'-knipIgnoreUsedByStackedPR'
|
|
]
|
|
}
|
|
|
|
export default config
|