Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.
- Fork the repository and clone your fork locally
- Install dependencies:
npm install - Create a branch for your changes:
git checkout -b feature/your-feature-name
- Node.js v22.14+ (check
.nvmrcfor the exact version) - npm (comes with Node.js)
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Lint all files (JS, CSS, SCSS, HTML)
npm run lint:fix # Lint and auto-fix issues
npm run format # Format code with Prettier
npm run format:check # Check code formatting
npm run test # Run tests
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverage
npm run clean # Remove dist folder
npm run audit # Check for security vulnerabilitiesBefore submitting a PR, ensure:
- ✅ All tests pass:
npm run test - ✅ Linting passes:
npm run lint - ✅ Formatting is correct:
npm run format:check - ✅ Build succeeds:
npm run build
This project uses Husky and lint-staged to automatically:
- Run ESLint and fix issues on staged JS files
- Run Stylelint and fix issues on staged CSS/SCSS files
- Format staged files with Prettier
These hooks run automatically when you commit. If they fail, fix the issues and commit again.
- Use ES6+ features
- Follow ESLint rules (configured in
eslint.config.js) - Use single quotes for strings
- Always use strict equality (
===) - Use camelCase for variables and functions
- Add JSDoc comments for complex functions
- Follow Stylelint rules (configured in
.stylelintrc) - Use SCSS features (variables, mixins, nesting)
- Keep selectors specific but not overly nested
- Use meaningful class names
- Follow HTMLHint rules (configured in
.htmlhintrc) - Use semantic HTML5 elements
- Always include alt text for images
- Use lowercase for tags and attributes
- Use double quotes for attributes
- Use clear, descriptive commit messages
- Start with a verb in imperative mood (e.g., "Add", "Fix", "Update")
- Keep the first line under 72 characters
- Add more details in the body if needed
Example:
Add pre-commit hooks with Husky
- Install husky and lint-staged
- Configure pre-commit hook
- Add lint-staged configuration to package.json
- Write tests for new features
- Ensure all tests pass before submitting
- Aim for good test coverage
- Use descriptive test names
- Update your fork with the latest changes from upstream
- Create a feature branch from
master - Make your changes following the code style guidelines
- Add tests for new functionality
- Update documentation if needed
- Ensure all checks pass (lint, format, tests, build)
- Submit a pull request with a clear description
- Code follows the project's style guidelines
- Tests added/updated and passing
- Documentation updated (if needed)
- No console errors or warnings
- Build succeeds
- Linting passes
- Formatting is correct
When reporting issues, please include:
- Description: Clear description of the issue
- Steps to reproduce: Detailed steps to reproduce the issue
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment: Node.js version, OS, browser (if applicable)
- Screenshots: If applicable
Feature requests are welcome! Please:
- Check if the feature has already been requested
- Provide a clear description of the feature
- Explain the use case and benefits
- Consider implementation complexity
By contributing, you agree that your contributions will be licensed under the MIT License.
Your contributions make this project better for everyone. Thank you for taking the time to contribute!