Skip to content

Commit

Permalink
DN-9_add-commitlint (#26)
Browse files Browse the repository at this point in the history
chore(commitlint husky commitizen): Adds packages and configs for
commitlint

- Adds new package json script to use when commiting
- Adds commitlint and configs
- Adds husky git hook
- Adds commitizen and configs
  • Loading branch information
Designaroni authored Dec 26, 2022
2 parents caf0c45 + 4be4734 commit 605a4ce
Show file tree
Hide file tree
Showing 5 changed files with 1,099 additions and 21 deletions.
8 changes: 8 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"body-max-line-length": [0],
"footer-max-line-length": [0],
"subject-case": [2, "always", ["sentence-case", "lower-case"]],
},
};
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "@commitlint/cz-commitlint"
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"commit": "git-cz",
"lint": "yarn lint:ts; yarn lint:js; yarn lint:scss",
"lint:js": "next lint",
"lint:scss": "yarn stylelint '**/*.scss'",
Expand Down Expand Up @@ -35,18 +36,23 @@
"stylelint-order": "^5.0.0"
},
"devDependencies": {
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@commitlint/cz-commitlint": "^17.3.0",
"@types/node": "17.0.23",
"@types/react": "18.0.0",
"@types/react-dom": "18.0.0",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"commitizen": "^4.2.6",
"eslint": "^7.32.0 || ^8.2.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "12.1.4",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^8.0.2",
"prettier": "2.6.2",
"stylelint-config-css-modules": "^4.1.0",
"typescript": "4.6.3"
Expand Down
Loading

0 comments on commit 605a4ce

Please sign in to comment.