From 1e5e4c36d1d033aca55289fa0945296e12cbb6fd Mon Sep 17 00:00:00 2001 From: Thomas Allmer Date: Sat, 29 Sep 2018 14:27:55 +0200 Subject: [PATCH] feat: add commitlint and husky --- commitlint.config.js | 6 ++++++ husky.config.js | 6 ++++++ package.json | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 commitlint.config.js create mode 100644 husky.config.js diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..77312d98 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,6 @@ +module.exports = { + extends: [ + '@commitlint/config-conventional', + '@commitlint/config-lerna-scopes', + ], +}; diff --git a/husky.config.js b/husky.config.js new file mode 100644 index 00000000..718bbcd8 --- /dev/null +++ b/husky.config.js @@ -0,0 +1,6 @@ +module.exports = { + hooks: { + 'pre-commit': 'npm run lint', + 'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS', + }, +}; diff --git a/package.json b/package.json index 9cda98fa..7b85ef30 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,10 @@ "lint:eslint": "eslint --ext .js,.html ." }, "devDependencies": { + "@commitlint/cli": "^7.1.2", + "@commitlint/config-conventional": "^7.1.2", + "@commitlint/config-lerna-scopes": "^7.1.2", + "husky": "^1.0.1", "lerna": "^3.2.1", "npm-run-all": "^4.1.3" }