mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
89 lines
2.3 KiB
Markdown
89 lines
2.3 KiB
Markdown
# Contributing to Finance App
|
|
|
|
This document outlines development practices and guidelines for this project.
|
|
|
|
## Development Workflow
|
|
|
|
### Git Hooks
|
|
|
|
This project uses Git hooks to ensure code quality:
|
|
|
|
- **Pre-commit hook**: Runs Biome checks before each commit
|
|
- All code must pass these checks to be committed
|
|
- See [HOOKS.md](./HOOKS.md) for detailed usage instructions
|
|
|
|
### Commit Message Format
|
|
|
|
Commit messages should be clear and descriptive:
|
|
```
|
|
<type>: <description>
|
|
|
|
[optional body]
|
|
```
|
|
|
|
Types:
|
|
- **feat**: New feature
|
|
- **fix**: Bug fix
|
|
- **docs**: Documentation changes
|
|
- **style**: Code style changes (formatting, etc.)
|
|
- **refactor**: Code changes that neither fix bugs nor add features
|
|
- **test**: Adding or modifying tests
|
|
- **chore**: Changes to build process or auxiliary tools
|
|
|
|
Example:
|
|
```
|
|
feat: add transaction filtering by date range
|
|
|
|
Implements the date range picker component and adds filtering logic
|
|
to the transaction table display. Updates the API to support date range filtering.
|
|
```
|
|
|
|
### Branch Naming Conventions
|
|
|
|
- `feature/<feature-name>` - For new features
|
|
- `fix/<issue-name>` - For bug fixes
|
|
- `refactor/<component>` - For code refactoring
|
|
- `docs/<document-name>` - For documentation updates
|
|
|
|
Example: `feature/date-range-filter`
|
|
|
|
## Coding Standards
|
|
|
|
### TypeScript Guidelines
|
|
|
|
- Use TypeScript for all new files
|
|
- Add proper type annotations
|
|
- Avoid using `any` type
|
|
- Use optional chaining (`?.`) and nullish coalescing (`??`) where appropriate
|
|
|
|
### Path Aliases
|
|
|
|
Always use the project's configured path aliases instead of relative imports. See the README.md file for the complete list of configured path aliases.
|
|
|
|
### CSS Guidelines
|
|
|
|
- Maintain consistent naming conventions for CSS classes
|
|
- Use CSS variables for theming
|
|
- Consider responsive design for all UI components
|
|
- Test changes across multiple viewport sizes
|
|
|
|
### API Development
|
|
|
|
- Implement comprehensive input validation
|
|
- Use appropriate HTTP status codes
|
|
- Structure responses consistently
|
|
- Document API changes
|
|
|
|
## Testing
|
|
|
|
- Write tests for new features and bug fixes
|
|
- Ensure all tests pass before submitting changes
|
|
- Follow existing test patterns in the codebase
|
|
|
|
## Pull Request Process
|
|
|
|
1. Verify all tests pass locally
|
|
2. Update relevant documentation
|
|
3. Provide a clear description of the changes
|
|
4. Reference any related issues
|
|
5. Request review from appropriate team members |