.commitlintrc.json 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "extends": ["@commitlint/config-conventional"],
  3. "rules": {
  4. "type-enum": [
  5. 2,
  6. "always",
  7. [
  8. "feat",
  9. "fix",
  10. "docs",
  11. "style",
  12. "refactor",
  13. "test",
  14. "chore",
  15. "revert",
  16. "ci",
  17. "types",
  18. "perf",
  19. "tmp",
  20. "wip",
  21. "update",
  22. "build",
  23. "release",
  24. "scripts"
  25. ]
  26. ],
  27. "type-case": [2, "always", "lower-case"],
  28. "type-empty": [2, "never"],
  29. "subject-empty": [2, "never"],
  30. "subject-max-length": [2, "always", 100],
  31. "header-max-length": [2, "always", 100],
  32. "subject-min-length": [2, "always", 2],
  33. "subject-full-stop": [2, "never", "."],
  34. "subject-case": [
  35. 2,
  36. "always",
  37. [
  38. "lower-case",
  39. "upper-case",
  40. "sentence-case",
  41. "title-case",
  42. "camel-case",
  43. "pascal-case",
  44. "kebab-case",
  45. "snake-case",
  46. "start-case"
  47. ]
  48. ]
  49. },
  50. "parserPreset": {
  51. "headerPattern": "/^(\\u3010([\\u4e00-\\u9fa5\\w]+)\\u3011)?\\s*(\\w+)(?:\\((.*)\\))?:?\\s*(.*)$/",
  52. "headerCorrespondence": ["type", "scope", "subject", "ticket"],
  53. "issuePrefixes": ["#"]
  54. }
  55. }