Skip to content

Commit 2f3663e

Browse files
committed
Improve contribution guidelines
1 parent bb81314 commit 2f3663e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/contributing.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@
33
## Submitting a new type
44

55
- One type addition per pull request, unless they are connected.
6-
- Please help review the other open pull requests. If there are no open pull requests, provide some feedback on some of the open issues.
6+
- **Please help review the other open pull requests.**
7+
- If there are no open pull requests, provide some feedback on some of the open issues.
8+
- [Example of a type contribution.](https://github.com/sindresorhus/type-fest/commit/5374588a88ee643893784f66367bc26b8e6509ec)
79
- Create a new file in the `test-d` directory and write at least one type test.
810
- See the other tests for inspiration.
911
- 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).
1012
- Don't use one-character type names like `T` and `U`. Use descriptive names. See the existing types for inspiration.
13+
- Follow the existing code style, even in documentation code examples.
1114
- Write a good documentation comment that includes:
1215
- Write a short and clear description of what the type does.
16+
- The first line should match the description in the readme.
1317
- 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)
1418
- Example code block with a realistic example.
1519
- 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.
1620
- If there has been any discussion somewhere about this type, include a link to it. For example, a discussion on the TypeScript issue tracker.
21+
- Add relevant `@category` tags. See other types for examples.
1722
- If you add any internal helper types, they should still be properly documented and tested.
1823
- Add the type to the readme.
1924
- Make sure the file in the `source` directory uses a `.d.ts` extension and not `.ts`.

0 commit comments

Comments
 (0)