Skip to content

Commit 36a7821

Browse files
bradzacherJamesHenry
authored andcommitted
chore: simplify git hooks (#445)
1 parent d51eb96 commit 36a7821

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.huskyrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"hooks": {
3-
"pre-commit": [
4-
"yarn test && lint-staged"
5-
],
3+
"pre-commit": "yarn pre-commit",
4+
"pre-push": "yarn pre-push",
65
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
76
}
87
}

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
displayName: 'Typecheck all packages'
2525
2626
- script: |
27-
yarn check-format
27+
yarn format-check
2828
displayName: 'Check code formatting'
2929
3030
- script: |

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@
1717
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
1818
},
1919
"scripts": {
20-
"postinstall": "lerna bootstrap && yarn build && lerna link",
21-
"test": "lerna run test --parallel",
2220
"build": "lerna run build",
2321
"clean": "lerna clean && lerna run clean",
24-
"typecheck": "lerna run typecheck",
25-
"lint": "eslint . --ext .js,.ts",
26-
"lint-fix": "eslint . --ext .js,.ts --fix",
2722
"cz": "git-cz",
28-
"check-format": "prettier --list-different \"./**/*.{ts,js,json,md}\"",
23+
"generate-contributors": "yarn ts-node ./tools/generate-contributors.ts && yarn all-contributors generate",
2924
"format": "prettier --write \"./**/*.{ts,js,json,md}\"",
25+
"format-check": "prettier --list-different \"./**/*.{ts,js,json,md}\"",
3026
"integration-tests": "docker-compose -f tests/integration/docker-compose.yml up",
3127
"kill-integration-test-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local",
32-
"generate-contributors": "yarn ts-node ./tools/generate-contributors.ts && yarn all-contributors generate"
28+
"lint": "eslint . --ext .js,.ts",
29+
"lint-fix": "eslint . --ext .js,.ts --fix",
30+
"pre-commit": "yarn lint-staged",
31+
"pre-push": "yarn lint && yarn typecheck && yarn format-check",
32+
"postinstall": "lerna bootstrap && yarn build && lerna link",
33+
"test": "lerna run test --parallel",
34+
"typecheck": "lerna run typecheck"
3335
},
3436
"config": {
3537
"commitizen": {

0 commit comments

Comments
 (0)