Skip to content

Commit

Permalink
Merge pull request #23 from AplinkosMinisterija/husky
Browse files Browse the repository at this point in the history
Prevent Accidental Code Errors with husky
  • Loading branch information
vycius authored Oct 27, 2023
2 parents 563170a + cab6269 commit f832c1f
Show file tree
Hide file tree
Showing 3 changed files with 250 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,22 @@
"lint:sarif": "set SARIF_ESLINT_EMBED=true && yarn run lint --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"prepare": "husky install"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint"
],
"*.{md,html,css}": "prettier --write"
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -86,7 +94,10 @@
"@microsoft/eslint-formatter-sarif": "^3.0.0",
"@types/lodash": "^4.14.192",
"@types/react-datepicker": "^4.10.0",
"@types/styled-components": "^5.1.26"
"@types/styled-components": "^5.1.26",
"husky": "^8.0.0",
"lint-staged": "^15.0.2",
"prettier": "3.0.3"
},
"engines": {
"node": ">=20.0.0 <21.0.0"
Expand Down
Loading

0 comments on commit f832c1f

Please sign in to comment.