Skip to content

Commit 195a22f

Browse files
authored
Fix contributing typos (#1339)
1 parent c555519 commit 195a22f

File tree

2 files changed

+35
-21
lines changed

2 files changed

+35
-21
lines changed

packages/openapi-fetch/CONTRIBUTING.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
Thanks for being willing to contribute! 🙏
44

5-
**Working on your first Pull Request (PR)?** [Egghead has a great free video introduction](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
5+
**Working on your first Pull Request (PR)?** You can learn how from this free series [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
66

77
## Open issues
88

9-
Please check out the [the open issues](https://github.com/drwpow/openapi-typescript/issues). Issues labelled [**Good First Issue**](https://github.com/drwpow/openapi-typescript/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)are especially good to start with.
9+
Please check out the [the open issues](https://github.com/drwpow/openapi-typescript/issues). Issues labelled [**Good First Issue**](https://github.com/drwpow/openapi-typescript/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) are especially good to start with.
1010

11-
Contributing doesn’t have to be in code! Simply answering questions in open issues, or providing workarounds, is just as important a contribution as making pull requests.
11+
Contributing doesn’t have to be in code. Simply answering questions in open issues or providing workarounds is as important as making pull requests.
1212

1313
## Opening a Pull Request
1414

15-
Pull requests are **welcome** for this repo! Bugfixes will always be accepted, though in some cases some small changes may be requested.
15+
Pull requests are **welcome** for this repo!
1616

17-
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](./README.md#-project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
17+
Bugfixes will always be accepted, though in some cases some small changes may be requested.
18+
19+
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](https://openapi-ts.pages.dev/openapi-fetch/about/#project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
1820

1921
### Setup
2022

@@ -24,7 +26,7 @@ However, if adding a feature or breaking change, please **open an issue first to
2426

2527
### Writing code
2628

27-
Create a new branch for your PR with `git checkout -b your-branch-name`. Add the relevant code as well as docs and tests. When you push everything up (`git push`), navigate back to your repo GitHub and you should see a prompt to open a new PR.
29+
Create a new branch for your PR with `git checkout -b your-branch-name`. Add the relevant code as well as docs and tests. When you push everything up (`git push`), navigate back to your repo in GitHub and you should see a prompt to open a new PR.
2830

2931
While best practices for commit messages are encouraged (e.g. start with an imperative verb, keep it short, use the body if needed), this repo doesn’t follow any specific guidelines. Clarity is favored over strict rules. Changelogs are generated separately from git (see [the Changelogs section](#changelogs))
3032

@@ -53,13 +55,13 @@ This library uses [Vitest](https://vitest.dev/) for testing. There’s a great [
5355
To run the entire test suite, run:
5456

5557
```bash
56-
npm test
58+
pnpm test
5759
```
5860

5961
To run an individual test:
6062

6163
```bash
62-
npm test -- [partial filename]
64+
pnpm test -- [partial filename]
6365
```
6466

6567
To start the entire test suite in watch mode:

packages/openapi-typescript/CONTRIBUTING.md

+25-13
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
Thanks for being willing to contribute! 🙏
44

5-
**Working on your first Pull Request (PR)?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
5+
**Working on your first Pull Request (PR)?** You can learn how from this free series [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
66

77
## Open issues
88

9-
Please check out the [the open issues](https://github.com/drwpow/openapi-typescript/issues). Issues labelled [**Good First Issue**](https://github.com/drwpow/openapi-typescript/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)are especially good to start with.
9+
Please check out the [the open issues](https://github.com/drwpow/openapi-typescript/issues). Issues labelled [**Good First Issue**](https://github.com/drwpow/openapi-typescript/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) are especially good to start with.
1010

11-
Contributing doesn’t have to be in code! Simply answering questions in open issues, or providing workarounds, is just as important a contribution as making pull requests.
11+
Contributing doesn’t have to be in code. Simply answering questions in open issues or providing workarounds is as important as making pull requests.
1212

1313
## Opening a Pull Request
1414

15-
Pull requests are **welcome** for this repo! Bugfixes will always be accepted, though in some cases some small changes may be requested.
15+
Pull requests are **welcome** for this repo!
1616

17-
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](./README.md#-project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
17+
Bugfixes will always be accepted, though in some cases some small changes may be requested.
18+
19+
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](https://openapi-ts.pages.dev/about/#project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
1820

1921
### Setup
2022

@@ -24,14 +26,14 @@ However, if adding a feature or breaking change, please **open an issue first to
2426

2527
### Writing code
2628

27-
Create a new branch for your PR with `git checkout -b your-branch-name`. Add the relevant code as well as docs and tests. When you push everything up (`git push`), navigate back to your repo GitHub and you should see a prompt to open a new PR.
29+
Create a new branch for your PR with `git checkout -b your-branch-name`. Add the relevant code as well as docs and tests. When you push everything up (`git push`), navigate back to your repo in GitHub and you should see a prompt to open a new PR.
2830

2931
While best practices for commit messages are encouraged (e.g. start with an imperative verb, keep it short, use the body if needed), this repo doesn’t follow any specific guidelines. Clarity is favored over strict rules. Changelogs are generated separately from git (see [the Changelogs section](#changelogs))
3032

3133
When working locally, run:
3234

3335
```bash
34-
npm run dev
36+
pnpm run dev
3537
```
3638

3739
This will compile the code as you change automatically.
@@ -50,7 +52,7 @@ Contributing to this library is hard-bordering-on-impossible without a [test-dri
5052

5153
Reasoning about code generation can be quite difficult until you “invert your thinking” and approach it output-first. Adopting TDD can turn very unclear/abstract problems into concrete ones with clear steps to resolution.
5254

53-
When starting any task, **write a failing test first!**
55+
TL;DR: When starting any task, **write a failing test first!**
5456

5557
#### Updating snapshot tests
5658

@@ -71,7 +73,7 @@ When opening a pull request, make sure all of the following is done:
7173
- [x] Tests pass (`npm test`)
7274
- [x] Linting passes (`npm run lint`)
7375

74-
Lastly, be sure to fill out the complete PR template!
76+
Lastly, be sure to fill out the complete PR template.
7577

7678
### Changelogs
7779

@@ -94,13 +96,13 @@ This library uses [Vitest](https://vitest.dev/) for testing. There’s a great [
9496
To run the entire test suite once, run:
9597

9698
```bash
97-
npm test
99+
pnpm test
98100
```
99101

100102
To run an individual test:
101103

102104
```bash
103-
npm test -- [partial filename]
105+
pnpm test -- [partial filename]
104106
```
105107

106108
To start the entire test suite in watch mode:
@@ -114,15 +116,15 @@ npx vitest
114116
To run ESLint on the project:
115117

116118
```bash
117-
npm run lint
119+
pnpm run lint
118120
```
119121

120122
### Updating snapshot examples
121123

122124
⚠️ This may break tests if schemas have been updated
123125

124126
```bash
125-
npm run update:examples
127+
pnpm run update:examples
126128
```
127129

128130
### Unit tests or snapshot tests?
@@ -134,3 +136,13 @@ This library has both unit tests (tests that test a tiny part of a schema) and s
134136
- Adding a CLI option that changes the entire output
135137

136138
For most PRs, **snapshot tests can be avoided.** But for scenarios similar to the ones mentioned, they can ensure everything is working as expected.
139+
140+
## Troubleshooting
141+
142+
### When I run tests, it’s not picking up my changes
143+
144+
Be sure to run `pnpm run build` to build the project. Most tests actually test the **compiled JS**, not the source TypeScript. It’s recommended to run `pnpm run dev` as you work so changes are always up-to-date.
145+
146+
### I get an obscure error when testing against my schema
147+
148+
Be sure your schema passes [Redocly lint](https://redocly.com/docs/cli/commands/lint/). Remember this library requires already-validated OpenAPI schemas, so even subtle errors will throw.

0 commit comments

Comments
 (0)