2024-04-08 11:04:40 +01:00
|
|
|
import { KnipConfig } from "knip";
|
|
|
|
|
|
2026-04-17 14:00:21 +01:00
|
|
|
// Specify this as knip loads config files which may conditionally add reporters, e.g. `vitest-sonar-reporter'
|
|
|
|
|
process.env.GITHUB_ACTIONS = "1";
|
|
|
|
|
|
2024-04-08 11:04:40 +01:00
|
|
|
export default {
|
|
|
|
|
entry: [
|
|
|
|
|
"src/index.ts",
|
|
|
|
|
"src/types.ts",
|
|
|
|
|
"src/browser-index.ts",
|
|
|
|
|
"src/indexeddb-worker.ts",
|
2025-01-23 15:41:29 +00:00
|
|
|
"src/crypto-api/index.ts",
|
|
|
|
|
"src/testing.ts",
|
|
|
|
|
"src/matrix.ts",
|
2025-05-09 11:16:35 +01:00
|
|
|
"src/utils.ts", // not really an entrypoint but we have deprecated `defer` there
|
2024-04-08 11:04:40 +01:00
|
|
|
"scripts/**",
|
|
|
|
|
"spec/**",
|
2025-01-23 15:41:29 +00:00
|
|
|
// XXX: these should be re-exported by one of the supported exports
|
|
|
|
|
"src/matrixrtc/index.ts",
|
|
|
|
|
"src/sliding-sync.ts",
|
|
|
|
|
"src/webrtc/groupCall.ts",
|
|
|
|
|
"src/webrtc/stats/media/mediaTrackStats.ts",
|
|
|
|
|
"src/rendezvous/RendezvousChannel.ts",
|
2024-04-08 11:04:40 +01:00
|
|
|
],
|
|
|
|
|
project: ["**/*.{js,ts}"],
|
|
|
|
|
ignore: ["examples/**"],
|
|
|
|
|
ignoreDependencies: [
|
|
|
|
|
// Required for `action-validator`
|
|
|
|
|
"@action-validator/*",
|
|
|
|
|
// Used for git pre-commit hooks
|
|
|
|
|
"husky",
|
|
|
|
|
// Used in script which only runs in environment with `@octokit/rest` installed
|
|
|
|
|
"@octokit/rest",
|
|
|
|
|
],
|
|
|
|
|
ignoreBinaries: [
|
|
|
|
|
// Used when available by reusable workflow `.github/workflows/release-make.yml`
|
|
|
|
|
"dist",
|
|
|
|
|
],
|
|
|
|
|
ignoreExportsUsedInFile: true,
|
2025-01-23 15:41:29 +00:00
|
|
|
includeEntryExports: false,
|
|
|
|
|
exclude: ["enumMembers"],
|
2024-04-08 11:04:40 +01:00
|
|
|
} satisfies KnipConfig;
|