Skip to content

Latest commit

 

History

History
133 lines (76 loc) · 4.58 KB

CONTRIBUTING.md

File metadata and controls

133 lines (76 loc) · 4.58 KB

Developer's Guide

Hey there! Contributing to this project is highly encouraged. Community help is essential for maintaining its quality, and every effort is appreciated.

Important

Before submitting your contribution, please take a moment and read through the following guidelines.

Repository Setup

This project uses Bun as a runtime as well as a package manager. It's a modern, fast, and lightweight alternative to Node.js and npm. To install Bun on POSIX systems (like Ubuntu or macOS), run the following command:

curl -fsSL https://bun.com/install | bash

Otherwise, visit the Bun installation page for installation options.

Commands

bun dev

Start the development environment in watch mode.

bun run build

Build the project for production. The result is under dist/.

bun check

Biome is used for both linting and formatting. It is an ultra-fast, Rust based linter and formatter. It also lints JSON.

You can also run bun fix to apply any safe fixes automatically.

bun run test

Run the API tests.

bun docs

Start the documentation dev server. Use bun docs:build to build the docs for production.

bun run

Print a full list of available scripts.

The Road to a Great Pull Request

Discuss First

Before you start to work on a feature pull request, it's always better to open a feature request (FR) issue first to discuss with the maintainers whether the feature is desired and the design of those features. This would help save time for both the maintainers and the contributors and help features to be shipped faster.

For typo fixes, it's recommended to batch multiple typo fixes into one pull request to maintain a cleaner commit history.

Pull Request

If you don't know how to send a Pull Request, it is recommended to read the guide.

If your PR fixes or resolves an existing issue, please add the following line in your PR description according to the following example:

Fixes #123

Where the template is:

<keyword> #<issue-number>

Replacing:

  • <keyword> with one of close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
  • <issue-number>: the issue number you are fixing

This will let GitHub know the issues are linked, and automatically close them once the PR gets merged. Learn more at the guide.

It's ok to have multiple commits in a single PR; changes do not need to be rebased or force pushed, as Squash and Merge will be used to combine the commits into one when merging.

References

Lint

Biome is used for both linting and formatting with a few custom rules. It is an ultra-fast, Rust based linter and formatter.

IDE Setup

Visual Studio Code is recommended for the best experience along with:

With the settings on the right, you can have auto fix and formatting when you save the code you are editing.


VS Code's settings.json

{
  "editor.defaultFormatter": "biomejs.biome",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "quickfix.biome": true
  }
}

All Contributors

We use the All Contributors specification to recognize all contributions.

If you've contributed to the project, please add yourself! We have a bot setup to make this easy. You can comment on your Pull Request or Issue with:

@all-contributors please add @<your-username> for <contributions>

For example:

@all-contributors please add @yamcodes for code, doc

For a full list of contribution types and more details on how to use the bot, please refer to the bot usage documentation.

License

By contributing your code to the Bedstack GitHub repository, you agree to license your contributions under the MIT License.

Acknowledgments

This guide is inspired by antfu/contribute.