Hi there 👋 glad you could make it, super stoked you decided to contribute to one of my projects~! ❤️
This is a very general guide, and anything specific will be noted in the project itself.
I program on a Mac, so most of this guide will be geared towards nix based machines and setup through my
dotfile
.
Note:
.editorconfig
's are at play, make sure your IDE supports it.
You'll find most of my projects use now use pnpm
, there may still be a scattering of npm and yarn
around. See them, squash it and help raise a pull request 🚀 migrating to pnpm.
Note: my projects include a
volta
property in thepackage.json
file that indicates the node version for the project. I do suggest you installvolta
to make sure we are both on the same toolchain.
My projects typically run on the nightly
channel, but for the most part the MSRV if not specified in the project
readme will be 1.64.0
, managed through rustup.
In these projects you'll find a .rust-toolchain.toml
that describes the targets and channel/version to run against, so
just a matter of the cargo build
and cargo test
we know and love.
Note:
cargo fmt
MUST be used before raising PR's
Lets have a cin-wag1 first
Sometimes the direction your pull request might go in might not quite align with the design goals of the project. So let's save both our times here, and have a cin-wag.
If you're raising any typo fixes, or bumping versions, or you're a maintainer of another dependency please go straight to a pull request.
Marais uses a personally adapted Conventional Commit but very similar, please have a read of that first to gain the context.
Format:
<type>: <summary>
[long winded description]
[fixes: <issue number>]
- type:
chore
|feat
|fix
|docs
|ci
. But I usechore
for all the business-as-usual commits.
Example
feat: `charCode`'s over doing a `toString` in tail check
Typically charCode comparison is faster than doing a to toString, then slicing to check a certain character
fixes: #56
I use these commits to
automatically generate release notes
where only feat
and fix
's will be noted.
Please keep these commits short-n-sweet, although no enforced but generally keep the first line of the commit under 50 characters.
Now that you're ready to raise the PR (pull request), you can follow this guide on creating your very PR on GitHub.
Step | Example |
---|---|
1. set a title | Your PR title should also follow the commit convention. eg feat: polish message output format |
2. description | Your PR description should autofill with the commit description, please do describe the change in more depth. Typically I like using the why then how. Firstly describe why your change is the way it is, then how it works. |
3. comment | Firstly, don't over comment the points of interest. But please annotate at least the main moment of the PR. Sometimes there is lots of boilerplate around a change, and easily missing the point. So please do call it out. |
Should your PR be resolving an issue, add a fixes: #123
at the tail end of your PR description. Merging this PR will
then automatically close that issue. Learn more
here.
All my projects are setup with "Squash and Merge" so feel free to have as many commits as you like, no need to rebase.
But if possible, let your commits tell a story, than a series of wip
and f*** you
commits.
A node version manager for node and toolchains.
curl https://get.volta.sh | bash
volta install node
when using any of the scripts pnpm run
or node index.js
or whatever, Volta will ensure the correct version is running.
My projects all use this as the base .editorconfig
.
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
My projects all should have a root .prettierrc
file denoting the configuration. But if not this should be the bare
minium configuration:
useTabs: true
tabWidth: 4
singleQuote: true
maraisr/dotfiles
— my fish configurations and setupmaraisr/tsconfig
— tsconfig file used extended by my projectsfnm
— the node version manager I usegit config
— the git config/aliases I use
Footnotes
-
cin-wag: the motion created when one speaks. ↩