Skip to content

Commit 09c4250

Browse files
committed
feat: add commit linter
1 parent 98f612f commit 09c4250

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

.releaserc

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"branches": [
3+
"master"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
[
8+
"@semantic-release/release-notes-generator",
9+
{
10+
"preset": "conventionalcommits",
11+
"parserOpts": {
12+
"noteKeywords": [
13+
"BREAKING CHANGE",
14+
"BREAKING CHANGES",
15+
"BREAKING"
16+
]
17+
},
18+
"writerOpts": {
19+
"commitsSort": [
20+
"subject",
21+
"scope"
22+
]
23+
}
24+
}
25+
],
26+
"@semantic-release/github",
27+
[
28+
"@semantic-release/changelog",
29+
{
30+
"changelogFile": "CHANGELOG.md",
31+
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines."
32+
}
33+
],
34+
[
35+
"@semantic-release/git",
36+
{
37+
"message": "chore(release): ${nextRelease.version} [skip ci]\n"
38+
}
39+
]
40+
]
41+
}

commitlint.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'scope-case': [
5+
2,
6+
'never',
7+
[],
8+
],
9+
'header-max-length': [2, 'always', 300],
10+
'subject-case': [
11+
2,
12+
'never',
13+
['pascal-case', 'camel-case', 'snake-case', 'kebab-case'],
14+
],
15+
}
16+
}

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "behat-http-mock-context",
3+
"devDependencies": {
4+
"@commitlint/cli": "^11.0.0",
5+
"@commitlint/config-conventional": "^11.0.0",
6+
"@semantic-release/changelog": "^5.0.1",
7+
"@semantic-release/git": "^9.0.1",
8+
"husky": "^4.3.0",
9+
"semantic-release": "^17.4.7"
10+
},
11+
"husky": {
12+
"hooks": {
13+
"commit-msg": "commitlint --verbose -E HUSKY_GIT_PARAMS"
14+
}
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/MacPaw/BehatHttpMockContext.git"
19+
},
20+
"license": "ISC",
21+
"bugs": {
22+
"url": "https://github.com/MacPaw/BehatHttpMockContext/issues"
23+
},
24+
"homepage": "https://github.com/MacPaw/BehatHttpMockContext#readme"
25+
}

0 commit comments

Comments
 (0)