Commit f3b1eadd authored by Yannis Barlas's avatar Yannis Barlas

chore(*): add predefined scopes to commit cli

parent ad3d812c
module.exports = {
extends: ['@commitlint/config-conventional'],
}
/*
If you add custom types, add this entry to the exported object
*/
// rules: {
// 'type-enum': [
// 2,
// 'always',
// [
// 'build',
// 'ci',
// 'chore',
// // 'content',
// 'docs',
// 'feat',
// 'fix',
// 'perf',
// 'refactor',
// 'revert',
// 'style',
// 'test',
// // 'tweak',
// ],
// ],
// },
const map = require('lodash/map')
const longest = require('longest')
const rightPad = require('right-pad')
const conventionalCommitTypes = require('conventional-commit-types')
/*
Borrowed from cz-conventional-changelog
*/
/* eslint-disable prefer-arrow-callback, func-names, prefer-template */
const { types } = conventionalCommitTypes
const length = longest(Object.keys(types)).length + 1
const choices = map(types, function(type, key) {
return {
name: rightPad(key + ':', length) + ' ' + type.description,
value: key,
}
})
/* eslint-enable prefer-arrow-callback, func-names, prefer-template */
module.exports = {
scopes: [
'dashboard',
'submission form',
'editor panel',
'assign reviewers',
'preview',
'team manager',
'api',
'models',
'notifications',
'client',
'server',
'config',
'*',
],
types: choices,
}
/*
Possible new types
*/
// types: [
// {
// value: 'content',
// name: 'content: Changes to the text displayed in the UI, emails, etc',
// },
// {
// value: 'tweak',
// name: 'tweak: Minor UI changes',
// },
// ],
!.cz-config.js
\ No newline at end of file
module.exports = {
extends: ['@commitlint/config-conventional'],
}
......@@ -26,6 +26,7 @@
"cheerio": "^1.0.0-rc.2",
"compression-webpack-plugin": "^1.1.11",
"config": "^1.30.0",
"conventional-commit-types": "^2.2.0",
"copy-webpack-plugin": "^4.5.1",
"extract-text-webpack-plugin": "^3.0.2",
"flat": "^4.1.0",
......@@ -39,6 +40,7 @@
"joi-browser": "^13.0.1",
"json-loader": "^0.5.7",
"lodash": "^4.17.10",
"longest": "^2.0.1",
"nodemailer-mailgun-transport": "^1.4.0",
"path-to-regexp": "^2.4.0",
"prop-types": "^15.6.1",
......@@ -63,6 +65,7 @@
"react-table": "^6.8.6",
"regenerator-runtime": "^0.11.1",
"request": "^2.87.0",
"right-pad": "^1.0.1",
"script-loader": "^0.7.2",
"styled-components": "^3.4.2",
"uglifyjs-webpack-plugin": "^1.3.0",
......@@ -89,6 +92,7 @@
"commitizen": "^2.10.1",
"css-loader": "^0.28.11",
"cz-conventional-changelog": "^2.1.0",
"cz-customizable": "^5.5.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.3.4",
......@@ -109,7 +113,7 @@
"jest": "^23.1.0",
"lint-staged": "^7.2.0",
"prettier": "^1.13.2",
"standard-version": "^4.4.0",
"standard-version": "5.0.1",
"string-replace-loader": "^2.1.1",
"style-loader": "^0.21.0",
"stylelint": "^9.2.1",
......@@ -142,7 +146,7 @@
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
"path": "cz-customizable"
}
},
"jest": {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment