chore: fix husky install (#5671)

This commit is contained in:
Noel
2021-05-25 21:36:26 +01:00
committed by GitHub
parent 0ca200f322
commit 3ac6d550ca
3 changed files with 701 additions and 287 deletions

View File

@@ -1,5 +1,4 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
npm run lint:fix npx --no-install lint-staged
npx --no-install pretty-quick --staged

972
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,8 +23,9 @@
"lint:fix": "eslint src --fix", "lint:fix": "eslint src --fix",
"lint:typings": "tslint typings/index.d.ts", "lint:typings": "tslint typings/index.d.ts",
"prettier": "prettier --write src/**/*.js typings/**/*.ts", "prettier": "prettier --write src/**/*.js typings/**/*.ts",
"prepublishOnly": "npm run test", "prepublishOnly": "pinst --disable && npm run test",
"prepare": "husky install" "prepare": "is-ci || husky install",
"postpublish": "pinst --enable"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -69,9 +70,11 @@
"eslint-plugin-import": "^2.23.3", "eslint-plugin-import": "^2.23.3",
"eslint-plugin-prettier": "^3.4.0", "eslint-plugin-prettier": "^3.4.0",
"husky": "^6.0.0", "husky": "^6.0.0",
"is-ci": "^2.0.0",
"jest": "^26.6.3", "jest": "^26.6.3",
"lint-staged": "^11.0.0",
"pinst": "^2.1.6",
"prettier": "^2.3.0", "prettier": "^2.3.0",
"pretty-quick": "^3.1.0",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"typescript": "^4.2.4" "typescript": "^4.2.4"
}, },
@@ -79,6 +82,10 @@
"node": ">=14.0.0", "node": ">=14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
}, },
"lint-staged": {
"*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts",
"*.{json,yml,yaml}": "prettier --write"
},
"commitlint": { "commitlint": {
"extends": [ "extends": [
"@commitlint/config-angular" "@commitlint/config-angular"