Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .husky/_/husky.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
#!/bin/sh
if [ -z"$husky_skip_init" ];then
debug () {
if [ "$HUSKY_DEBUG"="1" ];then
echo"husky (debug) - $1"
fi
}

readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."

if [ "$HUSKY"="0" ];then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f~/.huskyrc ];then
debug "sourcing ~/.huskyrc"
.~/.huskyrc
fi

exportreadonly husky_skip_init=1
sh -e "$0""$@"
exitCode="$?"

if [ $exitCode!= 0 ];then
echo"husky - $hook_name hook exited with code $exitCode (error)"
fi

exit$exitCode
fi
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

node_modules/pretty-quick/bin/pretty-quick.js --staged

File renamed without changes.
6 changes: 1 addition & 5 deletions front/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,9 +13,7 @@
"type-check:watch": "npm run type-check -- --watch",
"test": "jest -c ./config/test/jest.js --verbose",
"test:watch": "npm run test -- --watchAll -i --no-cache",
"clean": "rimraf dist",
"prettier": "prettier {config,src}/**/*{.js,.jsx,.ts,.tsx}",
"prettier:fix": "npm run prettier -- --fix"
"clean": "rimraf dist"
},
"repository": {
"type": "git"
Expand DownExpand Up@@ -72,8 +70,6 @@
"lint-staged": "^9.5.0",
"mini-css-extract-plugin": "^0.8.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"react-test-renderer": "^16.12.0",
"rimraf": "^3.0.0",
"style-loader": "^1.0.1",
Expand Down
14 changes: 14 additions & 0 deletions package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
{
"name": "code-paster",
"scripts": {
"install": "run-p -l backend:install frontend:install",
"backend:install": "cd back && npm install",
"frontend:install": "cd front && npm install"
},
"devDependencies": {
"husky": "^7.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3"
}
}