Skip to content

Commit 104f026

Browse files
committed
fix(lint): fix markdown files issues raised by markdownlint
also fixes checkov issue
1 parent d347be7 commit 104f026

File tree

16 files changed

+303
-222
lines changed

16 files changed

+303
-222
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
branches:
1010
- main
1111

12-
permissions:
13-
contents: read
12+
permissions: read-all
1413

1514
jobs:
1615
lint:

.markdownlint.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"default": true,
3+
"MD013": {
4+
"code_block_line_length": 120
5+
},
6+
"MD025": {
7+
"front_matter_title": ""
8+
}
9+
}

CONTRIBUTING.md

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
# Contributing to the Mockbukkit Documentation
22

3-
Thank you for your interest in contributing to our documentation!
4-
We welcome contributions from the community to help improve and expand our documentation.
3+
Thank you for your interest in contributing to our documentation! We welcome
4+
contributions from the community to help improve and expand our documentation.
55

66
## Getting Started
77

88
### Prerequisites
99

10-
Before you start contributing, ensure you have the following prerequisites installed:
10+
Before you start contributing, ensure you have the following prerequisites
11+
installed:
1112

1213
- [Git](https://git-scm.com/)
1314
- [Node.js](https://nodejs.org/) (version 18.x or higher)
1415
- [pnpm](https://pnpm.io/)
1516

1617
### Setting Up the Development Environment
1718

18-
1. **Fork the Repository**: Start by forking the documentation repository to your own GitHub account.
19+
1. **Fork the Repository**: Start by forking the documentation repository to
20+
your own GitHub account.
1921

20-
2. **Clone the Repository**: Next, clone the forked repository to your local machine.
22+
2. **Clone the Repository**: Next, clone the forked repository to your local
23+
machine.
2124

2225
```bash
2326
git clone https://github.com/your-username/docs.git
2427
```
2528

26-
3. **Install Dependencies**: Install the necessary dependencies for the documentation project.
29+
3. **Install Dependencies**: Install the necessary dependencies for the
30+
documentation project.
2731

2832
```bash
2933
cd docs
3034
pnpm install
3135
```
3236

33-
4. **Start the Development Server**: Start the Vitepress development server to preview your changes.
37+
4. **Start the Development Server**: Start the Vitepress development server to
38+
preview your changes.
3439

3540
```bash
3641
pnpm run docs:dev
3742
```
3843

39-
The development server will start, and you can access the documentation site at `http://localhost:5173`.
44+
The development server will start, and you can access the documentation site
45+
at <http://localhost:5173>.
4046

4147
## Making Changes
4248

@@ -46,15 +52,17 @@ Before you start contributing, ensure you have the following prerequisites insta
4652
git checkout -b my-feature-branch
4753
```
4854

49-
2. **Update the Documentation**: Make your changes to the documentation. This could include:
55+
2. **Update the Documentation**: Make your changes to the documentation. This
56+
could include:
5057

5158
- Adding new pages
5259
- Updating existing content
5360
- Fixing typos or grammatical errors
5461
- Improving the organization or structure of the documentation
5562
- Adding new translations
5663

57-
3. **Preview Your Changes**: Use the Vitepress development server to preview your changes and ensure they look as expected.
64+
3. **Preview Your Changes**: Use the Vitepress development server to preview
65+
your changes and ensure they look as expected.
5866

5967
4. **Commit and Push Your Changes**: Once you're satisfied with your changes,
6068
commit them and push the branch to your forked repository.
@@ -67,26 +75,32 @@ Before you start contributing, ensure you have the following prerequisites insta
6775

6876
## Submitting a Pull Request
6977

70-
1. **Create a Pull Request**: Go to the original repository on GitHub and create a new pull request,
71-
comparing your feature branch with the main branch of the original repository.
78+
1. **Create a Pull Request**: Go to the original repository on GitHub and create
79+
a new pull request, comparing your feature branch with the main branch of
80+
the original repository.
7281

7382
2. **Describe Your Changes**: In the pull request description,
74-
provide a clear and concise explanation of the changes you've made and why they are valuable to the project.
83+
provide a clear and concise explanation of the changes you've made and why
84+
they are valuable to the project.
7585

76-
3. **Address Feedback**: The maintainers may request changes or provide feedback on your pull request.
77-
Please be responsive to this feedback and make any necessary updates to your branch.
86+
3. **Address Feedback**: The maintainers may request changes or provide feedback
87+
on your pull request. Please be responsive to this feedback and make any
88+
necessary updates to your branch.
7889

7990
## Coding Style and Guidelines
8091

81-
- Follow the existing coding style and formatting used in the documentation repository.
82-
- Ensure your changes are consistent with the overall tone and voice of the documentation.
83-
- Make use of Vitepress's built-in features, such as frontmatter, custom components, and Markdown extensions, where appropriate.
92+
- Follow the existing coding style and formatting used in the documentation
93+
repository.
94+
- Ensure your changes are consistent with the overall tone and voice of the
95+
documentation.
96+
- Make use of Vitepress's built-in features, such as frontmatter, custom
97+
components, and Markdown extensions, where appropriate.
8498
- Write clear and concise documentation that is easy for users to understand.
8599

86100
### Code blocks
87101

88-
For code blocks where multiple languages can be used, vitepress provides a way to
89-
specify blocks for multiple languages. Use the following syntax:
102+
For code blocks where multiple languages can be used, vitepress provides a way
103+
to specify blocks for multiple languages. Use the following syntax:
90104

91105
````md
92106
::: code-group
@@ -104,10 +118,12 @@ specify blocks for multiple languages. Use the following syntax:
104118

105119
## Vitepress Markdown Extensions
106120

107-
Vitepress provides a variety of Markdown extensions that can be used to enhance the documentation.
108-
You can find a list of available extensions in the [Vitepress documentation](https://vitepress.dev/guide/markdown).
121+
Vitepress provides a variety of Markdown extensions that can be used to enhance
122+
the documentation. You can find a list of available extensions in
123+
the [Vitepress documentation](https://vitepress.dev/guide/markdown).
109124

110125
## Thank You
111126

112127
We appreciate your contributions to the Mockbukkit documentation.
113-
By working together, we can create high-quality, user-friendly documentation that benefits the entire community.
128+
By working together, we can create high-quality, user-friendly documentation
129+
that benefits the entire community.

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Mockbukkit Docs
22

3-
This repository is the place where you can find the code for all documentation provided by the
4-
MockBukkit project. The repository is published under [docs.mockbukkit.org](https://docs.mockbukkit.org).
3+
This repository is the place where you can find the code for all documentation
4+
provided by the MockBukkit project. The repository is published under
5+
[docs.mockbukkit.org](https://docs.mockbukkit.org).
56

67
## Getting started
78

8-
This is how you can get started working on the docs on your local development machine.
9+
This is how you can get started working on the docs on your local development
10+
machine.
911

10-
### Prerequisites:
12+
### Prerequisites
1113

1214
- [node](https://nodejs.org)
1315
- [pnpm](https://pnpm.io/)
@@ -33,7 +35,8 @@ This is how you can get started working on the docs on your local development ma
3335
pnpm docs:build // build for production
3436
```
3537

36-
In the case of building for production, the site will be generated in the `.vitepress/dist` directory.
38+
In the case of building for production, the site will be generated in the
39+
`.vitepress/dist` directory.
3740

3841
### Previewing
3942

@@ -44,15 +47,20 @@ pnpm docs:preview
4447
```
4548

4649
This will start a local server on port 5173.
47-
You can then access the site at http://localhost:5173.
50+
You can then access the site at <http://localhost:5173>.
4851

4952
## Contributing
5053

51-
Contributions are welcome! Please read the [contribution guidelines](https://github.com/MockBukkit/docs/blob/main/CONTRIBUTING.md) before submitting a pull request.
54+
Contributions are welcome! Please read the
55+
<!-- markdownlint-disable-next-line MD013 -->
56+
[contribution guidelines](https://github.com/MockBukkit/docs/blob/main/CONTRIBUTING.md)
57+
before submitting a pull request.
5258

5359
## License
5460

5561
The MockBukkit documentation is licensed under two licenses:
5662

57-
- Docs: [Creative Commons Attribution-ShareAlike 4.0 International](https://github.com/MockBukkit/docs/blob/main/docs/LICENSE)
58-
- Supporting Code: [MIT License](https://github.com/MockBukkit/docs/blob/main/LICENSE)
63+
- Docs:
64+
[Creative Commons Attribution-ShareAlike 4.0 International](https://github.com/MockBukkit/docs/blob/main/docs/LICENSE)
65+
- Supporting Code:
66+
- [MIT License](https://github.com/MockBukkit/docs/blob/main/LICENSE)

docs/en/contribution/maintainers/pr_guide.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ and attract new people to help drive this project forward!
1313

1414
:::
1515

16-
We use [GitHub Labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels)
17-
to automatically tag PRs with a version number on merge. This removes the tedious work of keeping version numbers up
18-
to date across several PRs at a time and eliminate Human error. The following custom labels, all of them following the
16+
We
17+
use [GitHub Labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels)
18+
to automatically tag PRs with a version number on merge. This removes the
19+
tedious work of keeping version numbers up
20+
to date across several PRs at a time and eliminate Human error. The following
21+
custom labels, all of them following the
1922
pattern of `release/*`, are used by Mockbukkit:
2023

21-
| Label | Semantic Version Type | | Description |
22-
| -------------------------------------------- | :-------------------- | :-- | :------------------------------------- |
23-
| <Badge type="danger" text="release/major"/> | Major Version (X.0.0) | | Only used for breaking changes |
24-
| <Badge type="warning" text="release/minor"/> | Minor Version (0.X.0) | | New Features |
25-
| <Badge type="tip" text="release/patch"/> | Patch Version (0.0.X) | | Bugfixes |
26-
| <Badge type="info" text="release/none"/> | None (-) | | Method Stubs or non code related fixes |
24+
| Label | Semantic Version Type | | Description | <!-- markdownlint-disable-line MD033 MD013 -->
25+
|----------------------------------------------|:----------------------|:----|:---------------------------------------| <!-- markdownlint-disable-line MD033 MD013 -->
26+
| <Badge type="danger" text="release/major"/> | Major Version (X.0.0) | | Only used for breaking changes | <!-- markdownlint-disable-line MD033 MD013 -->
27+
| <Badge type="warning" text="release/minor"/> | Minor Version (0.X.0) | | New Features | <!-- markdownlint-disable-line MD033 MD013 -->
28+
| <Badge type="tip" text="release/patch"/> | Patch Version (0.0.X) | | Bugfixes | <!-- markdownlint-disable-line MD033 MD013 -->
29+
| <Badge type="info" text="release/none"/> | None (-) | | Method Stubs or non code related fixes | <!-- markdownlint-disable-line MD033 MD013 -->
2730

28-
As you can probably tell, this project uses [Semantic Versioning](https://semver.org/).
31+
As you can probably tell, this project
32+
uses [Semantic Versioning](https://semver.org/).

docs/en/user_guide/advanced/adventure.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ prev:
1111

1212
::: info
1313

14-
This talks about the [Kyori Adventure](https://github.com/KyoriPowered/adventure-platform) Library.
14+
This talks about the
15+
[Kyori Adventure](https://github.com/KyoriPowered/adventure-platform)Library.
1516
This has no connection to the Adventure Gamemode
1617

1718
:::
@@ -20,10 +21,11 @@ This has no connection to the Adventure Gamemode
2021

2122
When using MockBukkit with the non-native implementation of Adventure,
2223
you may run into issues with static fields persisting with `Audiences`,
23-
even after executing `MockBukkit.unmock()`.
24-
This can cause undesired issues when running consecutive tests like chat messages not sending.
24+
even after executing `MockBukkit.unmock()`.This can cause undesired issues when
25+
running consecutive tests like chat messages not sending.
2526

26-
The solution is to include a `platform.close()` statement in the `onDisable()` method of your plugin.
27+
The solution is to include a `platform.close()` statement in the `onDisable()`
28+
method of your plugin.
2729

2830
::: code-group
2931

docs/en/user_guide/advanced/custom_server_mock.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ next:
1111

1212
# Create a Custom Server Mock
1313

14-
Sometimes it may be needed to use a custom implementation of the `ServerMock` class.
15-
This could be if you want to implement some of the unimplemented methods or simply provide your own mocks for certain methods.
14+
Sometimes it may be needed to use a custom implementation of the `ServerMock`
15+
class. This could be if you want to implement some of the unimplemented methods
16+
or simply provide your own mocks for certain methods.
1617

17-
To do that you can simply pass your custom mock that extends `ServerMock` to the `MockBukkit#mock(ServerNock)` method.
18+
To do that you can simply pass your custom mock that extends `ServerMock` to the
19+
`MockBukkit#mock(ServerNock)` method.
1820

1921
::: code-group
2022

docs/en/user_guide/advanced/events.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ next:
1111

1212
# Events
1313

14-
Checking the status of events is one of the most common task done by any Bukkit Developer.
15-
Therefore Mockbukkit provides support for these kind of tasks.
14+
Checking the status of events is one of the most common task done by any Bukkit
15+
Developer. Therefore, MockBukkit provides support for these kinds of tasks.
1616

1717
## Asserting that Events were fired
1818

19-
Mockbukkit provides a way to check if Events are fired.
20-
Events are Classes that extend `org.bukkit.event.Event` and are fired by Bukkit.
19+
Mockbukkit provides a way to check if Events are fired.Events are Classes that
20+
extend `org.bukkit.event.Event` and are fired by Bukkit.
2121

22-
To check if an event is fired,
23-
you can use the `PluginManagerMock#assertEventFired(Class<? extends Event>)` method.
24-
This method takes a class that extends `org.bukkit.event.Event`.
25-
It will then check if an event of that type was fired.
22+
To check if an event is fired, you can use the
23+
`PluginManagerMock#assertEventFired(Class<? extends Event>)`method. This method
24+
takes a class that extends `org.bukkit.event.Event`. It will then check if an
25+
event of that type was fired.
2626

2727
::: code-group
2828

@@ -79,8 +79,10 @@ class MyPluginTests {
7979

8080
### Assert Event with specific values
8181

82-
If you want to check if an event was fired with a specific value,
83-
you can use the `PluginManagerMock#assertEventFired(Class<? extends Event>, Predicate<Event>)` method.
82+
If you want to check if an event was fired with a specific value, you can use
83+
the
84+
`PluginManagerMock#assertEventFired(Class<? extends Event>, Predicate<Event>)`
85+
method.
8486

8587
::: code-group
8688

@@ -139,10 +141,10 @@ class MyPluginTests {
139141

140142
:::
141143

142-
### Custom Failure Message
144+
### Custom Failure Message with `assertEventFired`
143145

144-
You can also set a custom failure message for the assertion
145-
by using the `PluginManagerMock#assertEventFired(Class<? extends Event>, String)` method.
146+
You can also set a custom failure message for the assertion by using the
147+
`PluginManagerMock#assertEventFired(Class<? extends Event>, String)` method.
146148

147149
::: code-group
148150

@@ -199,8 +201,8 @@ class MyPluginTests {
199201

200202
## Asserting that Events were not fired
201203

202-
You can also check if an event was not fired by
203-
using the `PluginManagerMock#assertEventNotFired(Class<? extends Event>)` method.
204+
You can also check if an event was not fired by using the
205+
`PluginManagerMock#assertEventNotFired(Class<? extends Event>)` method.
204206

205207
::: code-group
206208

@@ -253,10 +255,10 @@ class MyPluginTests {
253255
}
254256
```
255257

256-
### Custom Failure Message
258+
### Custom Failure Message with `assertEventNotFired`
257259

258-
You can also set a custom failure message for the assertion by
259-
using the `PluginManagerMock#assertEventNotFired(Class<? extends Event>, String)` method.
260+
You can also set a custom failure message for the assertion by using the
261+
`PluginManagerMock#assertEventNotFired(Class<? extends Event>, String)` method.
260262

261263
::: code-group
262264

0 commit comments

Comments
 (0)