Skip to content

Latest commit

 

History

History
110 lines (81 loc) · 5.19 KB

CONTRIBUTING.md

File metadata and controls

110 lines (81 loc) · 5.19 KB
layout title description
../../layouts/Layout.astro
Contributing
How to contribute to Reatom

If you want to contribute to improving the library, use the following instructions to create changes:

Note: we prefer English language for all communication.

Creating an issue

If you found a bug or want to make an improvement in the library please check whether the same issue already exists in the list of issues. If you don't find the issue there, create a new one including a description of the problem. Note labels used.

If you have a question or want to propose a feature or an improvement, please create a discussion.

Sending a Pull Request

  1. 🐙 Fork and clone the repository.
  2. 🗜️ Install dependencies from the root of the repo, node@18 and npm@8 required.
    npm i
    All needed dependencies for all packages will be installed automatically, but only @reatom/framework dependencies (core, utils, async and a few more) will be builded.
  3. 🔨 Build needed package from the root of the repo.
    npx turbo run build --filter=PACKAGE_NAME
    Replace PACKAGE_NAME with the name of the package you want to build. For example, npm-react or persist. The turbo will handle all dependencies and build all required graph.
  4. 🎨 Create a feature-branch from v3 branch that starts from the number of the created issue.
  5. 🧪 If you want to fix a bug, write reproduction tests first.
  6. 🪄 Make changes.
  7. 🧪 If you added a feature, write tests for it.
  8. 📝 Record the changes according to conventional rules.
    $ git commit -m "<type>[optional scope]: <description>"
  9. 💍 Send the changes to GitHub and create Pull Request to the v3 branch.
  10. 🔗 Link the Pull Request and issue with keyword or provide description with motivation and explanation in the comment. Example: fix #74.
  11. ⏳ Wait for a decision about accepting the changes.

Create a new package

We want to grow a huge ecosystem of packages for Reatom and made an adapters for most popular web APIs and NPM libraries. If you want to help with it, please follow the instructions of Sending a Pull Request section, but on the third step you should add a new package to the packages directory We have a handy generator for it, run the following command from the root of the repo and follow the displayed instructions.

npm run package-generator

Edit the author field and add yourself to the maintainers list of the package.json of the new package.

If you need to add dependencies, add them manually to the package.json of the new package and install them from the root of the repo.

Codestyle rules

  1. use // @ts-ignore if you not sure why error appears or you think it could be better, use // @ts-expect-error if you sure that error is a mistake.

Commit rules

Record the changes made by making comments in accordance with Conventional Commits.

<type>[optional scope]: <description>

Allowed <type>

  • chore - maintain
  • ci - ci configuration
  • feat - new feature
  • fix - bug fix
  • docs - documentation
  • style - formatting, missing semi colons, …
  • test - when adding missing tests
  • perf - performance improvements
  • revert - rollback changes
  • refactor - reorganization without breaking changes and new features

Allowed <scope>

Directory name from /packages/<scope>

Style for <description>

  • only English language
  • Use imperative, present tense: change not changed nor changes
  • don't capitalize first letter
  • no dot (.) at the end

Example commit messages

docs: fix typo in npm-react
fix(core): add check for atoms with equal ids

Labels used in repository

  • bug Something isn't working is for problems with @reatom/* ecosystem
  • defect problems with reatom.dev or dev tools is for problems with reatom.dev site or with development tools like CI and others

Meta labels

Automation labels