A nodejs util to identify, track and mesure technical debt in a project.
Note that debt-collector is an alpha version and you should consider that bugs may occur and API may change without warnings. As debt-collector is a tool that does not interfere with your code base, even buggy, it is relatively safe to use. Considering the previous informations, we recomend to install a fixed version of debt-collector as of now.
- Node.js >= 18
- pnpm (recommended) or npm
- Git
- Clone the repository:
git clone https://github.com/gael-boyenval/debt-collector.git
cd debt-collector
- Install dependencies:
pnpm install
- Build the project:
pnpm build
- For development with watch mode:
pnpm dev
The project uses Vitest for testing. Available test commands:
- Run tests once:
pnpm test
- Run tests in watch mode:
pnpm test:watch
- Run tests with coverage:
pnpm test:coverage
To test the CLI locally during development:
- Link the package globally:
pnpm link --global
-
Now you can use the
debt-collector
command from anywhere to test your changes. -
To unlink when you're done:
pnpm unlink --global
debt-collector/
├── source/
│ ├── commands/ # CLI commands implementation
│ ├── components/ # React components for CLI UI
│ └── lib/ # Core library functionality
├── docs/ # Documentation
└── tests/ # Test files
The project uses:
- ESLint with XO React configuration
- Prettier for code formatting
- TypeScript for type safety
To lint your code:
pnpm lint
To create a production build:
pnpm build
The build output will be in the dist
directory.
- Create a new branch for your feature
- Make your changes
- Run tests and linting
- Submit a pull request
If you encounter any issues:
- Make sure you're using Node.js >= 18
- Clear your node_modules and reinstall dependencies:
rm -rf node_modules
pnpm install
- Check if the package is properly linked if testing locally:
which debt-collector