Skip to content

Commit 9f3edde

Browse files
committed
docs: tweak code display in contributing guide
1 parent c50d5ba commit 9f3edde

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

src/content/docs/contributor/contributing.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ You can use any editor you like. We recommend something that understands TypeScr
123123
1. Fork [LavaMoat/LavaMoat][lavamoat]
124124
2. Clone your fork to your local machine:
125125

126-
```shell
126+
```shell frame="none"
127127
git clone https://github.com/your-username/LavaMoat
128128
```
129129

130130
3. Navigate to the `LavaMoat` directory and run `npm install`.
131131
4. Run `npm run setup` to build the project and install Git hooks.
132132
5. To work with upstream changes, add a new Git remote to your working copy:
133133

134-
```shell
134+
```shell frame="none"
135135
git remote add upstream https://github.com/LavaMoat/LavaMoat
136136
```
137137

@@ -172,7 +172,7 @@ git commit
172172

173173
LavaMoat follows the [Conventional Commits][] convention for commit messages, which helps automate the [release workflow][]. Here's an example commit message:
174174

175-
```txt
175+
```text
176176
tag: Short description of what you did
177177
178178
Longer description here if necessary
@@ -191,7 +191,13 @@ The `tag` is one of the following:
191191
- `docs` - changes to documentation only.
192192
- `chore` - for changes that aren't user-facing.
193193

194-
The `scope` (in parentheses) is typically the _directory name_ relative to `packages/` of the affected project. If multiple projects are affected, separate them by commas. For example:
194+
The `scope` (in parentheses) is typically the _directory name_ relative to `packages/` of the affected package (workspace). For example:
195+
196+
```text
197+
chore(webpack): frobnicate the widget
198+
```
199+
200+
If multiple projects are affected, separate them by commas:
195201

196202
```text
197203
fix(core,node): fix a bug in lavamoat-core and lavamoat-node
@@ -207,9 +213,11 @@ The message summary should be a one-sentence description of the change. If the p
207213

208214
Here are some good commit message summary examples:
209215

210-
```txt
216+
```text
211217
feat!(core): added default behavior
218+
212219
fix: semicolons no longer breaking everything
220+
213221
chore(webpack): upgrade to browserify v5
214222
```
215223

@@ -252,12 +260,18 @@ Next, push your changes to your clone:
252260
git push origin issue1234
253261
```
254262

255-
If you are unable to push because some references are old, do a forced push instead:
263+
If you are unable to push because some references are old, force-push instead:
256264

257265
```shell
258266
git push -f origin issue1234
259267
```
260268

269+
:::caution[Force Pushing]
270+
271+
Force-pushing is a potentially dangerous operation. Read this post about [how to safely use force-push][force-push].
272+
273+
:::
274+
261275
### Step 7: Send the pull request<a name="step7"></a>
262276

263277
Now you're ready to send the pull request. Go to your Lav aMoat fork and then follow the [GitHub documentation][github-pr] on how to send a pull request.
@@ -336,3 +350,4 @@ The LavaMoat team thanks you for contributing! "You're welcome" is appreciated,
336350
[github-conflicts]: https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/
337351
[conventional commits]: https://www.conventionalcommits.org/https://www.conventionalcommits.org/
338352
[release workflow]: /contributor/release
353+
[force-push]: https://adamj.eu/tech/2023/10/31/git-force-push-safely/

0 commit comments

Comments
 (0)