eslint-deprecation-counter
v0.0.8
Published
A CLI tool to detect and count deprecated API usage in your TypeScript and JavaScript projects using ESLint
Maintainers
Readme
eslint-deprecation-counter 
A CLI tool to detect and count deprecated API usage in your TypeScript and JavaScript projects using ESLint.
Features
- Detects deprecated code in
.ts,.tsx,.js, and.jsxfiles. - Customizable file patterns and ignore patterns.
- Outputs a JSON summary of deprecation counts.
- Supports TypeScript type-level deprecation detection.
Installation
Run directly using npx:
npx eslint-deprecation-counterUsage
Run the command in your project's root directory:
npx eslint-deprecation-counterEnvironment Variables
LINT_FILES: Override the default file pattern (./**/*.{ts,tsx}) to specify files to lint.Example:
LINT_FILES='./src/**/*.{js,ts,tsx}' npx eslint-deprecation-counterIGNORE_PATTERNS: Customize ignore patterns (comma-separated). Defaults to"**/node_modules/**,.git/**".Example:
IGNORE_PATTERNS="**/dist/**,**/build/**" npx eslint-deprecation-counterCI: When set, optimizes ESLint's caching strategy for CI environments.
TypeScript Support
To detect deprecations in TypeScript declaration files (.d.ts) and type-level deprecations, ensure you have a tsconfig.json file in your project's root.
Example Output
{
"'oldFunction' is deprecated.": 3,
"'legacyAPI' is deprecated.": 1
}