Skip to content

Commit 59ae12c

Browse files
justin808claude
andcommitted
Update knip config to ignore Playwright-related dead code warnings
Added Router component files and dependencies to knip ignore lists since they are temporarily disabled due to react-router-dom v5/v6 mismatch. Also added CSS-related webpack loaders (css-loader, sass, sass-loader) to ignoreDependencies as they are used by webpack but not detected by knip's webpack plugin. Changes: - Ignore disabled Router component files - Ignore react-router-dom dependency - Ignore CSS/SASS webpack loaders - Add Playwright workflow file to entry points Note: Unlisted binaries warning for build:test and test:e2e in GitHub Actions workflows is expected since knip doesn't have a GHA plugin. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f808cc0 commit 59ae12c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

knip.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,19 @@ const config: KnipConfig = {
105105
// Playwright E2E test configuration and tests
106106
'e2e/playwright.config.js',
107107
'e2e/playwright/e2e/**/*.spec.js',
108+
// CI workflow files that reference package.json scripts
109+
'../../.github/workflows/playwright.yml',
108110
],
109111
ignore: [
110112
'**/app-react16/**/*',
111113
// Playwright support files and helpers - generated by cypress-on-rails gem
112114
'e2e/playwright/support/**',
115+
// Temporarily disabled RouterApp components due to react-router-dom version mismatch
116+
'client/app/components/RouterFirstPage.jsx',
117+
'client/app/components/RouterLayout.jsx',
118+
'client/app/components/RouterSecondPage.jsx',
119+
'client/app/routes/routes.jsx',
120+
'client/app/startup/RouterApp.*.jsx.skip',
113121
],
114122
project: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}!', 'config/webpack/*.js'],
115123
paths: {
@@ -134,15 +142,20 @@ const config: KnipConfig = {
134142
'node-libs-browser',
135143
// The below dependencies are not detected by the Webpack plugin
136144
// due to the config issue.
145+
'css-loader',
137146
'expose-loader',
138147
'file-loader',
139148
'imports-loader',
140149
'null-loader',
150+
'sass',
151+
'sass-loader',
141152
'sass-resources-loader',
142153
'style-loader',
143154
'url-loader',
144155
// Transitive dependency of shakapacker but listed as direct dependency
145156
'webpack-merge',
157+
// Temporarily disabled due to version mismatch (v5 installed but v6 expected)
158+
'react-router-dom',
146159
],
147160
},
148161
},

0 commit comments

Comments
 (0)