diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000000..9ef2ef0b22 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +pnpm run commitlint ${1} diff --git a/package.json b/package.json index a157d2ea87..2b52d26509 100644 --- a/package.json +++ b/package.json @@ -38,10 +38,10 @@ "create-component": "plop component", "create-icon": "plop icon", "create-icon-variant": "plop icon-variant", - "prepare": "husky install" + "prepare": "husky install", + "commitlint": "commitlint --edit" }, "devDependencies": { - "@vtex/shoreline-test-utils": "workspace:*", "@commitlint/cli": "^9.1.2", "@commitlint/config-conventional": "^9.1.2", "@commitlint/prompt": "^9.1.2", @@ -62,6 +62,8 @@ "@vanilla-extract/vite-plugin": "3.9.0", "@vitejs/plugin-react": "4.1.0", "@vtex/prettier-config": "^0.3.1", + "@vtex/shoreline-stylelint": "workspace", + "@vtex/shoreline-test-utils": "workspace:*", "@vtex/tsconfig": "^0.5.6", "chromatic": "^9.1.0", "commitizen": "^4.2.0", @@ -70,8 +72,8 @@ "eslint-config-vtex-react": "9.0.3", "eslint-plugin-graphql": "4.0.0", "eslint-plugin-import": "2.27.5", - "eslint-plugin-vitest": "0.3.10", "eslint-plugin-tsc": "2.0.0", + "eslint-plugin-vitest": "0.3.10", "husky": "^8.0.3", "jsdom": "23.0.0", "lerna": "7.1.4", @@ -84,16 +86,15 @@ "react-dom": "18.2.0", "react-test-renderer": "18.2.0", "storybook": "^7.5.3", + "stylelint": "^15.11.0", + "stylelint-prettier": "^4.0.2", "tslib": "2.6.2", + "tsup": "8.0.1", "turbo": "1.4.3", "typescript": "4.9.5", "url-loader": "^4.1.0", "vite": "5.0.2", - "vitest": "0.34.6", - "tsup": "8.0.1", - "stylelint": "^15.11.0", - "stylelint-prettier": "^4.0.2", - "@vtex/shoreline-stylelint": "workspace" + "vitest": "0.34.6" }, "lint-staged": { "*.{ts,tsx,js,jsx}": [