diff --git a/knip.ts b/knip.ts index 2e962f87e2..f3e8040d8a 100644 --- a/knip.ts +++ b/knip.ts @@ -13,9 +13,9 @@ export default { ignore: ['scripts/prepack.js'], // Strict mode excludes optional dependencies. Read the declared names // so removing a declaration still causes an unlisted dependency error. - ignoreDependencies: Object.keys( - angularQuery.optionalDependencies ?? {}, - ).map((dependency) => `${dependency}!`), + ignoreDependencies: Object.keys(angularQuery.optionalDependencies).map( + (dependency) => `${dependency}!`, + ), }, 'packages/query-codemods': { entry: ['src/v4/**/*.cjs', 'src/v5/**/*.cjs'], diff --git a/tsconfig.json b/tsconfig.json index 22bbf5db63..af8366184b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,5 +29,5 @@ "target": "ES2020", "types": ["node"] }, - "include": ["*.config.*"] + "include": ["*.config.*", "knip.ts"] }