We love your input! We want to make contributing to RestQL-TS as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main - If you've added code that should be tested, add tests
- If you've changed APIs, update the documentation
- Ensure the test suite passes
- Make sure your code lints
- Issue that pull request!
- Update the README.md with details of changes to the interface, if applicable
- Update the docs with any new features or changes
- The PR will be merged once you have the sign-off of at least one maintainer
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
Report Bugs Using GitHub's Issue Tracker
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
-
Clone the repository:
git clone https://github.com/yourusername/restql-ts.git cd restql-ts -
Install dependencies:
npm install
-
Run tests:
npm test -
Run linter:
npm run lint
restql-ts/
├── src/
│ ├── adapters/ # Framework adapters
│ ├── sdk/ # Query builder SDK
│ ├── types.ts # Type definitions
│ ├── sqlBuilder.ts # SQL query builder
│ ├── parser.ts # Request parser
│ └── index.ts # Main entry point
├── docs/ # Documentation
├── examples/ # Example usage
└── tests/ # Test files
We use Jest for testing. Please ensure all new features include appropriate tests.
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverage- We use Prettier for code formatting
- We use ESLint for linting
- TypeScript is used throughout the project
- Follow existing code style and conventions
- Use JSDoc comments for functions and classes
- Keep the README.md up to date
- Update type definitions when changing interfaces
- Add examples for new features
- First, discuss the feature in an issue
- Create a new branch for your feature
- Add tests for your feature
- Update documentation
- Submit a pull request
When adding support for a new SQL dialect:
- Create a new file in
src/dialects/ - Implement the dialect-specific SQL generation
- Add tests for the new dialect
- Update documentation with dialect-specific examples
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Reference issues and pull requests liberally after the first line
By contributing, you agree that your contributions will be licensed under its MIT License.