Thank you for your interest in contributing to AI Visual Code Review! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Commit Message Convention
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally
- Create a branch for your feature/fix
- Make changes and test them
- Submit a Pull Request
- Node.js >= 14.0.0
- npm >= 6.0.0
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/ai-visual-code-review.git
cd ai-visual-code-review
# Install dependencies
npm install
# Install VSCode extension dependencies
cd vscode-extension && npm install && cd ..
# Run tests
npm test
# Start development server
npm run dev| Script | Description |
|---|---|
npm start |
Start production server |
npm run dev |
Start development server with nodemon |
npm test |
Run all tests |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage |
npm run lint |
Run ESLint |
npm run lint:fix |
Auto-fix lint issues |
npm run build |
Build project |
npm run vscode:compile |
Compile VSCode extension |
- Check existing issues first
- Use the bug report template
- Include:
- Node.js version
- OS and version
- Steps to reproduce
- Expected vs actual behavior
- Error messages/logs
- Check existing feature requests
- Use the feature request template
- Explain the use case
- Describe expected behavior
- Look for issues labeled
good first issueorhelp wanted - Comment on the issue to claim it
- Fork and create a feature branch
- Make your changes
- Submit a PR
- Update documentation for any new features
- Add tests for new functionality
- Run the test suite and ensure all tests pass
- Follow coding standards and commit conventions
- Link related issues in the PR description
- Wait for review and address feedback
- Tests pass (
npm test) - Lint passes (
npm run lint) - Documentation updated
- CHANGELOG.md updated
- Commit messages follow convention
- Use ES6+ features
- Use
constby default,letwhen reassignment needed - Never use
var - Use template literals for string interpolation
- Use async/await over callbacks
- Add JSDoc comments for public functions
We use ESLint to enforce consistent code style:
# Check code style
npm run lint
# Auto-fix issues
npm run lint:fixsrc/
├── config/ # Configuration modules
├── middleware/ # Express middleware
├── routes/ # API route handlers
└── utils/ # Utility functions
services/ # Business logic services
public/ # Static frontend files
test/ # Test files
# Run all tests
npm test
# Run specific test file
npm test -- test/server.test.js
# Run with coverage
npm run test:coverage- Place tests in
test/directory - Name test files
*.test.js - Use descriptive test names
- Follow Arrange-Act-Assert pattern
- Test edge cases and error conditions
describe('API Endpoint', () => {
it('should return health status', async () => {
const response = await request(app)
.get('/api/health')
.expect(200);
expect(response.body.status).toBe('healthy');
});
});We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation |
style |
Code style (formatting) |
refactor |
Code refactoring |
test |
Adding tests |
chore |
Maintenance tasks |
perf |
Performance improvement |
security |
Security fix |
feat(api): add file exclusion support
fix(cli): resolve path traversal vulnerability
docs(readme): update installation instructions
test(server): add rate limiting tests- Open an issue with your question
- Tag it with
questionlabel - We'll respond as soon as possible
Thank you for contributing! 🎉