Thank you for your interest in contributing to VSCode Task Buttons! This document provides guidelines and instructions to help you get started with contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Release Process
- Getting Help
This project adheres to a standard Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
-
Prerequisites
- Node.js (version 18 or later)
- pnpm (version 8 or later)
- Visual Studio Code
-
Clone the Repository
git clone https://github.com/spencerwmiles/vscode-task-buttons.git cd vscode-task-buttons -
Install Dependencies
pnpm install
-
Set Up Git Hooks The project uses Husky for git hooks to ensure code quality. The hooks will be installed automatically when you run
pnpm install.
src/: Source code filesmain.ts: Extension entry pointTaskButtons.ts: Main implementation of task buttons functionality__tests__/: Test files
.github/: GitHub workflows and configurationsbuild/: Build scripts and configurationsout/: Compiled JavaScript files (generated during build)
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes to the codebase.
-
Follow the coding standards and guidelines (see Coding Standards).
-
Commit your changes with a clear, descriptive commit message:
git commit -m "feat: add new feature for XYZ" -
Push your branch to GitHub:
git push origin feature/your-feature-name
-
Running Tests
# Run all tests pnpm test # Run tests in watch mode pnpm test:watch # Run tests with coverage pnpm test -- --coverage
-
Writing Tests
- All new features should be accompanied by tests
- Tests should be placed in the
src/__tests__/directory - Use descriptive test names that explain what is being tested
- Follow the AAA pattern (Arrange, Act, Assert)
- Maintain at least 80% code coverage
-
Building the Extension
pnpm build
-
Watching for Changes
pnpm watch
-
Packaging the Extension
pnpm package
- Ensure your code follows the project's coding standards.
- Update documentation if necessary.
- Add tests for new functionality.
- Ensure all tests pass and there are no linting errors.
- Update the CHANGELOG.md file with details of changes.
- The PR should be submitted against the
mainbranch.
- At least one core maintainer must review and approve your PR.
- Address any feedback or requested changes from the review.
- Once approved, a maintainer will merge your PR.
- Be responsive to questions and comments in your PR.
- Use TypeScript's strict mode
- Avoid using
anytype when possible - Use interfaces for object shapes
- Use proper error handling
- Follow the established code structure and patterns
- Document public APIs with JSDoc comments
- Maintain at least 80% code coverage
- Test all user-facing functionality
- Mock external dependencies
- Test edge cases and error conditions
- Write unit and integration tests
- Keep README.md up to date with new features
- Update the CHANGELOG.md with new changes
- Use JSDoc comments for public APIs
- Document complex logic with inline comments
Releases are managed by the core maintainers. The process is automated through GitHub Actions:
- Changes are merged into the main branch
- Version is updated in package.json
- CHANGELOG.md is updated
- A new tag is created (e.g., v1.2.3)
- The release workflow automatically:
- Builds and tests the extension
- Publishes to VSCode Marketplace
- Creates a GitHub release
If you need help with the contribution process or have questions:
- Open an issue on GitHub
- Ask in the pull request
- Contact the maintainers
Thank you for contributing to VSCode Task Buttons!