Thanks for your interest in contributing to Dead Code Hunter! This extension helps developers identify dead code, errors, and warnings in their VS Code projects, and we're excited to have you help make it even better.
-
Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/dead-code-hunter.git cd dead-code-hunter -
Install dependencies:
npm install
-
Build the extension:
npm run compile
-
Open the project in VS Code and press
F5to launch a new Extension Development Host window where you can test your changes.
src/extension.ts- Main extension entry pointsrc/test/- Test filespackage.json- Extension manifest and dependencieswebpack.config.js- Build configurationimages/- Extension assets and screenshots
Before creating a new issue, please search existing issues to avoid duplicates. When reporting a bug, include:
- VS Code version you're using
- Extension version
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots if helpful
- Error messages from the Developer Console (Help > Toggle Developer Tools)
We welcome feature suggestions! Please:
- Check if the feature has already been requested
- Explain the use case and why it would be valuable
- Consider how it fits with the extension's core purpose
- Be specific about the expected behavior
- Check existing issues and pull requests to avoid duplicate work
- For larger changes, consider opening an issue first to discuss the approach
- Make sure you understand the extension's architecture by reviewing the existing code
- We use TypeScript with strict mode enabled
- Follow the existing code formatting patterns
- Use ESLint for code quality - run
npm run lintbefore submitting - Write meaningful commit messages that explain what and why, not just what changed
- Keep functions focused and reasonably sized
- Add comments for complex logic, but prefer self-documenting code
-
Create a new branch from
main:git checkout -b feature/your-feature-name
-
Make your changes and test thoroughly:
- Test in multiple VS Code workspaces
- Verify the extension loads correctly
- Check that existing functionality still works
-
Update the CHANGELOG.md if your changes are user-facing
-
Run the linter and fix any issues:
npm run lint
-
Commit your changes with a clear message:
git commit -m "Add support for detecting unused imports in TypeScript files" -
Push to your fork and create a pull request:
git push origin feature/your-feature-name
- Provide a clear description of what your pull request does and why
- Reference any related issues using "Fixes #123" or "Closes #123"
- Include screenshots for UI changes
- Make sure all checks pass
- Be responsive to feedback and willing to make changes
- Keep pull requests focused - one feature or fix per pull request when possible
- Test your changes manually in the Extension Development Host
- Add unit tests for new functionality where appropriate
- Run existing tests with
npm run test - Test with different project types and configurations
If your changes affect how users interact with the extension:
- Update the README.md if needed
- Add or update relevant screenshots
- Consider if the change should be mentioned in the next release notes
- Use
console.log()statements and check the Developer Console - Set breakpoints in VS Code's debugger when running the Extension Development Host
- The Output panel may show useful error messages
- Familiarize yourself with the VS Code Extension API documentation
- The extension primarily uses the Diagnostics API and TreeView API
- Check existing VS Code extensions for inspiration and patterns
- The extension should not slow down VS Code's startup
- Avoid blocking operations on the main thread
- Consider debouncing frequent operations like file watching
Maintainers handle releases, but contributors should:
- Update version numbers in package.json only if specifically requested
- Add entries to CHANGELOG.md for user-facing changes
- Ensure all changes are properly tested before marking as ready for review
If you have questions about contributing:
- Check existing issues and discussions
- Open a new issue with the "question" label
- Look at recent pull requests to see how others have implemented similar changes
We appreciate all contributions, whether they're bug reports, feature suggestions, documentation improvements, or code changes. Every bit helps make Dead Code Hunter better for the entire VS Code community!