Skip to content

Commit 78a52ef

Browse files
committed
docs: document git hooks [ci skip]
1 parent 213908c commit 78a52ef

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/contributing.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ A high level overview of tools used:
7676
- [Prettier](https://prettier.io/) for code formatting
7777
- [ESLint](https://eslint.org/) for static error prevention (outside of types)
7878

79+
## Git Hooks
80+
81+
The project uses [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) to enforce the following on each commit:
82+
83+
- Type check the entire project
84+
- Automatically format changed files using Prettier
85+
- Verify commit message format (logic in `scripts/verifyCommit.mjs`)
86+
7987
## Scripts
8088

8189
**The examples below will be using the `nr` command from the [ni](https://github.com/antfu/ni) package.** You can also use plain `npm run`, but you will need to pass all additional arguments after the command after an extra `--`. For example, `nr build runtime --all` is equivalent to `npm run build -- runtime --all`.
@@ -106,7 +114,7 @@ nr build runtime-core
106114
nr build runtime --all
107115
```
108116

109-
Note that `nr build` uses `rollup-plugin-esbuild` for transpiling typescript and **does not perform type checking**. To run type check on the entire codebase, run `nr check`.
117+
Note that `nr build` uses `rollup-plugin-esbuild` for transpiling typescript and **does not perform type checking**. To run type check on the entire codebase, run `nr check`. Type checks are also automatically run on each commit.
110118

111119
#### Build Formats
112120

0 commit comments

Comments
 (0)