mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
Run precommit hook automatically
Help to ensure that code is formatted and linted before commits and PRs. Fix #755 Close #756 Close #754
This commit is contained in:
committed by
Nicolas Gallagher
parent
b78206d2f4
commit
c26ef0eb3b
17
.github/CONTRIBUTING.md
vendored
17
.github/CONTRIBUTING.md
vendored
@@ -91,20 +91,6 @@ To run the performance benchmarks in a browser (opening `./packages/benchmarks/i
|
||||
yarn benchmark
|
||||
```
|
||||
|
||||
### Pre-commit
|
||||
|
||||
To format and lint code before commit:
|
||||
|
||||
```
|
||||
yarn precommit
|
||||
```
|
||||
|
||||
To format and lint the entire project:
|
||||
|
||||
```
|
||||
yarn fmt
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
Please open an issue with a proposal for a new feature or refactoring before
|
||||
@@ -118,8 +104,7 @@ that we won't want to accept.
|
||||
1. Fork the repository and create your branch from `master`.
|
||||
2. If you've added code that should be tested, add tests!
|
||||
3. If you've changed APIs, update the documentation.
|
||||
4. Lint and format your code (`yarn precommit`).
|
||||
5. Ensure the tests pass (`yarn test`).
|
||||
4. Ensure the tests pass (`yarn test`).
|
||||
|
||||
You can now submit a pull request, referencing any issues it addresses.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user