Skip to content

Commit

Permalink
Improve contribution guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 25, 2023
1 parent bb81314 commit 2f3663e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
## Submitting a new type

- One type addition per pull request, unless they are connected.
- Please help review the other open pull requests. If there are no open pull requests, provide some feedback on some of the open issues.
- **Please help review the other open pull requests.**
- If there are no open pull requests, provide some feedback on some of the open issues.
- [Example of a type contribution.](https://github.com/sindresorhus/type-fest/commit/5374588a88ee643893784f66367bc26b8e6509ec)
- Create a new file in the `test-d` directory and write at least one type test.
- See the other tests for inspiration.
- If it makes sense, also write a negative test using [`expectNotAssignable()`](https://github.com/SamVerschueren/tsd#expectnotassignabletexpression-any) or, to test other diagnostics, [`expectError()`](https://github.com/SamVerschueren/tsd#expecterrort--anyexpression-t).
- Don't use one-character type names like `T` and `U`. Use descriptive names. See the existing types for inspiration.
- Follow the existing code style, even in documentation code examples.
- Write a good documentation comment that includes:
- Write a short and clear description of what the type does.
- The first line should match the description in the readme.
- Write about some real-world use-cases where it can be useful. (It can be hard sometimes for users to see where they would use something)
- Example code block with a realistic example.
- At the bottom, explain how the type works. Some types can be quite advanced and hard to understand. We can use this opportunity to teach users.
- If there has been any discussion somewhere about this type, include a link to it. For example, a discussion on the TypeScript issue tracker.
- Add relevant `@category` tags. See other types for examples.
- If you add any internal helper types, they should still be properly documented and tested.
- Add the type to the readme.
- Make sure the file in the `source` directory uses a `.d.ts` extension and not `.ts`.
Expand Down

0 comments on commit 2f3663e

Please # to comment.