You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,14 @@
11
11
12
12
<!-- Link any relevant issues if necessary or include a transcript of any Discord discussion. -->
13
13
14
+
<!-- If you create a user-facing change, please write a changeset: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#writing-a-changeset (your changeset is often a good starting point for this summary as well) -->
15
+
14
16
## Test Plan
15
17
16
18
<!-- What demonstrates that your implementation is correct? -->
19
+
20
+
## Docs
21
+
22
+
<!-- If you're submitting a new rule or action (or an option for them), the documentation is part of the code. Make sure rules and actions have example usages, and that all options are documented. -->
23
+
24
+
<!-- For other features, please submit a documentation PR to the `next` branch of our website: https://github.com/biomejs/website/. Link the PR here once it's ready. -->
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+30-14Lines changed: 30 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,7 +365,12 @@ We are using [action-semantic-pull-request](https://github.com/amannn/action-sem
365
365
When creating a new pull request, it's preferable to use a conventional commit-formatted title, as this title will be used as the default commit message on the squashed commit after merging.
366
366
See the [dedicated section](#commit-messages) about conventional commit format.
367
367
368
-
Please use the template provided.
368
+
When creating a PR, follow the following instructions:
369
+
- if you fix a bug (code or documentation), send a PR to the maintenance branch `main`.
370
+
- if you add a **new nursery rule**, send a PR to the maintenance branch `main`. Nursery rules don't follow semantic versioning.
371
+
- if you promote a rule from nursery, send a PR to the `next` branch.
372
+
- if you implement a new feature that affects end users, send a PR to the `next` branch.
373
+
- if you implement a new feature that _doesn't affect end users_, send a PR to the maintenance `main` branch.
369
374
370
375
### Changelog
371
376
@@ -408,26 +413,29 @@ We are very strict about `major` changes in the `@biomejs/biome` package. To bet
408
413
-`minor`: new features available to the users.
409
414
-`major`: a change that breaks a user API.
410
415
416
+
When choosing `minor` or `major`, make sure your PR targets the `next` branch instead of `main`.
417
+
411
418
#### Writing a changeset
412
419
413
420
The description of the changeset should follow the these guidelines:
414
421
422
+
- Our changesets should be about _user-facing_ changes. Internal changes don't
423
+
need changesets.
415
424
- Use the past tense when describing what you did, e.g. "Added new feature", "Fixed edge case".
416
425
- Use the present tense when describing Biome behavior, e.g. "Biome now supports ...".
417
-
- If you fixed a bug, please add the link to the issue, e.g. "Fixed [#4444](https://github.com/biomejs/biome/issues/4444)".
426
+
- If you fixed a bug, please start with a link to the issue, e.g. "Fixed [#4444](https://github.com/biomejs/biome/issues/4444): ...".
418
427
- If you reference a rule, please add the link to the rule on the website, e.g. "Added the rule [`useAwesomeThing`](https://biomejs.dev/linter/rules/use-awesome-thing/)" (even if the website isn't updated yet, the URL is pretty predictable...).
419
428
- Similarly, if you reference an assist, please add the link to the assist on the website, e.g. "Added the assist [`awesomeAction`](https://biomejs.dev/assist/actions/awesome-action/)".
420
-
- Whenever applicable, add a code block to show your new changes. For example, for a new
421
-
rule you might want to show an invalid case, for the formatter you might want to show
422
-
how the new formatting changes, and so on.
423
-
- End each sentence with fullstops.
429
+
- Whenever applicable, add a code block to show your new changes. For example, for a new rule you should show an invalid case, while for the formatter you should show how the new formatting changes, and so on.
430
+
- End every sentence with a full stop (`.`).
424
431
425
432
If in doubt, take a look at existing or past changesets.
426
433
427
434
### Documentation
428
435
429
-
If your PR requires some update on the website (new features, breaking changes, etc.), you should create a new PR once the previous PR is successfully merged.
430
-
When adding new features, the documentation should be part of a new PR, which will be merged right before the release.
436
+
If your PR involves new features, or changes to existing features, documentation must be updated as well. For rules, assists, and their options, this is done using inline [rustdoc](https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html) documentation.
437
+
438
+
When other documentation updates are required, such as new formatter options, a PR should be created against the `next` branch of [our website](https://github.com/biomejs/website/). When doing so, please link the documentation PR from the PR that introduces the feature.
431
439
432
440
### Versioning
433
441
@@ -446,24 +454,32 @@ Even minor versions are dedicated to official releases, e.g. `*.6.*`.
446
454
447
455
### Regular releases
448
456
449
-
When releasing a new version of a Biome, follow these steps:
457
+
When releasing a new **minor** or **major** version of a Biome, follow these steps:
458
+
459
+
1.[ ] Create a PR from `next` to `main`. Make sure that code conflicts are fixed and the new features have relative docs PR.
460
+
461
+
1.[ ] Merge `next` to `main`.
450
462
451
463
1.[ ]**Update to the same `version` in all crates** if you publish crates, if applicable. (`Cargo.toml` and `crates/**/Cargo.toml`)
452
464
453
465
1.[ ] Linter rules have a `version` metadata directly defined in their implementation.
454
-
This field is set to `next` for newly created rules.
466
+
This field is set to `"next"` for newly created rules.
455
467
This field must be updated to the new version.
456
468
457
-
1.[ ] Merge the PR `ci: release`, and the release workflow will run. Once these workflows finish compiling the final artefact, **they need to be approved manually** by a member of the **Core Contributors**.
469
+
1.[ ] Merge the `ci: release` PR, and the release workflow will run. Once these workflows finish compiling the final artefact, **they need to be approved manually** by a member of the **Core Contributors**.
458
470
459
-
1.[ ] In the [website repository](https://github.com/biomejs/website), merge `next` into `main` with a PR. Usually, `next` contains the docs of new rules/actions. As well as the docs of new options.
460
-
461
-
1.[ ] Open a new PR in the [website repository](https://github.com/biomejs/website) to update the website with the new version number:
471
+
1.[ ] Update the generated documentation in the `next` branch of the [website](https://github.com/biomejs/website):
462
472
`BIOME_VERSION=<version> pnpm run codegen:all`.
463
473
This will also copy the configuration schema in the right place.
464
474
475
+
1.[ ] Merge the website's `next` branch into `main` with a PR. Once merged, the documentation will automatically deploy.
476
+
465
477
1.[ ] After releasing a major version number, you may want to update the `update-preview-version.mjs` script to make sure that future previews indicate a version number with a higher patch version than is currently indicated in the `package.json` manifests.
466
478
479
+
1.[ ] Make sure you create new `next` branches for both the main repository and the website.
480
+
481
+
**patch** releases only require a merging of the `ci: release` PR, and should leave the `next` branches untouched.
482
+
467
483
## Resources
468
484
469
485
We have several resources explaining about Biome. They will help you understand the project and codebase.
0 commit comments