Skip to content

Commit

Permalink
moaijs#115: setup code format on pre-commmit hook with husky and lint…
Browse files Browse the repository at this point in the history
…-staged
  • Loading branch information
lqt93 committed Apr 4, 2021
1 parent 39f39af commit 6c32b06
Show file tree
Hide file tree
Showing 3 changed files with 686 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ node_modules
dist
.DS_Store
.idea
.husky
14 changes: 14 additions & 0 deletions package.json
@@ -0,0 +1,14 @@
{
"name": "@moai/root",
"scripts": {
"prepare": "husky install && husky add .husky/pre-commit 'npx lint-staged --allow-empty'"
},
"lint-staged": {
"*.{ts,tsx,js,css,json}": "prettier --write"
},
"devDependencies": {
"husky": "^6.0.0",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1"
}
}

0 comments on commit 6c32b06

Please sign in to comment.