mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
These files are only used by playwright.i18n.config.ts for the collect-i18n script. Knip doesn't recognize them as used since they're only referenced as string paths in the Playwright config.
89 lines
2.3 KiB
TypeScript
89 lines
2.3 KiB
TypeScript
import type { KnipConfig } from 'knip'
|
|
|
|
const config: KnipConfig = {
|
|
entry: [
|
|
'src/main.ts',
|
|
'vite.config.mts',
|
|
'vite.electron.config.mts',
|
|
'vite.types.config.mts',
|
|
'eslint.config.js',
|
|
'tailwind.config.js',
|
|
'postcss.config.js',
|
|
'playwright.config.ts',
|
|
'playwright.i18n.config.ts',
|
|
'vitest.config.ts',
|
|
'vitest.litegraph.config.ts',
|
|
'scripts/**/*.{js,ts}'
|
|
],
|
|
project: [
|
|
'src/**/*.{js,ts,vue}',
|
|
'tests-ui/**/*.{js,ts,vue}',
|
|
'browser_tests/**/*.{js,ts}',
|
|
'scripts/**/*.{js,ts}'
|
|
],
|
|
ignore: [
|
|
// Generated files
|
|
'dist/**',
|
|
'types/**',
|
|
'node_modules/**',
|
|
// Config files that might not show direct usage
|
|
'.husky/**',
|
|
// Temporary or cache files
|
|
'.vite/**',
|
|
'coverage/**',
|
|
// i18n config
|
|
'.i18nrc.cjs',
|
|
// Vitest litegraph config
|
|
'vitest.litegraph.config.ts',
|
|
// Test setup files
|
|
'browser_tests/globalSetup.ts',
|
|
'browser_tests/globalTeardown.ts',
|
|
'browser_tests/globalSetupWithI18n.ts',
|
|
'browser_tests/globalTeardownWithI18n.ts',
|
|
'browser_tests/i18nSetup.ts',
|
|
'browser_tests/utils/**',
|
|
// Scripts
|
|
'scripts/**',
|
|
// Vite config files
|
|
'vite.electron.config.mts',
|
|
'vite.types.config.mts',
|
|
// Auto generated manager types
|
|
'src/types/generatedManagerTypes.ts',
|
|
// Design system components (may not be used immediately)
|
|
'src/components/button/IconGroup.vue',
|
|
'src/components/button/MoreButton.vue',
|
|
'src/components/button/TextButton.vue',
|
|
'src/components/card/CardTitle.vue',
|
|
'src/components/card/CardDescription.vue',
|
|
'src/components/input/SingleSelect.vue'
|
|
],
|
|
ignoreExportsUsedInFile: true,
|
|
// Vue-specific configuration
|
|
vue: true,
|
|
// Only check for unused files, disable all other rules
|
|
// TODO: Gradually enable other rules - see https://github.com/Comfy-Org/ComfyUI_frontend/issues/4888
|
|
rules: {
|
|
binaries: 'off',
|
|
classMembers: 'off',
|
|
dependencies: 'off',
|
|
devDependencies: 'off',
|
|
duplicates: 'off',
|
|
enumMembers: 'off',
|
|
exports: 'off',
|
|
nsExports: 'off',
|
|
nsTypes: 'off',
|
|
types: 'off',
|
|
unlisted: 'off'
|
|
},
|
|
// Include dependencies analysis
|
|
includeEntryExports: true,
|
|
// Workspace configuration for monorepo-like structure
|
|
workspaces: {
|
|
'.': {
|
|
entry: ['src/main.ts', 'playwright.i18n.config.ts']
|
|
}
|
|
}
|
|
}
|
|
|
|
export default config
|