mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
## Summary Resolve all remaining knip issues — removes unused exports/types, adds missing direct dependencies, deletes dead code, and updates knip config. **Dependency fixes:** - Root: swapped unused `eslint-config-next`/`eslint-plugin-react-hooks` for actually-imported `@eslint/js`, `typescript-eslint`, `tslib` - App: added directly-used transitive deps (`@codemirror/*`, `react-resizable`, `postcss-simple-vars`, `rimraf`, `serve`, `@next/eslint-plugin-next`, `eslint-plugin-react`); removed unused `@storybook/react` **Dead code removal:** - Removed ~100 unused exports/types across api and app packages (removed `export` keyword where used locally, deleted entirely where not) - Fixed duplicate `DBRowTableIconButton` default+named export; updated consumers to use named import **knip.json updates:** - Added `fixtures.ts` entry point and `opamp/**` ignore for api package - Excluded `enumMembers` and `duplicates` issue types - Enabled `ignoreExportsUsedInFile` ### How to test locally or on Vercel 1. `yarn install && yarn knip` — should produce zero output 2. `make ci-lint` — all packages pass 3. `make ci-unit` — all unit tests pass
37 lines
1 KiB
JSON
37 lines
1 KiB
JSON
{
|
|
"$schema": "https://unpkg.com/knip@6/schema.json",
|
|
"workspaces": {
|
|
"packages/app": {
|
|
"entry": ["pages/**/*.{ts,tsx}", "scripts/*.js", "tests/e2e/**/*.ts"],
|
|
"project": ["src/**/*.{ts,tsx}", "pages/**/*.{ts,tsx}"],
|
|
"ignore": [".storybook/public/**"],
|
|
"ignoreDependencies": [
|
|
"eslint-config-next",
|
|
"@chromatic-com/storybook",
|
|
"@storybook/addon-themes"
|
|
]
|
|
},
|
|
"packages/api": {
|
|
"entry": [
|
|
"src/index.ts",
|
|
"src/tasks/index.ts",
|
|
"scripts/*.ts",
|
|
"src/fixtures.ts"
|
|
],
|
|
"project": ["src/**/*.ts"],
|
|
"ignoreDependencies": ["pino-pretty", "aws4"],
|
|
"ignore": ["src/opamp/**", "src/utils/logParser.ts"]
|
|
},
|
|
"packages/common-utils": {
|
|
"entry": ["src/**/*.ts", "!src/__tests__/**", "!src/**/*.test.*"],
|
|
"project": ["src/**/*.ts"]
|
|
}
|
|
},
|
|
"ignoreBinaries": ["make", "migrate", "playwright"],
|
|
"ignoreDependencies": [
|
|
"concurrently",
|
|
"dotenv",
|
|
"babel-plugin-react-compiler"
|
|
],
|
|
"exclude": ["enumMembers", "duplicates"]
|
|
}
|