Update contributing doc and PR template for examples (#37193)
* Update contributing doc and PR template for examples * Apply suggestions from code review Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
parent
0d95886815
commit
7206614d0b
2 changed files with 10 additions and 1 deletions
1
.github/pull_request_template.md
vendored
1
.github/pull_request_template.md
vendored
|
@ -22,3 +22,4 @@ Choose the right checklist for the change that you're making:
|
|||
## Documentation / Examples
|
||||
|
||||
- [ ] Make sure the linting passes by running `yarn lint`
|
||||
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
|
||||
|
|
|
@ -265,7 +265,15 @@ Below are the steps to add a new link:
|
|||
|
||||
## Adding examples
|
||||
|
||||
When you add an example to the [examples](examples) directory, don’t forget to add a `README.md` file with the following format:
|
||||
When you add an example to the [examples](examples) directory, please follow these guidelines to ensure high quality examples:
|
||||
|
||||
- TypeScript should be leveraged for new examples (no need for separate JavaScript and TypeScript examples)
|
||||
- Examples should not add custom eslint configuration (we have specific templates for eslint)
|
||||
- If API routes aren't used in an example, they should be omitted
|
||||
- If an example exists for a certain library and you would like to showcase a specific feature of that library, the existing example should be updated (instead of adding a new example)
|
||||
- Package manager specific config should not be added (e.g. `resolutions` in `package.json`)
|
||||
|
||||
Also don’t forget to add a `README.md` file with the following format:
|
||||
|
||||
- Replace `DIRECTORY_NAME` with the directory name you’re adding.
|
||||
- Fill in `Example Name` and `Description`.
|
||||
|
|
Loading…
Reference in a new issue