Skip to content

Commit

Permalink
commitizen and conventional commits (#389)
Browse files Browse the repository at this point in the history
* save

* save

* save

* save

* save

* save

* chore(add commit help): updating repo to have conventional commits

* chore(add prettier hook): make sure to run prettier on staged files
  • Loading branch information
rileylnapier authored Feb 14, 2023
1 parent 389729a commit be3db49
Show file tree
Hide file tree
Showing 6 changed files with 538 additions and 52 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

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 ${1}
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx pretty-quick --staged
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
29 changes: 22 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,29 @@
"description": "",
"main": "index.js",
"private": true,
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && npx cz --hook || true"
}
},
"scripts": {
"prepare": "husky install",
"analyze:components": "yarn run build && ANALYZE=true lerna run build:components --scope @trycourier/components --stream",
"build:components": "lerna run build:components --stream",
"build:watch": "lerna run build:watch --stream --parallel",
"build": "lerna run build --stream && yarn types",
"clean": "lerna run clean --stream && lerna clean --yes && rimraf node_modules",
"eslint": "eslint './packages/**/*.{ts,tsx}' --fix",
"commit": "cz",
"export:storybook": "lerna run build && lerna run export:storybook",
"lerna:publish": "lerna publish from-package --no-verify-access --yes",
"lerna:publish:internal": "lerna publish --yes --canary --dist-tag internal --no-verify-access --force-publish=* --preid",
"lerna:version": "lerna version --no-push --no-git-tag-version",
"lerna:version": "lerna version --no-push --no-git-tag-version --conventional-commits",
"lerna": "lerna",
"postinstall": "lerna bootstrap && yarn build && husky install",
"prettier": "prettier --write \"packages/**/*{js,json,ts,tsx}\"",
Expand Down Expand Up @@ -50,9 +62,11 @@
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@commitlint/cli": "^17.4.3",
"@commitlint/config-conventional": "^17.4.3",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^12.1.5",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react": "^12.1.5",
"@types/jest": "^26.0.20",
"@types/react": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^4.15.2",
Expand All @@ -66,26 +80,27 @@
"babel-plugin-styled-components": "^1.12.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"eslint": "^7.18.0",
"commitizen": "^4.3.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^22.11.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.2",
"eslint-plugin-react": "^7.20.0",
"eslint": "^7.18.0",
"fetch-mock": "^9.11.0",
"husky": "^6.0.0",
"husky": "^8.0.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jest-styled-components": "^7.0.3",
"jest-websocket-mock": "^2.3.0",
"jest": "^26.6.3",
"lerna": "^5.4.0",
"msw": "^0.43.0",
"nx": "^14.4.2",
"pretty-quick": "^3.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^17.0.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.4.4",
"ts-loader": "^8.0.17",
Expand Down
Loading

0 comments on commit be3db49

Please sign in to comment.