|
| 1 | +module.exports = { |
| 2 | + extends: ['@commitlint/config-conventional'], |
| 3 | + rules: { |
| 4 | + // don't care about line length |
| 5 | + // 200 seems generous, also just warn |
| 6 | + 'header-max-length': [1, 'always', 200], |
| 7 | + 'body-max-line-length': [1, 'always', 200], |
| 8 | + 'footer-max-line-length': [1, 'always', 200], |
| 9 | + // don't care about case |
| 10 | + 'header-case': [0, 'always', 'lower-case'], |
| 11 | + 'subject-case': [0, 'always', 'lower-case'], |
| 12 | + 'body-case': [0, 'always', 'lower-case'], |
| 13 | + // don't care about trailing full-stop. |
| 14 | + 'subject-full-stop': [0, 'never', '.'], |
| 15 | + 'header-full-stop': [0, 'never', '.'], |
| 16 | + // valid types + descriptions |
| 17 | + // feel free to add more types as necessary |
| 18 | + 'type-enum': [2, 'always', [ |
| 19 | + 'build', // Changes that affect the build system |
| 20 | + 'ci', // Changes to our CI configuration files and scripts. |
| 21 | + 'docs', // Documentation only changes |
| 22 | + 'feat', // A new feature |
| 23 | + 'fix', // A bug fix |
| 24 | + 'perf', // A code change that improves performance |
| 25 | + 'refactor', // A code change that neither fixes a bug nor adds a feature |
| 26 | + 'style', // Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
| 27 | + 'test', // Adding missing tests or correcting existing tests |
| 28 | + 'revert', // git revert |
| 29 | + 'deps', // Changes that affect external dependencies e.g. refreshing package-lock, updating deps. |
| 30 | + 'deploy', // for gh-pages |
| 31 | + ]], |
| 32 | + } |
| 33 | +} |
0 commit comments