Skip to content

Commit

Permalink
feat: simple-git-hooks and commitlint (pmndrs#126)
Browse files Browse the repository at this point in the history
* feat: simple git hooks and commitlint

* fix: add git hook for prettier and tests

* fix(package): remove prettier script, add as check on commit
  • Loading branch information
wiledal authored Oct 5, 2022
1 parent f0b9a89 commit b528066
Show file tree
Hide file tree
Showing 7 changed files with 517 additions and 74 deletions.
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"] };
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"three": "^0.139.2"
},
"devDependencies": {
"@vitejs/plugin-react": "^1.3.2",
"@vitejs/plugin-react": "^2.1.0",
"typescript": "^4.6.3",
"vite": "3.0.3"
},
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@changesets/cli": "^2.22.0",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@manypkg/cli": "^0.19.1",
"@preconstruct/cli": "^2.1.5",
"buffer": "^6.0.3",
"np": "^7.6.1",
"prettier": "2.7.1",
"simple-git-hooks": "^2.8.0",
"typescript": "^4.6.3"
},
"scripts": {
Expand All @@ -38,11 +41,14 @@
"dev": "preconstruct dev",
"watch": "preconstruct watch",
"demo": "cd demo && yarn dev",
"prettier": "prettier packages/ demo/ --write",
"release": "yarn build && changeset publish",
"test": "vitest run",
"test:ui": "vitest --ui"
},
"simple-git-hooks": {
"commit-msg": "npx --no -- commitlint --edit ${1}",
"pre-commit": "yarn prettier packages/ demo/ --check; yarn ci"
},
"private": true,
"workspaces": [
"packages/*",
Expand Down
19 changes: 19 additions & 0 deletions packages/react-three-rapier/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing to @react-three/fiber

## Issues

Feel free to submit issues and enhancement requests.

## Contributing code

In general, follow the "fork-and-pull" Git workflow.

1. **Fork** the repo on GitHub
2. **Clone** the project to your own machine
3. **Commit** changes to your own branch
This project uses `commitlint` and `conventional-commits` for commit messages.
Please follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) format.
4. **Push** your work back up to your fork
5. Submit a **Pull request** so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!
4 changes: 2 additions & 2 deletions packages/react-three-rapier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"@react-three/test-renderer": "^8.0.17",
"@types/react-dom": "^18.0.2",
"@types/three": "^0.139.0",
"@vitejs/plugin-react": "^2.1.0",
"@vitest/ui": "^0.23.4",
"happy-dom": "^6.0.4",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"three": "^0.139.2",
"vitest": "^0.23.4",
"@vitejs/plugin-react": "^2.1.0"
"vitest": "^0.23.4"
},
"peerDependencies": {
"@react-three/fiber": "^8.0.12",
Expand Down
2 changes: 2 additions & 0 deletions packages/react-three-rapier/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

<p align="center">⚠️ Under heavy development. All APIs are subject to change. ⚠️</p>

For contributions, please read the [contributing guide](https://github.com/pmndrs/react-three-rapier/blob/main/packages/react-three-rapier/CONTRIBUTING.md).

## Usage

```tsx
Expand Down
Loading

0 comments on commit b528066

Please sign in to comment.