Skip to content

Commit 58fd6c4

Browse files
chore: force conventional commits (#396)
1 parent d7b06f1 commit 58fd6c4

File tree

6 files changed

+756
-69
lines changed

6 files changed

+756
-69
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Pull Request checklist:
22

3-
- [ ] Write an explicit title for the Pull Request
3+
- [ ] Write an explicit title for the Pull Request, following [Conventional Commits specification](https://www.conventionalcommits.org)
44
- [ ] Write changes made in the CHANGELOG.md
55
- [ ] Create automatic tests
66
- [ ] Test manually the implemented changes

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Change Log
22

33
## [Unreleased]
4+
### Changed
5+
- Technical - Introduce conventional commits.
46

57
## RELEASE 6.0.2 - 2020-04-14
68
### Added

commitlint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: { 'header-max-length': [2, 'always', 100] },
4+
};

husky.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
hooks: {
3+
'pre-commit': 'node ./.eslint-bin/pre-commit-hook.js',
4+
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
5+
},
6+
};

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
"@babel/plugin-transform-runtime": "7.8.3",
3939
"@babel/preset-env": "7.8.3",
4040
"@babel/register": "7.8.3",
41+
"@commitlint/cli": "8.3.5",
42+
"@commitlint/config-conventional": "8.3.4",
4143
"@forestadmin/devops": "2.0.0",
4244
"babel-eslint": "10.0.3",
4345
"dotenv": "6.2.0",
@@ -46,11 +48,11 @@
4648
"eslint-plugin-import": "2.18.2",
4749
"eslint-plugin-jest": "23.0.4",
4850
"eslint-plugin-sonarjs": "0.5.0",
51+
"husky": "4.2.5",
4952
"jest": "24.9.0",
5053
"mysql2": "2.1.0",
5154
"onchange": "6.0.0",
5255
"pg": "7.10.0",
53-
"pre-commit": "1.2.2",
5456
"sequelize": "5.21.3",
5557
"sequelize-fixtures": "0.10.0",
5658
"simple-git": "1.65.0"
@@ -59,13 +61,9 @@
5961
"build": "./node_modules/.bin/babel src --out-dir dist && echo '\n\\033[0;34m[+] \\033[0;32mBuild done\\033[0m'",
6062
"build:watch": "onchange 'src/**/*.js' -i -- yarn build",
6163
"lint": "./node_modules/eslint/bin/eslint.js .eslint-bin scripts src test",
62-
"pre-commit": "node ./.eslint-bin/pre-commit-hook.js",
6364
"readme:update-coverage": "yarn test:coverage && node ./scripts/update-coverage.js",
6465
"release": "yarn build && node ./scripts/release.js",
6566
"test": "jest",
6667
"test:coverage": "jest --coverage"
67-
},
68-
"pre-commit": [
69-
"pre-commit"
70-
]
71-
}
68+
}
69+
}

0 commit comments

Comments
 (0)