pnpm fallow failed on 14 dead-code issues, 200 clone groups (4.3% >
3.0% threshold) and one cognitive-complexity breach. Changes:
- duplicates.ignore covers convention-mandated boilerplate only (test
files, stories, fixtures/factories/seeds, binders, symbols, feature
manifests, vitest configs, mock/repo twins, sentry init twins,
compliance emitters, rule-meta boilerplate) at threshold 3.0
- usedClassMembers: validateSession (interface-implemented, not yet
called); ignoreExports: Next's generateMetadata convention export +
the __getInstrumentationForTests test knob
- duplicate-exports off: client/server RSC twins export the same
component name by design
- @trpc/client + @trpc/react-query added to ignoreDependencies (peer
resolution for feature ./ui hooks); *.test.mjs marked dynamically
loaded (node:test files fallow saw as unreachable)
- delete packages/auth/src/ui/query.ts (empty export{} placeholder
shadowed by ui/index.ts, genuinely dead)
- extract checkDepTrace/decisionError from checkLibraryDecisions
(cognitive 32 > 30) — behavior unchanged, tests pass
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
110 lines
2.8 KiB
JSON
110 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json",
|
|
"ignorePatterns": [
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"**/.next/**",
|
|
"**/.turbo/**",
|
|
"**/storybook-static/**",
|
|
"**/__snapshots__/**",
|
|
"**/turbo/generators/templates/**",
|
|
"**/*.generated.ts",
|
|
"**/*.d.ts"
|
|
],
|
|
"dynamicallyLoaded": [
|
|
"packages/**/__factories__/**",
|
|
"packages/**/__seeds__/**",
|
|
"apps/**/instrumentation.ts",
|
|
"apps/**/instrumentation-client.ts",
|
|
"apps/storybook/test-runner.config.ts",
|
|
"scripts/**/*.mjs",
|
|
"turbo/generators/**/*.test.mjs"
|
|
],
|
|
"publicPackages": ["@repo/core-*"],
|
|
"ignoreDependencies": [
|
|
"@payloadcms/ui",
|
|
"sass",
|
|
"sharp",
|
|
"@tanstack/react-query",
|
|
"@trpc/server",
|
|
"superjson",
|
|
"@repo/blog",
|
|
"@repo/core-api",
|
|
"@repo/marketing-pages",
|
|
"@repo/navigation",
|
|
"@repo/core-testing",
|
|
"http-server",
|
|
"wait-on",
|
|
"@opentelemetry/api-logs",
|
|
"@typescript-eslint/eslint-plugin",
|
|
"@testing-library/user-event",
|
|
"zod",
|
|
"@eslint/js",
|
|
"@opentelemetry/sdk-node",
|
|
"@sentry/opentelemetry",
|
|
"@stryker-mutator/core",
|
|
"@stryker-mutator/vitest-runner",
|
|
"@trpc/client",
|
|
"@trpc/react-query"
|
|
],
|
|
"ignoreExportsUsedInFile": true,
|
|
"rules": {
|
|
"unused-files": "warn",
|
|
"unused-exports": "warn",
|
|
"unused-types": "off",
|
|
"unused-class-members": "warn",
|
|
"unused-dependencies": "warn",
|
|
"unused-dev-dependencies": "warn",
|
|
"unlisted-dependencies": "warn",
|
|
"circular-dependencies": "error",
|
|
"duplicate-code": "warn",
|
|
"duplicate-exports": "off"
|
|
},
|
|
"health": {
|
|
"maxCyclomatic": 25,
|
|
"maxCognitive": 30,
|
|
"maxCrap": 400
|
|
},
|
|
"usedClassMembers": ["validateSession"],
|
|
"duplicates": {
|
|
"ignore": [
|
|
"**/*.test.ts",
|
|
"**/*.test.tsx",
|
|
"**/*.stories.tsx",
|
|
"**/__fixtures__/**",
|
|
"**/__factories__/**",
|
|
"**/__seeds__/**",
|
|
"**/di/bind-production.ts",
|
|
"**/di/bind-dev-seed.ts",
|
|
"**/di/symbols.ts",
|
|
"**/integrations/api/**",
|
|
"**/ui/trpc.ts",
|
|
"**/feature.manifest.ts",
|
|
"**/vitest.config.ts",
|
|
"scripts/work/**",
|
|
"**/*.test.mjs",
|
|
"**/*.test.js",
|
|
"**/*.mock.ts",
|
|
"**/instrumentation/sentry/init-client*.ts",
|
|
"**/instrumentation/di/bind-*.ts",
|
|
"packages/core-eslint/rules/component-must-have-*.js",
|
|
"scripts/compliance/**",
|
|
"**/setup/no-instrumentation.ts",
|
|
"packages/core-eslint/rules/no-undeclared-*.js"
|
|
],
|
|
"minOccurrences": 2,
|
|
"minTokens": 70,
|
|
"threshold": 3.0
|
|
},
|
|
"ignoreExports": [
|
|
{
|
|
"file": "apps/cms/src/app/**/not-found.tsx",
|
|
"exports": ["generateMetadata"]
|
|
},
|
|
{
|
|
"file": "apps/web-next/src/server/bind-production.ts",
|
|
"exports": ["__getInstrumentationForTests"]
|
|
}
|
|
]
|
|
}
|