Add prettier, and husky + lint-staged

This commit is contained in:
Bjarne Oeverli 2021-06-13 19:03:48 +02:00
parent e9915283e9
commit e74ed11d90
No known key found for this signature in database
GPG Key ID: 38A98464B30B17FB
5 changed files with 837 additions and 5 deletions

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

View File

@ -1 +1,2 @@
/node_modules/**
/node_modules/**
package*.json

823
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,8 @@
"client-dev": "NODE_ENV=development preact watch src/client",
"docker-build": "docker build -t hemmelig .",
"docker-run": "docker run -d --rm -e SECRET_REDIS_HOST=172.17.0.2 -p 1234:3000 --name=hemmelig-test hemmelig",
"production-test": "NODE_ENV=production npm run build && npm run docker-build && npm run docker-run"
"production-test": "NODE_ENV=production npm run build && npm run docker-build && npm run docker-run",
"prepare": "husky install"
},
"repository": {
"type": "git",
@ -39,8 +40,14 @@
"classcat": "^5.0.3",
"deepmerge": "^4.2.2",
"dlv": "^1.1.3",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"nodemon": "^2.0.7",
"preact": "^10.5.13",
"preact-cli": "^3.2.2"
"preact-cli": "^3.2.2",
"prettier": "^2.3.1"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
}
}