You want to contribute to the project? Awesome!
Working on your first Pull Request? How to Contribute to an Open Source Project on GitHub
-
Project setup? We've got you covered!
-
Found a bug? Let us know!
-
Patched a bug? Make a PR!
-
Adding a new feature? Make a PR for that, too!
- Fork and clone the repo
- Run
yarn install
ornpm install
to install dependencies - Create a branch for your PR with
git checkout -b pr/your-branch-name
Tip: Keep your master branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:
git remote add upstream https://github.com/trezy-studios/transform-string-case.git git fetch upstream git branch --set-upstream-to=upstream/master master
This will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local master branch to use the upstream master branch whenever you run git pull. Then you can make all of your pull request branches based on this master branch. Whenever you want to update your version of master, do a regular git pull.
Please make sure to run the tests before you commit your changes. You can run the tests with yarn test
There are git hooks set up with this project that are automatically installed when you install dependencies. They're really handy, but are turned off by default (so as to not hinder new contributors). You can opt into these by creating a file called .opt-in at the root of the project and putting this inside:
pre-commit
We use an interpretation of the angular commit conventions in this project. Generally spueaking, all commits should follow this pattern:
type(component): commit message
- type - The type of work done in the commit. See below for types.
- component - Should follow these rules:
- If the file is one of the function files, no suffix is needed. Just use the file name (e.g., the
component
forcapitalizeFirstCharacter.js
would becapitalizeFirstCharacter
). - If the file is a test use the same rule you would use for the tested file (e.g., the
component
forcapitalizeFirstCharacter.test.js
would becapitalizeFirstCharacter
). - If the file is documentation, no suffix is needed, however docs should ALWAYS have a commit type of
docs
. - Remain as consistent in naming as possible. Use git history as precedence for the component name given to a file.
- If the file is one of the function files, no suffix is needed. Just use the file name (e.g., the
- commit message - should quickly summarize changes made. If there are multiple changes, multiline commit messages are allowed to fully summarize the changes.
If in doubt about component naming, try to dive into the commit history for the file in question. If you're still confused, ask! Use your best judgment, but prefer consistency over enforcing the rules set by this document. The point of these rules is to make searching through commits easier, and consistency helps the most.
Commits should be as samll as possible, with exceptions for large sweeping changes required by lint rule changes, package updates, etc.
If the commit must make changes to two or more completely unrelated files, the component name and parentheses are not required.
feat
- A new featurefix
- A bug fixdocs
- Documentation only changesstyle
- Changes that do not affect the meaning of the code (white-space, formatting, semi-colons, etc)refactor
- A code change that neither fixes a bug nor adds a featureperf
- A code change that imporves performancetest
- Adding missing tests or correcting existing testsbuild
- Changes that affect the build system or external dependencies (example scopes: babel, rollup)ci
- Changes to our CI configuration files and scripts (example scopes: CircleCI, semantic-release)chore
- Other changes that don't modify src or test filesrevert
- Reverts a previous commit