Skip to content

Commit

Permalink
chore(commitlint, husky): enabled commitlint with husky
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitm001 committed Aug 16, 2024
1 parent 4e8b7cc commit 561dd15
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
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 561dd15

Please sign in to comment.