chore: precommit config

This commit is contained in:
Joren Broekema 2020-06-25 12:12:25 +02:00 committed by Thijs Louisse
parent ef3d233d4e
commit 660117664d
2 changed files with 2 additions and 1 deletions

View file

@ -3,6 +3,7 @@ module.exports = {
'*': ['eclint fix', 'git add'], '*': ['eclint fix', 'git add'],
'*.js': ['eslint --fix', 'prettier --write', 'git add'], '*.js': ['eslint --fix', 'prettier --write', 'git add'],
'*.md': ['prettier --write', 'markdownlint', 'git add'], '*.md': ['prettier --write', 'markdownlint', 'git add'],
'yarn.lock': ['node ./scripts/yarn-lock-scan.js'],
'*package.json': absolutePaths => { '*package.json': absolutePaths => {
const sortPackages = []; const sortPackages = [];
absolutePaths.forEach(p => { absolutePaths.forEach(p => {

View file

@ -1,6 +1,6 @@
module.exports = { module.exports = {
hooks: { hooks: {
'pre-commit': 'lint-staged && node ./scripts/yarn-lock-scan.js', 'pre-commit': 'lint-staged',
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS', 'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
}, },
}; };