Skip to content

Commit

Permalink
chore: move to lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
pnodet committed Aug 30, 2024
1 parent e9ae225 commit 1d35859
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 15 deletions.
42 changes: 42 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
pre-push:
parallel: false
piped: false
follow: false
commands:
lint:
run: pnpm lint-staged
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
# pre-commit:
# parallel: true
# commands:
# eslint:
# glob: "*.{js,ts,jsx,tsx}"
# run: yarn eslint {staged_files}
# rubocop:
# tags: backend style
# glob: "*.rb"
# exclude: '(^|/)(application|routes)\.rb$'
# run: bundle exec rubocop --force-exclusion {all_files}
# govet:
# tags: backend style
# files: git ls-files -m
# glob: "*.go"
# run: go vet {files}
# scripts:
# "hello.js":
# runner: node
# "any.go":
# runner: go run
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nivalis/eslint-config",
"type": "module",
"version": "3.5.0",
"packageManager": "pnpm@9.8.0+sha256.56a9e76b51796ca7f73b85e44cf83712862091f4d498c0ce4d5b7ecdc6ba18f7",
"packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1",
"description": "ESLint shareable flat config used at Nivalis Studio",
"license": "MIT",
"homepage": "https://github.com/nivalis-studio/eslint-config#readme",
Expand Down Expand Up @@ -41,7 +41,6 @@
"prepublishOnly": "pnpm run build",
"typegen": "pnpm dlx tsx@latest ./scripts/typegen.ts",
"prepack": "pnpm run build",
"prepare": "simple-git-hooks",
"ts": "tsc --noEmit"
},
"peerDependencies": {
Expand Down Expand Up @@ -79,15 +78,12 @@
"eslint": "9.9.1",
"eslint-flat-config-utils": "^0.3.1",
"eslint-typegen": "^0.3.1",
"lefthook": "1.7.14",
"lint-staged": "^15.2.9",
"prettier": "^3.3.3",
"simple-git-hooks": "^2.11.1",
"tsup": "^8.2.4",
"typescript": "^5.5.4"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix --no-warn-ignored --flag unstable_ts_config"
}
Expand Down
109 changes: 100 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d35859

Please sign in to comment.