.commitlintrc.js 467 B

12345678910111213141516
  1. const typeEnum = require('./.cz-config');
  2. console.log(
  3. '\x1B[0;37;44m INFO \x1B[0m',
  4. '\x1B[0;;34m ' +
  5. `读取了: ${__filename.slice(__dirname.length + 1)}` +
  6. ' \x1B[0m'
  7. );
  8. module.exports = {
  9. extends: ['@commitlint/config-conventional'],
  10. // https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md
  11. rules: {
  12. 'type-enum': [2, 'always', typeEnum.types.map((i) => i.value)],
  13. 'scope-empty': [0, 'never'],
  14. },
  15. };