Skip to content

Commit

Permalink
Merge pull request #13 from Fdawgs/ci/commit-linting
Browse files Browse the repository at this point in the history
ci: add commit linting
  • Loading branch information
Fdawgs committed Feb 12, 2021
2 parents 2904f20 + b35aa25 commit 88a4e18
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ jobs:
- name: Run License Checker
run: npm run lint:licenses

commit-lint:
name: Lint Commit Messages
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2.0.3
with:
configFile: ./package.json

unit-tests:
name: Unit Tests
if: github.event.pull_request.draft == false
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@
"lint:prettier:ci": "prettier . --check --ignore-path .gitignore",
"test": "npm run lint && npm run jest"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"pre-push": "npm run lint:prettier:ci && npm run test"
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-push": "npm run lint:prettier:ci && npm test"
}
},
"jest": {
Expand All @@ -57,6 +63,7 @@
"useTabs": true
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"conventional-changelog-cli": "^2.1.1",
"eslint": "^7.18.0",
Expand Down

0 comments on commit 88a4e18

Please sign in to comment.