mirror of
https://github.com/langgenius/dify.git
synced 2026-09-05 00:31:19 +08:00
Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: fatelei <fatelei@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: 姜涵煦 <hanxujiang@jianghanxudeMacBook-Pro-2.local> Co-authored-by: L1nSn0w <l1nsn0w@qq.com> Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
64 lines
1.8 KiB
TypeScript
64 lines
1.8 KiB
TypeScript
import type { KnipConfig } from 'knip'
|
|
|
|
/**
|
|
* @see https://knip.dev/reference/configuration
|
|
*/
|
|
const config: KnipConfig = {
|
|
compilers: {
|
|
mdx: true,
|
|
},
|
|
workspaces: {
|
|
web: {
|
|
entry: [
|
|
'scripts/**/*.{js,ts,mjs}',
|
|
'bin/**/*.{js,ts,mjs}',
|
|
'tsslint.config.ts',
|
|
'dev-proxy.config.ts',
|
|
'plugins/eslint/index.js',
|
|
// Public surface consumed by the standalone Marketplace host.
|
|
// The `!` suffix keeps these entries in `knip --production`.
|
|
'app/components/plugins/marketplace/standalone/server.ts!',
|
|
'app/components/plugins/marketplace/standalone/client.ts!',
|
|
],
|
|
project: [
|
|
'**/*.{js,mjs,cjs,jsx,ts,tsx,mts,cts,css,mdx}!',
|
|
'!**/__mocks__/**!',
|
|
'!**/__tests__/**!',
|
|
'!**/*.stories.{js,jsx,ts,tsx,mdx}!',
|
|
'!.storybook/**!',
|
|
'!plugins/**!',
|
|
'!test/**!',
|
|
'!vitest.browser.setup.ts!',
|
|
'!vitest.setup.ts!',
|
|
],
|
|
ignore: ['public/**'],
|
|
ignoreFiles: [
|
|
'features/agent-v2/agent-detail/configure/components/orchestrate/memory.tsx',
|
|
'features/agent-v2/agent-detail/configure/components/orchestrate/prompt-editor/option-menu.tsx',
|
|
'i18n-config/locale-resources/*.ts',
|
|
],
|
|
ignoreDependencies: ['@iconify-json/*', '@storybook/addon-onboarding'],
|
|
},
|
|
},
|
|
/// keep-sorted
|
|
rules: {
|
|
binaries: 'warn',
|
|
catalog: 'error',
|
|
dependencies: 'error',
|
|
devDependencies: 'warn',
|
|
duplicates: 'error',
|
|
enumMembers: 'error',
|
|
exports: 'error',
|
|
files: 'error',
|
|
namespaceMembers: 'error',
|
|
nsExports: 'error',
|
|
nsTypes: 'error',
|
|
optionalPeerDependencies: 'error',
|
|
types: 'error',
|
|
unlisted: 'error',
|
|
unresolved: 'error',
|
|
},
|
|
}
|
|
|
|
export default config
|