From 464c3c01833c718c3e4ded101430a5291265f31b Mon Sep 17 00:00:00 2001 From: Nazar Kyselov Date: Thu, 21 May 2026 10:41:04 +0200 Subject: [PATCH] chore: add commitlint and husky --- .husky/commit-msg | 1 + commitlint.config.js | 5 +++++ package.json | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .husky/commit-msg create mode 100644 commitlint.config.js diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..b2a74a3 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +pnpm exec commitlint --edit $1 \ No newline at end of file diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..401f41c --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,5 @@ +const commitlintConfig = { + extends: ['@commitlint/config-conventional'], +}; + +export default commitlintConfig; \ No newline at end of file diff --git a/package.json b/package.json index 9b64c8d..f082ba1 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,14 @@ { "name": "scent-app", + "type": "module", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", - "lint": "eslint" + "lint": "eslint", + "prepare": "husky" }, "dependencies": { "@prisma/client": "^6.19.0", @@ -26,6 +28,8 @@ "tailwind-merge": "^3.4.0" }, "devDependencies": { + "@commitlint/cli": "^21.0.1", + "@commitlint/config-conventional": "^21.0.1", "@tailwindcss/postcss": "^4", "@types/node": "^20", "@types/react": "^19", @@ -33,6 +37,7 @@ "baseline-browser-mapping": "^2.10.10", "eslint": "^9", "eslint-config-next": "16.0.3", + "husky": "^9.1.7", "tailwindcss": "^4", "tw-animate-css": "^1.4.0", "typescript": "^5"