Skip to content

Commit

Permalink
chore: add lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
nihalgonsalves committed Aug 3, 2023
1 parent 6024b18 commit 9a9580e
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md

pre-commit:
parallel: true
commands:
prettier:
glob: '*.{js,ts,jsx,tsx,mjs,mts,cjs,cts,json,yml,yaml,md}'
run: yarn prettier --write {staged_files}
stage_fixed: true
eslint:
glob: '*.{js,ts,jsx,tsx,mjs,mts,cjs,cts}'
run: yarn eslint --fix {staged_files}
stage_fixed: true
typescript-build:
glob: '*.{js,ts,jsx,tsx,mjs,mts,cjs,cts}'
run: yarn typecheck
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"eslint": "^8.46.0",
"eslint-define-config": "^1.22.0",
"husky": "^8.0.3",
"lefthook": "^1.4.8",
"prettier": "^3.0.0",
"typescript": "^5.1.6"
},
Expand Down
54 changes: 54 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1923,6 +1923,60 @@ language-tags@=1.0.5:
dependencies:
language-subtag-registry "~0.3.2"

lefthook-darwin-arm64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-darwin-arm64/-/lefthook-darwin-arm64-1.4.8.tgz#4d1a425b5aad9cf598dcf3ed5a65078dc90d56c6"
integrity sha512-wUaasRq7P1BNAlGwu/vONVHrwlrTwQGEhyn0leciEcnQCUN8aTeEC4hkxHmxisgQVQTdidYkCSWcsaEFn84xzw==

lefthook-darwin-x64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-darwin-x64/-/lefthook-darwin-x64-1.4.8.tgz#a5f25db8411b8d9f0e5a26a1f49e150dfdd780e4"
integrity sha512-uUkQeU08szL4IpKVQSlhzNObZ79YkwmZ3fZDmF+jjP69LMESEVY7Y+cuQI0RG4YOTXHGBqZs3MPUZ7ZygBrhcQ==

lefthook-freebsd-arm64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-1.4.8.tgz#c31b4d7f74ce29eeb27a9bde238d52d5526dd554"
integrity sha512-X4rWxsmxfyMRgfIOqAnk2zrMzlJV0fANEDYNuUYBVbgH8IYAy1cyVQlolgeC8NhFW8VaJ3AztbWpnR1M8zEByA==

lefthook-freebsd-x64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-freebsd-x64/-/lefthook-freebsd-x64-1.4.8.tgz#1d1382f35e0da9d5d5efc90bbc2581e1425c5924"
integrity sha512-ijenlZtEZpbnLFWTZdsIDmVdLzkaTkeEQVjjHEXdo2GBjLmdLYk8hRQiY/7oUxFe/JO1RLuhfIlPkKLtYz1iTQ==

lefthook-linux-arm64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-linux-arm64/-/lefthook-linux-arm64-1.4.8.tgz#21aa8db2591ea772869885f5e9fc6b0e4ffefd32"
integrity sha512-lOsJymblZ8nIpgm2lLfWx33tXtkdamK0lZThbSK4uwZQWFzSjr9qx21qZlJZ/mG8jZ5EY5Twhjqrt131CUXtMw==

lefthook-linux-x64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-linux-x64/-/lefthook-linux-x64-1.4.8.tgz#dcedf19c6633867e43aec7455a3a3e04312e1f59"
integrity sha512-tF/iQFZu9iR++C3UXvpeTQS50CtTdZWmeMJ49uAovu9qe3qpPdKoguorZSFDC2+OGYbd7wbulldpWhvgxarniA==

lefthook-windows-arm64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-windows-arm64/-/lefthook-windows-arm64-1.4.8.tgz#9c259243943197bf7479538e934e9e692476285b"
integrity sha512-ykqX5rm5UI6244cF6anf92p+JXNvuA/Ah3bpQKYSA5JoMG2vJmPZ9nIThq5ky/F90jXySBxcdZRdrridtagAbw==

lefthook-windows-x64@1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook-windows-x64/-/lefthook-windows-x64-1.4.8.tgz#9226edf148e66fbf583f4438cdeea5d810fee3c4"
integrity sha512-wv8in0vku5eDpjNtri4s02kXbowEa6t/h8pHHUnCedmJJ2ImwwqGQJ1kwDVQL0U3bgdNWCfC2mUxVmtXoLQkBg==

lefthook@^1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/lefthook/-/lefthook-1.4.8.tgz#8028217992d58657ec6eb96235d04ecd61fcabd3"
integrity sha512-SALO6nIy0aizM3FJdy4cNdUy9qKJyGZo6f8gZdzhBuKLMrwnm9YeMdJmQKeEPZA9E2mDSqdHGJjvMlKrm+04Pg==
optionalDependencies:
lefthook-darwin-arm64 "1.4.8"
lefthook-darwin-x64 "1.4.8"
lefthook-freebsd-arm64 "1.4.8"
lefthook-freebsd-x64 "1.4.8"
lefthook-linux-arm64 "1.4.8"
lefthook-linux-x64 "1.4.8"
lefthook-windows-arm64 "1.4.8"
lefthook-windows-x64 "1.4.8"

levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
Expand Down

0 comments on commit 9a9580e

Please sign in to comment.