Skip to content

Commit

Permalink
Improve precommit (#14)
Browse files Browse the repository at this point in the history
Switched from husky to simple-git-hooks which does not require separate
.husky folder

Switched from huge lint-staged to very small nano-staged.

https://packagephobia.com/result?p=lint-staged
https://packagephobia.com/result?p=nano-staged

```diff
du -ckd1 node_modules
- 292316
+ 273964
```
  • Loading branch information
TrySound committed Jun 6, 2023
1 parent 0b91234 commit 9ccfdfe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 182 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

13 changes: 8 additions & 5 deletions package.json
Expand Up @@ -8,7 +8,6 @@
"author": "Renato Ribeiro <hi@rena.to>",
"license": "MIT",
"scripts": {
"prepare": "husky install",
"clean": "rm -rf ./dist",
"codegen": "graphql-codegen -r dotenv-flow/config",
"type-check": "tsc --noEmit",
Expand All @@ -17,9 +16,13 @@
"e2e": "yarn build && yarn jest --testPathPattern=e2e",
"prepublishOnly": "yarn e2e",
"debug": "node -r dotenv-flow/config src/tmp/debug.js",
"docs": "typedoc src --readme none --githubPages false"
"docs": "typedoc src --readme none --githubPages false",
"prepare": "simple-git-hooks"
},
"lint-staged": {
"simple-git-hooks": {
"pre-commit": "./node_modules/.bin/nano-staged"
},
"nano-staged": {
"*.{ts,css,md}": "prettier --write"
},
"files": [
Expand All @@ -42,10 +45,10 @@
"@types/jest": "^29.5.2",
"dotenv-flow": "^3.2.0",
"eslint": "^7.23.0",
"husky": "^6.0.0",
"jest": "^29.5.0",
"lint-staged": "^10.5.4",
"nano-staged": "^0.8.0",
"prettier": "^2.2.1",
"simple-git-hooks": "^2.8.1",
"ts-jest": "^29.1.0",
"typedoc": "^0.22.4",
"typedoc-plugin-markdown": "^3.11.2",
Expand Down

0 comments on commit 9ccfdfe

Please sign in to comment.