|
1 | 1 | # Contributing to React Native Async Storage
|
2 | 2 |
|
3 |
| -Thank you for helping out with Async Storage! |
4 |
| -We'd like to make contributions as pleasent as possible, so here's a small guide of how we see it. Happy to hear your feedback about anything, so please let us know. |
5 |
| - |
| 3 | +Thank you for helping out with Async Storage! We'd like to make contributions as |
| 4 | +pleasent as possible, so here's a small guide of how we see it. Happy to hear |
| 5 | +your feedback about anything, so please let us know. |
6 | 6 |
|
7 | 7 | ## Tests
|
8 |
| -We use `flow` for type check, `eslint` with `prettier` for linting/formatting, `jest/detox` for tests (unit and e2e). All tests are run on CircleCI for all opened pull requests, but you should use them locally when making changes. |
9 | 8 |
|
10 |
| -* `yarn test`: Run all tests, except for e2e (see note below). |
11 |
| -* `yarn test:lint`: Run `eslint` check. |
12 |
| -* `yarn test:flow`: Run `flow` type check. |
13 |
| -* `yarn test:e2e:<ios|android|macos>`: Runs e2e tests. Before you can run it, you should build the app that can be run, by using `yarn build:e2e:<ios|android|macos>`. |
| 9 | +We use TypeScript for type check, `eslint` with `prettier` for |
| 10 | +linting/formatting, `jest/detox` for tests (unit and e2e). All tests are run on |
| 11 | +CircleCI for all opened pull requests, but you should use them locally when |
| 12 | +making changes. |
14 | 13 |
|
| 14 | +- `yarn test`: Run all tests, except for e2e (see note below). |
| 15 | +- `yarn test:lint`: Run `eslint` check. |
| 16 | +- `yarn test:ts`: Run `tsc` type check. |
| 17 | +- `yarn test:e2e:<ios|android|macos>`: Runs e2e tests. Before you can run it, |
| 18 | + you should build the app that can be run, by using |
| 19 | + `yarn build:e2e:<ios|android|macos>`. |
15 | 20 |
|
16 | 21 | ## Sending a pull request
|
17 |
| -When you're sending a pull request: |
18 | 22 |
|
19 |
| -* Communication is a key. If you want fix/add something, please open new/find existing issue, so we can discuss it. |
20 |
| -* We prefer small pull requests focused on one change, as those are easier to test/check. |
21 |
| -* Please make sure that all tests are passing on your local machine. |
22 |
| -* Please make sure you've run formatters and linters locally. |
23 |
| - * In VS Code, you can press ⇧+Alt+F or ⇧⌥F to format the current file. |
24 |
| - * To format C++ and Objective-C files, make sure you have the [C/C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) installed. |
25 |
| - * To format JavaScript files, please install [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode). |
26 |
| - * From the command line, you can run `yarn format:c` and `yarn format:js` to format C-based languages and JavaScript respectively. The first command requires that you've already installed [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html). |
27 |
| -* Follow the template when opening a PR. |
| 23 | +When you're sending a pull request: |
28 | 24 |
|
| 25 | +- Communication is a key. If you want fix/add something, please open new/find |
| 26 | + existing issue, so we can discuss it. |
| 27 | +- We prefer small pull requests focused on one change, as those are easier to |
| 28 | + test/check. |
| 29 | +- Please make sure that all tests are passing on your local machine. |
| 30 | +- Please make sure you've run formatters and linters locally. |
| 31 | + - In VS Code, you can press ⇧+Alt+F or ⇧⌥F to format the current file. |
| 32 | + - To format C++ and Objective-C files, make sure you have the |
| 33 | + [C/C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) |
| 34 | + installed. |
| 35 | + - To format JavaScript files, please install |
| 36 | + [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode). |
| 37 | + - From the command line, you can run `yarn format:c` and `yarn format:js` to |
| 38 | + format C-based languages and JavaScript respectively. The first command |
| 39 | + requires that you've already installed |
| 40 | + [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html). |
| 41 | +- Follow the template when opening a PR. |
29 | 42 |
|
30 | 43 | ## Commits and versioning
|
31 |
| -All PRs are squashed into `master` branch and wrapped up in a single commit, following [conventional commit message](https://www.conventionalcommits.org/en/v1.0.0-beta.3). Combined with [semantic versioning](https://semver.org/), this allows us to have a frequent releases of the library. |
32 | 44 |
|
33 |
| -*Note*: We don't force this convention on Pull Requests from contributors, but it's a clean way to see what type of changes are made, so feel free to follow it. |
| 45 | +All PRs are squashed into `master` branch and wrapped up in a single commit, |
| 46 | +following |
| 47 | +[conventional commit message](https://www.conventionalcommits.org/en/v1.0.0-beta.3). |
| 48 | +Combined with [semantic versioning](https://semver.org/), this allows us to have |
| 49 | +a frequent releases of the library. |
34 | 50 |
|
| 51 | +_Note_: We don't force this convention on Pull Requests from contributors, but |
| 52 | +it's a clean way to see what type of changes are made, so feel free to follow |
| 53 | +it. |
35 | 54 |
|
36 | 55 | Most notably prefixes you'll see:
|
37 | 56 |
|
38 |
| -* **fix**: Bug fixes, triggers *patch* release |
39 |
| -* **feat**: New feature implemented, triggers *minor* |
40 |
| -* **chore**: Changes that are not affecting end user (CI config changes, scripts, ["grunt work"](https://stackoverflow.com/a/26944812/3510245)) |
41 |
| -* **docs**: Documentation changes. |
42 |
| -* **perf**: A code change that improves performance. |
43 |
| -* **refactor**: A code change that neither fixes a bug nor adds a feature. |
44 |
| -* **test**: Adding missing tests or correcting existing tests. |
45 |
| - |
| 57 | +- **fix**: Bug fixes, triggers _patch_ release |
| 58 | +- **feat**: New feature implemented, triggers _minor_ |
| 59 | +- **chore**: Changes that are not affecting end user (CI config changes, |
| 60 | + scripts, ["grunt work"](https://stackoverflow.com/a/26944812/3510245)) |
| 61 | +- **docs**: Documentation changes. |
| 62 | +- **perf**: A code change that improves performance. |
| 63 | +- **refactor**: A code change that neither fixes a bug nor adds a feature. |
| 64 | +- **test**: Adding missing tests or correcting existing tests. |
46 | 65 |
|
47 | 66 | ## Release process
|
48 |
| -We use [Semantic Release](http://semantic-release.org) to automatically release new versions of the library when changes are merged into `master` branch, which we plan to keep stable. Bug fixes take priority in the release order. |
| 67 | + |
| 68 | +We use [Semantic Release](http://semantic-release.org) to automatically release |
| 69 | +new versions of the library when changes are merged into `master` branch, which |
| 70 | +we plan to keep stable. Bug fixes take priority in the release order. |
49 | 71 |
|
50 | 72 | ## Reporting issues
|
51 |
| -You can report issues on our [bug tracker](https://github.com/react-native-community/react-native-async-storage/issues). Please search for existing issues and follow the issue template when opening an one. |
52 | 73 |
|
| 74 | +You can report issues on our |
| 75 | +[bug tracker](https://github.com/react-native-community/react-native-async-storage/issues). |
| 76 | +Please search for existing issues and follow the issue template when opening an |
| 77 | +one. |
53 | 78 |
|
54 | 79 | ## License
|
55 |
| -By contributing to React Native Async Storage, you agree that your contributions will be licensed under the **MIT** license. |
| 80 | + |
| 81 | +By contributing to React Native Async Storage, you agree that your contributions |
| 82 | +will be licensed under the **MIT** license. |
0 commit comments