Skip to content

Commit

Permalink
chore: add 'lint:deps' script to check for unused and unlisted deps
Browse files Browse the repository at this point in the history
This uses knip (https://knip.dev) to check dependencies, in hopes of avoiding
issues like open-telemetry#2473. This adds 'npm run lint:deps' and adds that to the
existing 'npm run lint'.

This change includes fixes for a handful of unused and unlisted deps.
For now knip is configured to only check 'production' deps. Checking non-prod
deps results in way too many false positives.
  • Loading branch information
trentm committed Oct 10, 2024
1 parent 25ab243 commit 3f236e7
Show file tree
Hide file tree
Showing 12 changed files with 1,568 additions and 56 deletions.
11 changes: 11 additions & 0 deletions knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// https://knip.dev/reference/configuration
{
"$schema": "https://unpkg.com/knip@5/schema-jsonc.json",
"workspaces": {
"metapackages/auto-instrumentations-node": {
// Ensure register.ts is considered an entry-point (the `!` is to be
// included with the `--production` flag).
"entry": "src/register.ts!"
}
}
}
Loading

0 comments on commit 3f236e7

Please sign in to comment.