chore: add support for conventional commits
Adds commitzen to guide the user when writing a commit messsage. Add validations for commit messages and validate agains the Angular conventional commits spec. closes #121
commitlint.config.js
0 → 100644
... | @@ -4,8 +4,12 @@ | ... | @@ -4,8 +4,12 @@ |
"private": true, | "private": true, | ||
"license": "MIT", | "license": "MIT", | ||
"devDependencies": { | "devDependencies": { | ||
"@commitlint/cli": "^6.0.5", | |||
"@commitlint/config-conventional": "^6.0.4", | |||
"babel-eslint": "^8.0.3", | "babel-eslint": "^8.0.3", | ||
"babel-preset-es2015": "^6.24.1", | "babel-preset-es2015": "^6.24.1", | ||
"commitizen": "^2.9.6", | |||
"cz-conventional-changelog": "^2.1.0", | |||
"eslint": "^4.13.1", | "eslint": "^4.13.1", | ||
"eslint-config-pubsweet": "^0.0.6", | "eslint-config-pubsweet": "^0.0.6", | ||
"eslint-plugin-import": "^2.8.0", | "eslint-plugin-import": "^2.8.0", | ||
... | @@ -30,7 +34,9 @@ | ... | @@ -30,7 +34,9 @@ |
"lint": "npm run lint:js && npm run lint:style", | "lint": "npm run lint:js && npm run lint:style", | ||
"lint:js": "eslint 'packages/**/*.{js,jsx}'", | "lint:js": "eslint 'packages/**/*.{js,jsx}'", | ||
"lint:style": "stylelint 'packages/**/*.{css,scss}'", | "lint:style": "stylelint 'packages/**/*.{css,scss}'", | ||
"precommit": "lint-staged" | "precommit": "lint-staged", | ||
"cz": "git-cz", | |||
"commitmsg": "commitlint -e $GIT_PARAMS" | |||
}, | }, | ||
"jest": { | "jest": { | ||
"collectCoverage": true, | "collectCoverage": true, | ||
... | @@ -50,5 +56,14 @@ | ... | @@ -50,5 +56,14 @@ |
], | ], | ||
"projects": ["packages/*"] | "projects": ["packages/*"] | ||
}, | }, | ||
"workspaces": ["packages/*", "packages/components/packages/*"] | "workspaces": ["packages/*", "packages/components/packages/*"], | ||
"repository": { | |||
"type": "git", | |||
"url": "https://gitlab.coko.foundation/pubsweet/pubsweet" | |||
}, | |||
"config": { | |||
"commitizen": { | |||
"path": "./node_modules/cz-conventional-changelog" | |||
} | |||
} | |||
} | } |
This diff is collapsed.
Please register or sign in to comment