commitlint.config.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = {
  2. rules: {
  3. "body-leading-blank": [1, "always"],
  4. "body-max-line-length": [2, "always", 100],
  5. "footer-leading-blank": [1, "always"],
  6. "footer-max-line-length": [2, "always", 100],
  7. "header-max-length": [2, "always", 72],
  8. "scope-case": [2, "always", "lower-case"],
  9. "subject-case": [
  10. 2,
  11. "never",
  12. ["upper-case", "pascal-case", "sentence-case", "start-case"],
  13. ],
  14. "subject-empty": [2, "never"],
  15. "subject-full-stop": [2, "never", "."],
  16. "type-case": [2, "always", "lower-case"],
  17. "type-empty": [2, "never"],
  18. "type-enum": [
  19. 2,
  20. "always",
  21. [
  22. "build",
  23. "chore",
  24. "ci",
  25. "docs",
  26. "feat",
  27. "fix",
  28. "perf",
  29. "refactor",
  30. "revert",
  31. "test",
  32. ],
  33. ],
  34. },
  35. /*
  36. add a custom parser to handle exclamation marks in a commit
  37. see: https://github.com/conventional-changelog/commitlint/issues/2226#issuecomment-911749509
  38. */
  39. parserPreset: {
  40. parserOpts: {
  41. headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/,
  42. referenceActions: null,
  43. issuePrefixes: ['ISS-'],
  44. },
  45. },
  46. };