First off, thank you for considering contributing to rust-errors! It's people like you that make rust-errors such a great tool.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps which reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include code samples and error messages
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and explain which behavior you expected to see instead
- Explain why this enhancement would be useful
- List some other libraries or applications where this enhancement exists
- Fill in the required template
- Do not include issue numbers in the PR title
- Include screenshots and animated GIFs in your pull request whenever possible
- Follow the TypeScript styleguide
- Include thoughtfully-worded, well-structured tests
- Document new code based on the Documentation Styleguide
- End all files with a newline
- Fork the repo and create your branch from
main
- Run
bun install
to install dependencies - Make your changes
- Add tests for any new functionality
- Run
bun test
to ensure all tests pass - Run
bun run lint
to ensure your code follows our style guide - Run
bun run build
to ensure your changes compile correctly - Create a pull request
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Consider starting the commit message with an applicable emoji:
- 🎨
:art:
when improving the format/structure of the code - 🐎
:racehorse:
when improving performance - 🚱
:non-potable_water:
when plugging memory leaks - 📝
:memo:
when writing docs - 🐛
:bug:
when fixing a bug - 🔥
:fire:
when removing code or files - 💚
:green_heart:
when fixing the CI build - ✅
:white_check_mark:
when adding tests - 🔒
:lock:
when dealing with security - ⬆️
:arrow_up:
when upgrading dependencies - ⬇️
:arrow_down:
when downgrading dependencies
- 🎨
- Use strict TypeScript settings
- Avoid using
any
type - Use private class fields with
#
prefix - Use readonly where possible
- Use type inference where it makes code clearer
- Document public APIs with JSDoc comments
- Use consistent naming conventions:
- PascalCase for types and classes
- camelCase for functions and variables
- UPPER_CASE for constants
- Prefer type aliases over interfaces for public APIs
- Use union types instead of enums
- Use type guards for runtime type checking
- Use TypeDoc for API documentation
- Write documentation in Markdown
- Reference types and code using backticks
- Include examples in documentation
- Document both success and error cases
- Explain complex algorithms and design decisions
- Keep documentation up to date with code changes
This section lists the labels we use to help us track and manage issues and pull requests.
bug
- Issues that are bugsdocumentation
- Issues about documentationduplicate
- Issues that are duplicates of other issuesenhancement
- Issues that are feature requestsgood first issue
- Good for newcomershelp wanted
- Extra attention is neededinvalid
- Issues that aren't validquestion
- Further information is requestedwontfix
- Issues that won't be worked on
If you have any questions, please feel free to contact the project maintainers.