Skip to content

Commit 83314bb

Browse files
committed
docs: add basic documentation
1 parent 276dcaf commit 83314bb

File tree

10 files changed

+428
-10
lines changed

10 files changed

+428
-10
lines changed

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
---
4+
Copyright 2016 by [Mario Nebl](https://github.com/marionebl) and [contributors](./graphs/contributors). Released under the [MIT license]('./license.md').

contributing.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
> Lint commit messages against your conventional-changelog preset
2+
3+
<p align="center">
4+
<h1>conventional-changelog-lint</h1>
5+
</p>
6+
7+
Yeay! You want to contribute to conventional-changelog-lint. That's amazing!
8+
To smoothen everyone's experience involved with the project please take note of the following guidelines and rules.
9+
10+
## Found an Issue?
11+
Thank you for reporting any issues you find. We do our best to test and make conventional-changelog-lint as solid as possible, but any reported issue is a real help.
12+
13+
> conventional-changelog-lint issues
14+
15+
Please follow these guidelines when reporting issues:
16+
* Provide a title in the format of `<Error> when <Task>`
17+
* Tag your issue with the tag `bug`
18+
* Provide a short summary of what you are trying to do
19+
* Provide the log of the encountered error if applicable
20+
* Provide the exact version of conventional-changelog-lint. Check `npm ls conventional-changelog-lint` when in doubt
21+
* Be awesome and consider contributing a [pull request](#want-to-contribute)
22+
23+
## Want to contribute?
24+
You consider contributing changes to conventional-changelog-lint – we dig that!
25+
Please consider these guidelines when filing a pull request:
26+
27+
> conventional-changelog-lint pull requests
28+
29+
* Follow the [Coding Rules](#coding-rules)
30+
* Follow the [Commit Rules](#commit-rules)
31+
* Make sure you rebased the current master branch when filing the pull request
32+
* Squash your commits when filing the pull request
33+
* Provide a short title with a maximum of 100 characters
34+
* Provide a more detailed description containing
35+
* What you want to achieve
36+
* What you changed
37+
* What you added
38+
* What you removed
39+
40+
## Coding Rules
41+
To keep the code base of conventional-changelog-lint neat and tidy the following rules apply to every change
42+
43+
> Coding standards
44+
45+
* [Happiness](/sindresorhus/xo) enforced via eslint
46+
* Favor micro library over swiss army knives (rimraf, ncp vs. fs-extra)
47+
* Coverage never drops below 90%
48+
* No change may lower coverage by more than 5%
49+
* Be awesome
50+
51+
## Commit Rules
52+
To help everyone with understanding the commit history of conventional-changelog-lint the following commit rules are enforced.
53+
To make your life easier conventional-changelog-lint is commitizen-friendly and provides the npm run-script `commit`.
54+
55+
> Commit standards
56+
57+
* [conventional-changelog](/commitizen/cz-conventional-changelog)
58+
* husky commit message hook available
59+
* present tense
60+
* maximum of 100 characters
61+
* message format of `$type($scope): $message`
62+
63+
64+
---
65+
Copyright 2016 by [Mario Nebl](https://github.com/marionebl) and [contributors](./graphs/contributors). Released under the [MIT license]('./license.md').

documentation/rules.md

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# Rules
2+
```js
3+
"rules": {
4+
"header-max-length": [0, "always", 72],
5+
// name: [level, applicable, value]
6+
}
7+
```
8+
Rules are made up by a name and a configuration array. The configuration array contains:
9+
* **Level** `[0..2]`: `0` disables the rule. For `1` it will be considered a warning for `2` an error.
10+
* **Applicable** `always|never`: `never` inverts the rule.
11+
* **Value**: value to use for this rule.
12+
13+
### Available rules
14+
#### type-enum
15+
* **condition**: `type` is found in value
16+
* **rule**: `always`
17+
* **value**
18+
```js
19+
[
20+
'feat',
21+
'fix',
22+
'docs',
23+
'style',
24+
'refactor',
25+
'test',
26+
'chore',
27+
'revert'
28+
]
29+
```
30+
31+
#### type-case
32+
* **description**: `type` is in case `value`
33+
* **rule**: `always`
34+
* **value**
35+
```js
36+
'lowerCase'
37+
```
38+
39+
#### type-empty
40+
* **condition**: `type` is empty
41+
* **rule**: `never`
42+
43+
#### type-max-length
44+
* **condition**: `type` has `value` or less characters
45+
* **rule**: `always`
46+
* **value**
47+
```js
48+
Infinity
49+
```
50+
51+
#### type-min-length
52+
* **condition**: `type` has `value` or more characters
53+
* **rule**: `always`
54+
* **value**
55+
```js
56+
0
57+
```
58+
59+
#### scope-enum
60+
* **condition**: `scope` is found in value
61+
* **rule**: `always`
62+
* **value**
63+
```js
64+
[]
65+
```
66+
67+
#### scope-case
68+
* **condition**: `scope` is in case `value`
69+
* **rule**: `always`
70+
```js
71+
'lowerCase'
72+
```
73+
74+
#### scope-empty
75+
* **condition**: `scope` is empty
76+
* **rule**: `never`
77+
78+
#### scope-max-length
79+
* **condition**: `scope` has `value` or less characters
80+
* **rule**: `always`
81+
* **value**
82+
```js
83+
Infinity
84+
```
85+
86+
#### scope-min-length
87+
* **condition**: `scope` has `value` or more characters
88+
* **rule**: `always`
89+
* **value**
90+
```js
91+
0
92+
```
93+
94+
#### subject-case
95+
* **condition**: `subject` is in case `value`
96+
* **rule**: `always`
97+
```js
98+
'lowerCase'
99+
```
100+
101+
#### subject-empty
102+
* **condition**: `subject` is empty
103+
* **rule**: `never`
104+
105+
#### subject-max-length
106+
* **condition**: `subject` has `value` or less characters
107+
* **rule**: `always`
108+
* **value**
109+
```js
110+
Infinity
111+
```
112+
113+
#### subject-min-length
114+
* **condition**: `subject` has `value` or more characters
115+
* **rule**: `always`
116+
* **value**
117+
```js
118+
0
119+
```
120+
121+
#### subject-full-stop
122+
* **condition**: `subject` ends with `value`
123+
* **rule**: `never`
124+
* **value**
125+
```js
126+
'.'
127+
```
128+
129+
#### body-leading-blank
130+
* **condition**: `body` begins with blank line
131+
* **rule**: `always`
132+
133+
#### body-max-length
134+
* **condition**: `body` has `value` or less characters
135+
* **rule**: `always`
136+
* **value**
137+
```js
138+
Infinity
139+
```
140+
141+
#### body-min-length
142+
* **condition**: `body` has `value` or more characters
143+
* **rule**: `always`
144+
* **value**
145+
```js
146+
0
147+
```
148+
149+
#### header-max-length
150+
* **condition**: `header` has `value` or less characters
151+
* **rule**: `always`
152+
* **value**
153+
```js
154+
72
155+
```
156+
157+
#### header-min-length
158+
* **condition**: `header` has `value` or more characters
159+
* **rule**: `always`
160+
* **value**
161+
```js
162+
0
163+
```
164+
165+
#### lang
166+
* **condition**: `subject` is of language `value`
167+
* **rule**: `always`
168+
* **value**
169+
```js
170+
eng
171+
```
172+
173+
### Wildcards
174+
The following rules identify commits that pass linting by skipping all other rules.
175+
176+
#### merge
177+
* **condition**: `header` matches `pattern`
178+
179+
#### release
180+
* **condition**: `header` matches `pattern`
181+
182+
#### revert
183+
* **condition**: `header` matches `pattern`
184+
185+
---
186+
Copyright 2016 by [Mario Nebl](https://github.com/marionebl) and [contributors](./graphs/contributors). Released under the [MIT license]('../license.md').

documentation/shareable-config.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Shareable configuration
2+
3+
```js
4+
"extends": ["angular"]
5+
```
6+
7+
Every array item found in `extends` is resolved to `conventional-changelog-lint-config-${name}`. The default main export found there is merged into the configuration with increasing precedence. This works recursively, enabling shareable configuration to extend on an indefinite chain of other shareable configurations.
8+
9+
See the [angular](/marionebl/conventional-changelog-lint-config-angular) shareable configuration as example. This configuration is the default used by `conventional-changelog-lint`.
10+
11+
---
12+
Copyright 2016 by [Mario Nebl](https://github.com/marionebl) and [contributors](./graphs/contributors). Released under the [MIT license]('../license.md').

license.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Mario Nebl
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
---
24+
Copyright 2016 by [Mario Nebl](https://github.com/marionebl) and [contributors](./graphs/contributors). Released under the [MIT license]('./license.md').

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"changelog": "conventional-changelog --preset angular --infile changelog.md --same-file --output-unreleased",
1515
"push": "git push && git push --tags && hub release create \"v$(cat .git/RELEASE_VERSION.tmp)\" --message=\"v$(cat .git/RELEASE_VERSION.tmp)\n$(cat .git/COMMITMSG.tmp)\" && npm publish && rm .git/RELEASE_VERSION.tmp && rm .git/COMMITMSG.tmp",
1616
"release": "npm version $(conventional-recommended-bump -p angular)",
17-
"test": "eslint *.js && jsonlint-cli *.json && node distribution/cli.js",
17+
"test": "eslint *.js && jsonlint-cli *.json && node distribution/cli.js --from=HEAD~1",
1818
"preversion": "npm test",
1919
"version": "npm run changelog && git add . && echo \"$(conventional-changelog -p angular)\" > .git/COMMITMSG.tmp",
2020
"postversion": "echo $(git log -1 --pretty=%B HEAD^..HEAD) > .git/RELEASE_VERSION.tmp && git tag -d v$(cat .git/RELEASE_VERSION.tmp) && git commit --amend -m \"chore(release): $(cat .git/RELEASE_VERSION.tmp)\n$(cat .git/COMMITMSG.tmp)\" && git tag -a v$(cat .git/RELEASE_VERSION.tmp) -m \"$(cat .git/COMMITMSG.tmp)\""

0 commit comments

Comments
 (0)