Skip to content

Commit b240edb

Browse files
chore: add community docs (#2090)
1 parent 4134531 commit b240edb

File tree

3 files changed

+197
-36
lines changed

3 files changed

+197
-36
lines changed

CODE_OF_CONDUCT.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
All complaints will be reviewed and investigated promptly and fairly.
62+
63+
All community leaders are obligated to respect the privacy and security of the
64+
reporter of any incident.
65+
66+
## Enforcement Guidelines
67+
68+
Community leaders will follow these Community Impact Guidelines in determining
69+
the consequences for any action they deem in violation of this Code of Conduct:
70+
71+
### 1. Correction
72+
73+
**Community Impact**: Use of inappropriate language or other behavior deemed
74+
unprofessional or unwelcome in the community.
75+
76+
**Consequence**: A private, written warning from community leaders, providing
77+
clarity around the nature of the violation and an explanation of why the
78+
behavior was inappropriate. A public apology may be requested.
79+
80+
### 2. Warning
81+
82+
**Community Impact**: A violation through a single incident or series
83+
of actions.
84+
85+
**Consequence**: A warning with consequences for continued behavior. No
86+
interaction with the people involved, including unsolicited interaction with
87+
those enforcing the Code of Conduct, for a specified period of time. This
88+
includes avoiding interactions in community spaces as well as external channels
89+
like social media. Violating these terms may lead to a temporary or
90+
permanent ban.
91+
92+
### 3. Temporary Ban
93+
94+
**Community Impact**: A serious violation of community standards, including
95+
sustained inappropriate behavior.
96+
97+
**Consequence**: A temporary ban from any sort of interaction or public
98+
communication with the community for a specified period of time. No public or
99+
private interaction with the people involved, including unsolicited interaction
100+
with those enforcing the Code of Conduct, is allowed during this period.
101+
Violating these terms may lead to a permanent ban.
102+
103+
### 4. Permanent Ban
104+
105+
**Community Impact**: Demonstrating a pattern of violation of community
106+
standards, including sustained inappropriate behavior, harassment of an
107+
individual, or aggression toward or disparagement of classes of individuals.
108+
109+
**Consequence**: A permanent ban from any sort of public interaction within
110+
the community.
111+
112+
## Attribution
113+
114+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
115+
version 2.0, available at
116+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
117+
118+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
119+
enforcement ladder](https://github.com/mozilla/diversity).
120+
121+
[homepage]: https://www.contributor-covenant.org
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
https://www.contributor-covenant.org/faq. Translations are available at
125+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to MobX-State-Tree
2+
3+
Welcome to MobX-State-Tree! We're stoked that you want to contribute to our open-source project. Our community is essential in maintaining and improving the stability, test coverage, and documentation of MST. We really appreciate your time and interest in pitching in. Overall, we want to build useful software and have fun doing it - we hope you'll be able to join us!
4+
5+
## Table of Contents
6+
7+
1. [Getting Started](#getting-started)
8+
2. [Contributing Guidelines](#contributing-guidelines)
9+
3. [Reporting Bugs](#reporting-bugs)
10+
4. [Code of Conduct](#code-of-conduct)
11+
12+
## Getting Started
13+
14+
Before you start contributing, please make sure you have:
15+
16+
- [Node.js](https://nodejs.org/en) and [yarn](https://yarnpkg.com/) installed on your local machine.
17+
- A [GitHub](https://github.com/) account, as you'll need it to create issues and submit pull requests.
18+
19+
Most of the documentation and community assumes some amount of familiarity with:
20+
21+
1. JavaScript
22+
2. TypeScript
23+
3. git
24+
4. Using the command line
25+
5. Experience with state management libraries (typically on the frontend, although there are plenty of applications using MST in other contexts).
26+
27+
If you don't feel comfortable with these concepts, we'd be happy to help you get started, but you may want to consider brushing up on them before digging into the codebase. Reach out in the [discussions section of our GitHub repository](https://github.com/mobxjs/mobx-state-tree/discussions) if you'd like pointers about where to start.
28+
29+
## Contributing Guidelines
30+
31+
### Prioritizing Stability Over New Features
32+
33+
The existing API for MobX-State-Tree is [already quite extensive](https://mobx-state-tree.js.org/intro/welcome). As such, issues and PRs about new features may take lower priority than bug fixes, improving existing features, and performance/TypeScript improvements. If you're looking to augment MST with new functionality, we encourage you to consider building your own third-party library around our project, or perhaps [contributing to the mst-middlewares package](https://github.com/coolsoftwaretyler/mst-middlewares). We'd be happy to help faciliate that work, especially if it keeps our API from expanding much further.
34+
35+
### Tests
36+
37+
To maintain our library's stability, we are always striving to improve test coverage, even where more tests might be redundant. Every PR is _required to add at least one test that directly exercises your code change_, even if that test may be duplicative of existing tests. If you do not include tests with your PR, we will ask you to do so before reviewing. If you open a PR and are unwilling to write tests, we may either write tests on your behalf, or close the PR. If you are uncomfortable writing tests or working with Jest (our current testing library), we would be happy to guide you. This requirement is not intended as a barrier to entry, but as a way for us to enforce and improve the stability of our long-lived library here. It also serves as a way to externally communicate how your change will (or perhaps how it will not) modify the behavior of MST. There's no documentation quite as good as a comprehensive test suite!
38+
39+
### Documentation Changes
40+
41+
Good documentation is crucial for our users. If your contribution involves changes to the library's behavior, please update the documentation accordingly. Not every PR is necessarily going to require documentation updates, but we encourage you to consider touching up documentation related to your code changes. If you're unsure about where to make changes, feel free to reach out to us, and we'll be happy to guide you.
42+
43+
### Submitting a Pull Request
44+
45+
1. Fork the MobX-State-Tree repository on GitHub to your own GitHub account.
46+
2. Clone your fork to your local machine.
47+
3. Create a new branch for your changes: `git checkout -b my-feature`.
48+
4. Before starting, it's not a bad idea to `yarn install && yarn build && yarn test` to check that your machine can run the full test suite to start.
49+
5. Make your changes and ensure that all tests pass (including any new tests you have added).
50+
6. Update the documentation if necessary.
51+
7. Commit your changes: `git commit -m "Add my feature"`. Please consider [following conventional commit formatting](https://www.conventionalcommits.org/en/v1.0.0/).
52+
8. Push your changes to your fork: `git push origin my-feature`.
53+
9. Create a pull request on the MobX-State-Tree repository. We have a pull request template. If you fill that out and include examples of your changes, links to any issue(s) you're working on, and a good description of your PR, that would help us out a lot. If you skip those steps, we may ask you for clarification before reviewing your work.
54+
55+
Our team will review your pull request as soon as possible and provide feedback. Please be patient, as it may take some time to review and merge your contribution.
56+
57+
## Reporting Bugs
58+
59+
If you encounter a bug while using MobX-State-Tree, please help us by reporting it. To report a bug:
60+
61+
1. Check if the bug has already been reported by searching our [issue tracker](https://github.com/mobxjs/mobx-state-tree/issues).
62+
2. If not, create a new issue, including as much detail as possible about the bug and steps to reproduce it. We have issue templates that will ask specific questions for you to help us understand the problem.
63+
64+
## Bigger PRs
65+
66+
If you want to contribute a large or significant change to MST, we'd love to connect with you ahead of time to make sure it fits in with our overall road map, meets our stability requirements, and make sure you are set up for success. Please consider [asking around in the discussion forum](https://github.com/mobxjs/mobx-state-tree/discussions) if you have a big idea you want to implement, or if you want to work on some existing big ideas out therein the communit.
67+
68+
## Code of Conduct
69+
70+
We strive to maintain a friendly and welcoming community. Please read and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) in all interactions within the MobX-State-Tree project.
71+
72+
Thank you for considering contributing to MobX-State-Tree. Your contributions help us make our library better for everyone. We appreciate your support and look forward to collaborating with you!

docs/tips/contributing.md

-36
This file was deleted.

0 commit comments

Comments
 (0)