Skip to content

Commit e29600d

Browse files
committed
Fix knip configuration for SWC dependencies
Add @swc/core and swc-loader to ignoreDependencies and include swc.config.js as entry point to prevent knip from marking them as unused. Fixes lint CI failure.
1 parent 90406e0 commit e29600d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

knip.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ const config: KnipConfig = {
3838
// This is an optional peer dependency because users without RSC don't need it
3939
// but Knip doesn't like such dependencies to be referenced directly in code
4040
'react-on-rails-rsc',
41+
// SWC transpiler dependencies used in dummy apps
42+
'@swc/core',
43+
'swc-loader',
4144
],
4245
},
4346

@@ -97,6 +100,8 @@ const config: KnipConfig = {
97100
'config/webpack/{production,development,test}.js',
98101
// Declaring this as webpack.config instead doesn't work correctly
99102
'config/webpack/webpack.config.js',
103+
// SWC configuration for Shakapacker
104+
'config/swc.config.js',
100105
],
101106
ignore: ['**/app-react16/**/*'],
102107
project: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}!', 'config/webpack/*.js'],

0 commit comments

Comments
 (0)