Skip to content

Commit

Permalink
chore(husky): config husky
Browse files Browse the repository at this point in the history
  • Loading branch information
hadizz committed Sep 19, 2022
1 parent 03fbf62 commit bf8cd36
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# /node_modules/* in the project root is ignored by default
/node_modules/*

# build artefacts
dist/*
build/*
coverage/*

# data definition files
**/*.d.ts

# 3rd party libs
public/*
4 changes: 4 additions & 0 deletions .husky/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run precommit
4 changes: 4 additions & 0 deletions .husky/pre-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run prepush
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore artifacts:
build
dist
coverage

# Ignore all HTML files:
*.html

.gitignore
.prettierignore
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"deploy": "gh-pages -d build",
"predeploy": "npm run build",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
"lint:fix": "eslint --fix .",
"pretty": "prettier .",
"prepare": "husky install",
"precommit": "npm run lint-fix && npm run pretty",
"prepush": "npm run lint"
},
"eslintConfig": {
"extends": [
Expand Down Expand Up @@ -55,6 +59,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.8",
"gh-pages": "^4.0.0",
"husky": "^8.0.1",
"prettier": "^2.7.1"
}
}
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

function App() {
return <div>hello</div>;
return <div>test husky</div>;
}

export default App;

0 comments on commit bf8cd36

Please sign in to comment.