Skip to content

Commit 28603c2

Browse files
sapphi-redyyx990803patak-dev
authored
chore: add section about stylistic changes in contribution guide (#19884)
Co-authored-by: Evan You <[email protected]> Co-authored-by: patak <[email protected]>
1 parent 4bc17b4 commit 28603c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CONTRIBUTING.md

+6
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,12 @@ For a mock dependency, make sure you add a `@vitejs/test-` prefix to the package
236236
- Provide a detailed description of the bug in the PR. Live demo preferred.
237237
- Add appropriate test coverage if applicable.
238238

239+
- If it's a chore:
240+
241+
- For typos and comment changes, try to combine multiple of them into a single PR.
242+
- **Note that we discourage contributors from submitting code refactors that are largely stylistic.** Code refactors are only accepted if it improves performance, or objectively improves code quality (e.g. makes a related bug fix or feature implementation easier, and it is as a separate PR to improve git history).
243+
- The reason is that code readability is subjective. The maintainers of this project have chosen to write the code in its current style based on our preferences, and we do not want to spend time explaining our stylistic preferences. Contributors should just respect the established conventions when contributing code. Another aspect of it is that large scale stylistic changes result in massive diffs that touch multiple files, adding noise to the git history and makes tracing behavior changes across commits more cumbersome.
244+
239245
- It's OK to have multiple small commits as you work on the PR. GitHub can automatically squash them before merging.
240246

241247
- Make sure tests pass!

0 commit comments

Comments
 (0)