check-deprecations
v1.0.1
Published
Check for usage of @deprecated JSDoc symbols in a file
Readme
check-deprecations
Scan a source file for usage of symbols marked @deprecated in their JSDoc. Outputs nothing and exits 0 when the file is clean; prints each hit and exits 1 when deprecated usage is found.
Relies on TypeScript's language service, so it understands type resolution, re-exports, and overloads — not just grep.
Installation
npm install -g check-deprecationsOr run without installing:
npx check-deprecations <file>Usage
check-deprecations <file>Exit codes
| Code | Meaning |
|------|---------|
| 0 | No deprecated usage |
| 1 | Deprecated usage found |
| 2 | Error (file not found, missing argument) |
Example
$ check-deprecations src/api/client.ts
src/api/client.ts:12:3 - 'sendRequest' is deprecated. Use 'fetch' instead.
sendRequest(url, opts);
src/api/client.ts:27:1 - The signature '(cb: Callback): void' of 'connect' is deprecated.
connect(handleResponse);If the file is clean, nothing is printed.
TypeScript / JavaScript support
The tool automatically looks for a tsconfig.json or jsconfig.json walking up from the target file and uses its compiler options. If none is found it defaults to allowJs + checkJs, so plain .js files work too.
Claude Code skill
This package ships a Claude Code skill at skills/check-deprecations/SKILL.md. Install it with dotagents:
npx @sentry/dotagents add poulet42/check-deprecationsOr declare it manually in agents.toml:
[[skills]]
name = "check-deprecations"
source = "poulet42/check-deprecations"Then run:
npx @sentry/dotagents installOnce installed, ask Claude to check a file for deprecated usage:
/check-deprecations src/api/client.ts