Skip to content

Commit 207823a

Browse files
committed
fix(lint): lint on CONTRIBUTING.md
1 parent 93f9571 commit 207823a

File tree

1 file changed

+81
-65
lines changed

1 file changed

+81
-65
lines changed

CONTRIBUTING.md

+81-65
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Contributing to Cannon
22

3-
- [Code of Conduct](#coc)
4-
- [Question or Problem?](#question)
5-
- [Issues and Bugs](#issue)
6-
- [Feature Requests](#feature)
7-
- [Submission Guidelines](#submit)
8-
- [Coding Rules](#rules)
9-
- [Commit Message Guidelines](#commit)
3+
- [Code of Conduct](#coc)
4+
- [Question or Problem?](#question)
5+
- [Issues and Bugs](#issue)
6+
- [Feature Requests](#feature)
7+
- [Submission Guidelines](#submit)
8+
- [Coding Rules](#rules)
9+
- [Commit Message Guidelines](#commit)
1010

1111
## <a name="coc"></a> Code of Conduct
12+
1213
Help us keep Cannon open and inclusive. Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
1314

1415
## <a name="question"></a> Got a Question or Problem?
@@ -18,52 +19,56 @@ Do not open issues for general support questions as we want to keep GitHub issue
1819
If you would like to chat about the question in real-time, you can reach out via [our discord channel][discord].
1920

2021
## <a name="issue"></a> Found a Bug?
22+
2123
If you find a bug in the source code, you can help us by
2224
[submitting an issue](#submit-issue) to our [GitHub Repository](https://github.com/usecannon/cannon/). Even better, you can
2325
[submit a Pull Request](#submit-pr) with a fix.
2426

2527
## <a name="feature"></a> Missing a Feature?
26-
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
27-
Repository. If you would like to *implement* a new feature, please submit an issue with
28+
29+
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
30+
Repository. If you would like to _implement_ a new feature, please submit an issue with
2831
a proposal for your work first, to be sure that we can use it.
2932
Please consider what kind of change it is:
3033

31-
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
32-
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
33-
and help you to craft the change so that it is successfully accepted into the project.
34-
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
34+
- For a **Major Feature**, first open an issue and outline your proposal so that it can be
35+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
36+
and help you to craft the change so that it is successfully accepted into the project.
37+
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
3538

3639
## <a name="rules"></a> Coding Rules
40+
3741
To ensure consistency throughout the source code, keep these rules in mind as you are working:
3842

39-
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
40-
* All public Cannonfile Config actions and CLI commands **must be documented**.
41-
* We follow [Google's Typescript Style Guide](https://google.github.io/styleguide/tsguide.html).
43+
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
44+
- All public Cannonfile Config actions and CLI commands **must be documented**.
45+
- We follow [Google's Typescript Style Guide](https://google.github.io/styleguide/tsguide.html).
4246

4347
We would love for you to contribute to cannon and help make it even better than it is
4448
today! As a contributor, here are the guidelines we would like you to follow:
4549

46-
- [Code of Conduct](#coc)
47-
- [Commit Message Guidelines](#commit)
50+
- [Code of Conduct](#coc)
51+
- [Commit Message Guidelines](#commit)
4852

4953
## <a name="version"></a> Versioning
50-
We follow the [SemVer](https://semver.org/) or Semantic Versioning strategy, please review their guidelines to ensure you understand the requirements for
54+
55+
We follow the [SemVer](https://semver.org/) or Semantic Versioning strategy, please review their guidelines to ensure you understand the requirements for
5156
bumping versions.
52-
57+
5358
## <a name="commit"></a> Commit Message Guidelines
5459

5560
To ensure a standardized format and help with autogenerating release notes, this repo uses commitlint, specifically the conventional config [commitlint/config-conventional](https://github.com/conventional-changelog/commitlint), please follow the conventional format for writing commit messages.
5661

57-
We have very precise rules over how our git commit messages can be formatted. This leads to **more
58-
readable messages** that are easy to follow when looking through the **project commit history**. But also,
62+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
63+
readable messages** that are easy to follow when looking through the **project commit history**. But also,
5964
we use the git commit messages to **generate the Cannon change log**.
6065

6166
### Commit Message Format
6267

63-
We use the [ConventionalCommits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format. Make sure to check their docs out for an in-depth look
68+
We use the [ConventionalCommits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format. Make sure to check their docs out for an in-depth look
6469
at the different rules and how they affect our commit format.
6570

66-
Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header has a special
71+
Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header has a special
6772
format that includes a **type**, an optional **scope** and a **subject**:
6873

6974
```
@@ -81,18 +86,20 @@ to read on GitHub as well as in various git tools.
8186

8287
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
8388

84-
Samples:
89+
Samples:
8590

8691
```
8792
docs(changelog): update changelog
8893
```
94+
8995
```
9096
fix(release): need to depend on latest hardhat
9197
9298
The version in our package.json gets copied to the one we publish, and users need the latest of these dependencies.
9399
```
94100

95101
### Type
102+
96103
The most important prefixes you should have in mind are:
97104

98105
**fix**: which represents bug fixes, and correlates to a SemVer patch.
@@ -102,27 +109,31 @@ The most important prefixes you should have in mind are:
102109
Must match one of the [conventional commit types](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum).
103110

104111
### Scope
105-
The scope should be the name of the package affected by the commit.
112+
113+
The scope should be the name of the package affected by the commit.
106114
`The list of supported scopes matches the list of packages under the packages/ directory
107115

108116
For extra reference, the following is a list of supported scopes:
109117

110-
* **builder**
111-
* **cli**
112-
* **hardhat-cannon**
118+
- **builder**
119+
- **cli**
120+
- **hardhat-cannon**
113121

114122
### Subject
123+
115124
The subject contains a succinct description of the change:
116125

117-
* use the imperative, present tense: "change" not "changed" nor "changes"
118-
* don't capitalize the first letter
119-
* no dot (.) at the end
126+
- use the imperative, present tense: "change" not "changed" nor "changes"
127+
- don't capitalize the first letter
128+
- no dot (.) at the end
120129

121130
### Body (Optional)
131+
122132
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
123133
The body should include the motivation for the change and contrast this with previous behavior.
124134

125135
### Footer (Optional)
136+
126137
The footer should contain any information about **Breaking Changes** and is also the place to
127138
reference GitHub issues that this commit **Closes**.
128139

@@ -131,8 +142,8 @@ reference GitHub issues that this commit **Closes**.
131142
A detailed explanation can be found in this [document](#commit).
132143

133144
### Revert
134-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
135145

146+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
136147

137148
## <a name="submit"></a> Submission Guidelines
138149

@@ -152,43 +163,48 @@ Depending on the issue, we will be insisting on a minimal reproduce scenario in
152163

153164
Unfortunately, in many cases we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
154165

155-
156166
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
167+
157168
Before you submit your Pull Request (PR) consider the following guidelines:
158169

159170
1. Search [GitHub](https://github.com/usecannon/cannon/pulls) for an open or closed PR
160-
that relates to your submission. You don't want to duplicate effort.
171+
that relates to your submission. You don't want to duplicate effort.
161172
1. Fork the usecannon/cannon repo.
162173
1. Make your changes in a new git branch:
163174

164-
```shell
165-
git checkout -b my-fix-branch main
166-
```
175+
```shell
176+
git checkout -b my-fix-branch main
177+
```
167178

168179
1. Create your patch, **including appropriate test cases**.
169180
1. Follow our [Coding Rules](#rules).
170-
1. Run the full cannon test suite:
171-
- From the root of the repo run `npm run test-all`, and ensure that all tests pass.
181+
1. Run the full cannon test suite:
182+
183+
- From the root of the repo run `npm run test-all`, and ensure that all tests pass.
184+
172185
1. Commit your changes using a descriptive commit message that follows our
173-
[commit message conventions](#commit). Adherence to these conventions
174-
is necessary because release notes are automatically generated from these messages.
186+
[commit message conventions](#commit). Adherence to these conventions
187+
is necessary because release notes are automatically generated from these messages.
188+
189+
```shell
190+
git commit -a
191+
```
175192

176-
```shell
177-
git commit -a
178-
```
179-
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
193+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
180194

181195
1. Push your branch to GitHub:
182196

183-
```shell
184-
git push origin my-fix-branch
185-
```
197+
```shell
198+
git push origin my-fix-branch
199+
```
186200

187201
1. In GitHub, send a pull request to `cannon:main`.
188-
* If we suggest changes then:
189-
* Make the required updates.
190-
* Re-run the Cannon test suites to ensure tests are still passing.
191-
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
202+
203+
- If we suggest changes then:
204+
205+
- Make the required updates.
206+
- Re-run the Cannon test suites to ensure tests are still passing.
207+
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
192208

193209
```shell
194210
git rebase main -i
@@ -202,20 +218,20 @@ That's it! Thank you for your contribution!
202218
After your pull request is merged, you can safely delete your branch and pull the changes
203219
from the main (upstream) repository:
204220
205-
* Check out the main branch:
221+
- Check out the main branch:
206222
207-
```shell
208-
git checkout main -f
209-
```
223+
```shell
224+
git checkout main -f
225+
```
210226
211-
* Delete the local branch:
227+
- Delete the local branch:
212228
213-
```shell
214-
git branch -D my-fix-branch
215-
```
229+
```shell
230+
git branch -D my-fix-branch
231+
```
216232
217-
* Update your main with the latest upstream version:
233+
- Update your main with the latest upstream version:
218234
219-
```shell
220-
git pull --ff upstream main
221-
```
235+
```shell
236+
git pull --ff upstream main
237+
```

0 commit comments

Comments
 (0)