Skip to content
Myr

CONTRIBUTING.md

This file

Path

CONTRIBUTING.md

92 lines · 4.7 KiB · Markdown

Last changed by

landed by oscabrield7a5583

History of this file

Take it

The walk stopped after 200 commits: lines older than f85898f point at it.

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 1–53why, one step back
1# Contributing
23## General Guideline45### Reporting Issues67If you have found what you think is a bug, please [start a discussion](https://github.com/pmndrs/zustand/discussions/new?category=bug-report).89For any usage questions, please [start a discussion](https://github.com/pmndrs/zustand/discussions/new?category=q-a).1011### Suggesting New Features1213If you are here to suggest a feature, first [start a discussion](https://github.com/pmndrs/zustand/discussions/new?category=ideas) if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented.1415### Committing1617We are applying [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/) here. In short, that means a commit has to be one of the following types:1819Your commit type must be one of the following:2021- **feat**: A new feature.22- **fix**: A bug fix.23- **refactor**: A code change that neither fixes a bug nor adds a feature.24- **chore**: Changes to the build process, configuration, dependencies, CI/CD pipelines, or other auxiliary tools and libraries.25- **docs**: Documentation-only changes.26- **test**: Adding missing or correcting existing tests.2728If you are unfamiliar with the usage of conventional commits,29the short version is to simply specify the type as a first word,30and follow it with a colon and a space, then start your message31from a lowercase letter, like this:3233```34feat: add a 'foo' type support35```3637You can also specify the scope of the commit in the parentheses after a type:3839```40fix(react): change the 'bar' parameter type41```4243### Development4445If you would like to contribute by fixing an open issue or developing a new feature you can use this suggested workflow:4647#### General48491. Fork this repository.502. Create a new feature branch based off the `main` branch.513. Follow the [Core](#Core) and/or the [Documentation](#Documentation) guide below and come back to this once done.524. Run `pnpm run fix:format` to format the code.535. Git stage your required changes and commit (review the commit guidelines below).546. Start or continue the relevant discussion, share your fork branch, and wait for maintainer guidance. We don't accept direct PRs, but a maintainer may open a PR from your fork branch for review.

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 55–57why, one step back
55
56##### Core57

docs(CONTRIBUTING): fix 'npm install' to 'pnpm install' (#3350)Wonsuk Choibefore adoptiondb6fe66

line 58why, one step back
581. Run `pnpm install` to install dependencies.

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 59–60why, one step back
592. Create failing tests for your fix or new feature in the [`tests`](./tests/) folder.
603. Implement your changes.

chore(package.json): add 'build-watch' script for watch mode builds (#3357)Wonsuk Choibefore adoptionb0ea6ea

line 61why, one step back
614. Run `pnpm run build` to build the library. _(Pro-tip: `pnpm run build-watch` runs the build in watch mode)_

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 62–67why, one step back
625. Run the tests by running `pnpm run test` and ensure that they pass.
636. You can use `pnpm link` to sym-link this package and test it locally on your own project. Alternatively, you may use CodeSandbox CI's canary releases to test the changes in your own project. (requires a PR to be created first)647. Follow step 4 and onwards from the [General](#General) guide above to bring it to the finish line.6566### Pull Requests6768We don't accept direct pull requests from contributors. Please use a discussion to report bugs, ask questions, or propose features, and share a branch from your fork when a maintainer asks for code.

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

line 69why, one step back
69
70If a maintainer opens a pull request from your fork branch, please try to keep it focused in scope and avoid including unrelated commits.7172When a pull request is opened from your fork branch, we'll try to get back to you as soon as possible. We may suggest some changes or request improvements, therefore, please check ✅ ["Allow edits from maintainers"](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) on your PR.

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 73–88why, one step back
73
74## Zustand-specific Guideline7576##### Documentation7778Our [docs](https://zustand.docs.pmnd.rs) are based on [`pmndrs/docs`](https://github.com/pmndrs/docs).79801. Separately, clone the `pmndrs/docs`. (you don't need to fork it).812. Inside the `pmndrs/docs` directory:82 1. Create a `.env` file in the root directory with the next environment variables: `MDX=docs/zustand/docs` and `HOME_REDIRECT=/getting-started/introduction`.83 2. Run `npm install` to install dependencies.84 3. Run `npm run dev` to start the dev server.85 4. Navigate to [`http://localhost:3000`](http://localhost:3000) to view the documents.863. Go Back to the forked repository:87 1. Run `pnpm install` to install dependencies.88 2. Navigate to the [`docs`](./docs/) folder and make necessary changes to the documents.

docs: fix pmndrs typo in contributing guide (#3388)Pavan Shindebefore adoptiona9019a1

line 89why, one step back
89 3. Add your changes to the documents and see them live reloaded in the browser. (if you don't see changes, try `control + c`, then run `npm run dev` in the cloned `pmndrs/docs` repository)

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 90–92why, one step back
904. Follow step 4 and onwards from the [General](#General) guide above to bring it to the finish line.
9192Thank you for contributing! :heart: