Skip to content

Commit e853b5d

Browse files
Update Knip configuration to exclude pro directory
1 parent e2e2b45 commit e853b5d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

knip.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ const config: KnipConfig = {
1919
'node_package/src/loadJsonFile.ts!',
2020
'eslint.config.ts',
2121
],
22-
project: ['node_package/src/**/*.[jt]s{x,}!', 'node_package/tests/**/*.[jt]s{x,}'],
22+
project: [
23+
'node_package/src/**/*.[jt]s{x,}!',
24+
'node_package/tests/**/*.[jt]s{x,}',
25+
'!react_on_rails_pro/**',
26+
],
2327
babel: {
2428
config: ['node_package/babel.config.js'],
2529
},
@@ -31,6 +35,8 @@ const config: KnipConfig = {
3135
'node_package/src/pro/ServerComponentFetchError.ts:isServerComponentFetchError',
3236
'node_package/src/pro/RSCRoute.tsx:RSCRouteProps',
3337
'node_package/src/pro/streamServerRenderedReactComponent.ts:StreamingTrackers',
38+
// Exclude entire pro directory - it has its own package.json with dependencies
39+
'react_on_rails_pro/**',
3440
],
3541
ignoreBinaries: [
3642
// Knip fails to detect it's declared in devDependencies
@@ -41,6 +47,8 @@ const config: KnipConfig = {
4147
ignoreDependencies: [
4248
// Required for TypeScript compilation, but we don't depend on Turbolinks itself.
4349
'@types/turbolinks',
50+
// Keep this even though knip doesn't detect usage
51+
'@babel/preset-typescript',
4452
// The Knip ESLint plugin fails to detect these are transitively required by a config,
4553
// though we don't actually use its rules anywhere.
4654
'@babel/eslint-parser',

0 commit comments

Comments
 (0)