Thank you for your interest in contributing to Secure-JWT!
- Node.js 18+
- npm 8+
- Git
- Fork the repository
- Clone your fork:
git clone https://github.com/NeaByteLab/Secure-JWT.git cd Secure-JWT - Install dependencies:
npm install
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
# Check formatting
npm run format:check
# Format code
npm run format
# Type check
npm run type-check# Build the project
npm run build
# Test the built package
npm pack-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following the coding standards
-
Run tests to ensure everything works:
npm run test:coverage npm run lint npm run type-check
-
Commit your changes with a clear message:
git commit -m "feat(auth): add new feature :sparkles:" -
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request to the main branch
- No
anytypes allowed - Use strict TypeScript settings
- Use descriptive variable names
- Add JSDoc comments for public functions
- 2-space indentation
- Single quotes for strings
- No semicolons
- No trailing commas
- Use
constoverletwhen possible
- Use specific error types
- Provide meaningful error messages
- Handle all error cases
- Use try-catch blocks appropriately
- Write tests for new features
- Maintain 98%+ test coverage
- Test both success and error cases
- Use descriptive test names
When reporting bugs, please include:
- Node.js version
- Operating system
- Steps to reproduce
- Expected behavior
- Actual behavior
- Error messages (if any)
For feature requests, please:
- Check existing issues first
- Describe the use case
- Explain why it would be useful
- Consider backward compatibility
Use conventional commits with scope and emoji:
feat(scope):- New features ✨fix(scope):- Bug fixes 🐛docs(scope):- Documentation changes 📝style(scope):- Code style changes 🎨refactor(scope):- Code refactoring ♻️test(scope):- Test changes ✅chore(scope):- Build/tooling changes 🔧
Format: type(scope): description :emoji:
Examples:
feat(auth): add token refresh functionality :sparkles:
fix(validation): resolve memory leak in token validation :bug:
docs(readme): update README with new examples :memo:
refactor(utils): improve error handling logic :recycle:
test(coverage): add tests for new features :white_check_mark:
chore(build): update build configuration :wrench:
All submissions require review. Please:
- Respond to feedback promptly
- Make requested changes
- Keep PRs focused and small
- Update documentation as needed
By contributing, you agree that your contributions will be licensed under the same license as the project.