Welcome to Pantelwar's JS Utils - your go-to package for versatile utility functions! We greatly appreciate and welcome contributions from the community, as they play a pivotal role in enhancing this project. To ensure a positive and inclusive environment for all contributors, we adhere to the Contributor Covenant Code of Conduct.
If you're reading this, you're awesome! Thank you for being part of the JS Utils community. We encourage all participants to review the full Code of Conduct to understand the expected behavior and what actions will or will not be tolerated. Together, let's make JS Utils even better!
Before opening an issue, please check our issue tracker to ensure it hasn't been reported already.
New to contributing? Learn with this free video series: How to Contribute to an Open Source Project on GitHub.
To get started easily, explore our labeled "good first issues" for tasks with clear scopes and solutions. These labels indicate that there's already a working solution or a well-defined direction for the issue.
Feel free to choose any issue, but please check the comments to avoid duplication. If you start working on an issue, leave a comment to inform others. If an issue isn't progressing, it's okay to take it over after a week, but still, notify with a comment. If an issue remains inactive for 7 to 14 days, assume no one is working on it. Happy contributing!
Prior to embarking on any new feature or refactoring work, we kindly request that you first open an issue to propose your idea. This preliminary step ensures that you don't invest time and effort into a pull request that might not align with our project's goals or vision. Your proposal will help us evaluate the feasibility and alignment of your contribution with the project's objectives. Thank you for considering this important step in our collaborative process.
Please make sure that you are following the same code style as the rest of the project before committing or submitting a Pull Request. That includes the following things:
- files and folders names must be using
kebab-casesyntax - variable names must be using
camelCasesyntax - each folder must export its contained files using an
index.tsfile - every folder must be exported through the root
index.tsfile
It is recommended to use VS Code as the code editor and using certain extensions that will help give real time feedback on code styling and linting:
In addition to that, there are some useful commands that helps with formatting and linting the code
yarn formatformats the whole code using prettier.yarn lintlints the whole code using the eslint configuration.
Note: both of these commands will run automatically before you commit the code
When a Pull Request is submitted, we will run all the continuous integration steps to make sure that the code is clean, but we hope that your code passes that already.
Before starting anything, make sure to open a new issue in the Issue tracker first, and discuss with the maintainers to make sure it is feasible. Another reason to create an issue is to make sure that no one else is working on the same thing to prevent duplicate efforts.
To begin, please fork this repository (learn more about forking).
Now, locally run these commands to clone the repository
git clone https://github.com/<your username>/js-utils.git
cd js-utilsMake sure to add an upstream remote
git remote add upstream https://github.com/pantelwar/js-utils.gitIf you do not have yarn, you can install it using the following command
npm install -g yarnInstall the dependencies with yarn (npm isn't supported):
yarnCreate a new feature branch based off the main branch.
git checkout -b my-topic-branchNow you can continue working on this branch, until you are done with your tasks.
Before committing or pushing, always synchronize your local topic branch with the upstream main branch, to make sure that you have the latest changes:
git rebase upstream/mainor
git merge upstream/mainPlease do write or modify the tests before pushing, everything should be properly tested and meet the code coverage threshold, you can run tests for all packages with:
yarn test
To continuously watch and run tests, run the following:
yarn test --watch
You can build the package with the following command:
yarn build
Finally, add the files using git add and move on to committing, we are using the commitlint's conventional configuration for linting the commit messages and we are running eslint and prettier before every commit using husky, so that your code is automatically linted and formatted at every commit.
git commit -m "fix(test): #23 this is a test commit"Finally, you are ready to push the code to your fork
git push -u origin HEADGo to this repository and make a Pull Request against the main branch.
Try to make sure that your Pull Request is as small and precise as possible and doesn't include any unneccessary changes or resolves multiple issues at once, it's always better to have multiple small Pull Requests than a single big one.
Our maintainers will be monitoring for Pull Requests and will review the changes, and either merge it, request changes, or close it with an appropriate comment.
Thank you for contributing!
By contributing your code to the @pantelwar/js-utils GitHub repository, you agree to license your contribution under the MIT license.