Skip to content

Commit

Permalink
added rules for linter
Browse files Browse the repository at this point in the history
Signed-off-by: rjtch <tchuinkoufongue@gmail.com>
  • Loading branch information
rjtch committed Jan 27, 2024
1 parent e5da820 commit 32698d6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fetch-depth: 0
- name: Check Commit Lint
with:
configFile: "./.commitlintrc.json"
configFile: "./.commitlint.config.js"
uses: wagoid/commitlint-github-action@v5.4.5

lint_check:
Expand Down
37 changes: 37 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'header-trim': [2, 'always'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'never',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
};

0 comments on commit 32698d6

Please sign in to comment.