DeadCode
Detects and removes unused exports, dead routes, orphaned CSS, and unreferenced components in TypeScript, React, and Next.js projects to reduce bundle size and improve code quality.
DeadCode is a powerful CLI tool designed to enhance the quality and efficiency of TypeScript, React, and Next.js applications by identifying and eliminating various forms of dead code. It performs comprehensive static analysis to pinpoint unused exports, unreachable Next.js routes, unreferenced React components, and orphaned CSS classes. With features like safe auto-removal via a dry-run preview, monorepo support, and CI integration, DeadCode helps developers maintain leaner, more performant codebases and prevent code rot over time.
Características Principales
01Orphaned CSS detection for unreferenced CSS module classes.
02Unused export detection across functions, types, classes, interfaces, enums, and consts.
03Dead route detection for unreachable Next.js App Router page components.
04Safe auto-removal with a `--dry-run` preview mode.
05CI/CD integration with machine-readable JSON output and configurable fail thresholds.
063 GitHub stars
Casos de Uso
01Reducing application bundle size and improving runtime performance.
02Automating code quality checks and dead code removal in CI/CD pipelines.
03Cleaning up legacy codebases and ensuring code maintainability.