Skip to content

Commit

Permalink
Merge pull request #8 from oasisprotocol/ml/pre-commit-hook
Browse files Browse the repository at this point in the history
Add pre-commit hook
  • Loading branch information
lubej authored Mar 5, 2024
2 parents 9285cf1 + 7526a69 commit 2075182
Show file tree
Hide file tree
Showing 3 changed files with 296 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"prepare": "husky",
"eslint": "eslint . --cache --ext .js,.ts,.tsx --max-warnings 0",
"prettier": "prettier --write . --ignore-path .eslintignore"
},
Expand All @@ -12,13 +13,19 @@
"engines": {
"node": ">=20"
},
"lint-staged": {
"*.{js,ts,tsx}": "eslint --ext .js,.ts,.tsx --max-warnings 0",
"*.{js,ts,tsx,css}": "prettier --write --ignore-path .eslintignore"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5"
}
}
Loading

0 comments on commit 2075182

Please sign in to comment.