Skip to content

Commit

Permalink
Merge pull request #12 from sosumit001/conv-commit-messages
Browse files Browse the repository at this point in the history
Conv commit messages
  • Loading branch information
sosumit001 authored Aug 16, 2024
2 parents 4e8b7cc + eeee185 commit b3ab61d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint Commit Messages

on: [pull_request, push]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: wagoid/commitlint-github-action@v5
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit ${1}
25 changes: 25 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { UserConfig } from "@commitlint/types";

const Configuration: UserConfig = {
extends: ["@commitlint/config-conventional"],
rules: {
'type-enum': [
2,
'always',
[
'feat', // New features
'fix', // Bug fixes
'chore', // Maintenance tasks
'ci', // CI configuration changes
'docs', // Documentation updates
'perf', // Performance improvements
'refactor', // Code refactoring
'revert', // Revert to previous commit
'style', // Code style changes
'test', // Adding or updating tests
],
],
}
};

module.exports = Configuration;
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@
"tailwind-highlightjs": "^2.0.1"
},
"devDependencies": {
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@tailwindcss/typography": "^0.5.12",
"@types/node": "^20.12.7",
"autoprefixer": "^10.4.19",
"cheerio": "^1.0.0-rc.12",
"eslint": "8.57.0",
"eslint-config-next": "14.1.4",
"gray-matter": "^4.0.3",
"husky": "^9.1.4",
"next-mdx-remote": "^4.4.1",
"postcss": "^8.4.38",
"remark": "^15.0.1",
Expand Down

0 comments on commit b3ab61d

Please sign in to comment.