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:
JJ Kasper 2022-05-25 20:24:53 -05:00 committed by GitHub
parent 0d95886815
commit 7206614d0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -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)

View file

@ -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, dont 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 dont forget to add a `README.md` file with the following format:
- Replace `DIRECTORY_NAME` with the directory name youre adding.
- Fill in `Example Name` and `Description`.