Skip to content

Commit

Permalink
chore: update husky, commitlint and add lint-staged config
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft committed Jun 23, 2024
1 parent 100b874 commit 2642c73
Show file tree
Hide file tree
Showing 5 changed files with 594 additions and 487 deletions.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm commitlint --edit $1
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm affected:lint
pnpm exec lint-staged --concurrent false --relative
pnpm affected:test
pnpm sync-preset-schemas
8 changes: 8 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"*.ts": [
"pnpm nx affected:lint --fix --files"
],
"*": [
"pnpm nx format:write --files"
]
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
"affected:e2e": "nx affected --target e2e --exclude=smoke",
"affected:test": "nx affected --target test --exclude=smoke",
"affected:lint": "nx affected --target lint --fix",
"affected:format": "nx affected --target format",
"affected:graph": "nx affected --graph",
"format": "nx format ",
"format:write": "nx format:write",
"format:check": "nx format:check",
"format": "nx format --base head~1",
"migrate": "nx migrate latest",
"run-migrate": "nx migrate --run-migrations --if-exists",
"graph": "nx graph",
"help": "nx help",
"release": "nx release --dry-run -- --skip-nx-cache",
"prepare": "husky install",
"prepare": "husky",
"smoke": "FORCE_SMOKE_TESTS=true nx test smoke",
"smoke-keep": "KEEP_SMOKE_TESTS_DIR=true pnpm smoke",
"sync-preset-schemas": "ts-node -P ./tools/tsconfig.tools.json ./tools/scripts/sync-preset-schemas.ts"
Expand All @@ -45,8 +44,8 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@commitlint/cli": "^17.6.1",
"@commitlint/config-angular": "^17.6.1",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-angular": "^19.3.0",
"@jest/globals": "^29.5.0",
"@nx/devkit": "19.2.2",
"@nx/eslint-plugin": "19.2.2",
Expand All @@ -73,11 +72,12 @@
"eslint": "~8.57.0",
"eslint-config-prettier": "^9.0.0",
"fs-extra": "^10.1.0",
"husky": "^8.0.3",
"husky": "^9.0.11",
"jest": "29.4.3",
"jest-environment-jsdom": "29.4.3",
"jest-environment-node": "^29.4.1",
"jest-mock": "28.1.3",
"lint-staged": "^15.2.7",
"nx": "19.2.2",
"prettier": "2.6.2",
"ts-jest": "29.1.0",
Expand Down
Loading

0 comments on commit 2642c73

Please sign in to comment.