Skip to content

Commit

Permalink
chore: add release-it and conventional commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Aug 19, 2022
1 parent 6cd61d2 commit 517b2ef
Show file tree
Hide file tree
Showing 6 changed files with 2,573 additions and 56 deletions.
1 change: 1 addition & 0 deletions .husky/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit "${1}"
4 changes: 4 additions & 0 deletions .husky/precommit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint && yarn typescript
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"validate:typescript": "tsc --project ./ --noEmit",
"validate:prettier": "prettier \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\" \"fabric-example/**/*.{js,ts,tsx}\" --check",
"validate:jest": "jest",
"release": "release-it",
"prepublish": "yarn test",
"prepare": "bob build"
},
Expand All @@ -49,8 +50,10 @@
"react-native": "*"
},
"devDependencies": {
"@commitlint/config-conventional": "^17.0.3",
"@react-native-community/eslint-config": "^3.0.2",
"@react-native/eslint-plugin-specs": "^0.0.3",
"@release-it/conventional-changelog": "^5.1.0",
"@types/jest": "^28.1.1",
"@types/react": "^18.0.11",
"@types/react-dom": "^18.0.5",
Expand All @@ -59,9 +62,11 @@
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"babel-plugin-module-resolver": "^4.1.0",
"commitlint": "^17.0.2",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^8.0.1",
"jest": "^28.1.0",
"metro-react-native-babel-preset": "^0.71.0",
"prettier": "^2.6.2",
Expand All @@ -70,6 +75,7 @@
"react-native": "0.69.0-rc.6",
"react-native-builder-bob": "^0.18.2",
"react-test-renderer": "^18.1.0",
"release-it": "^15.3.0",
"typescript": "^4.7.3"
},
"repository": {
Expand All @@ -84,6 +90,28 @@
"<rootDir>/lib/"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"release-it": {
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "v${version}"
},
"npm": {
"publish": true
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext",
"outDir": "lib"
"target": "esnext"
},
"include": [
"src",
Expand Down
Loading

0 comments on commit 517b2ef

Please sign in to comment.