Skip to content

Commit d14e1d2

Browse files
authored
feat: document commit linting (#53)
1 parent 505d53f commit d14e1d2

File tree

3 files changed

+70
-188
lines changed

3 files changed

+70
-188
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ module.exports = {
3333
"@netlify/eslint-config-node/.prettierrc.json"
3434
```
3535

36+
- Add the following `commitlint.config.js` to the root of the project:
37+
38+
```js
39+
module.exports = { extends: ['@commitlint/config-conventional'] }
40+
```
41+
3642
- Copy the `.editorconfig` and `.gitattributes` files relativity to the root of the project.
3743
- Add the following properties to the `package.json`. Please replace the `scriptsArgs` globbing expressions to match the
3844
files where the source JavaScript/Markdown/HTML/JSON/YAML files are located. `npm run format` should also be run
@@ -57,6 +63,7 @@ module.exports = {
5763
},
5864
"husky": {
5965
"hooks": {
66+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
6067
"pre-push": "npm run format"
6168
}
6269
}

0 commit comments

Comments
 (0)