mirror of
https://github.com/AdguardTeam/AdguardFilters.git
synced 2026-08-29 12:14:41 +00:00
Husky v9 (#171886)
* Update Husky to v9 * Update lint-staged * Backward compatibility with Husky 8
This commit is contained in:
11
.husky/install.mjs
Normal file
11
.husky/install.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
// See: https://typicode.github.io/husky/how-to.html#ci-server-and-docker
|
||||
|
||||
// Do not initialize Husky in CI environments. GitHub Actions set the CI env variable automatically.
|
||||
// See: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
|
||||
if (process.env.CI === 'true') {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Initialize Husky programmatically.
|
||||
const husky = (await import('husky')).default;
|
||||
console.log(husky());
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
# TODO: Remove first 2 lines: https://github.com/AdguardTeam/AdguardFilters/pull/171886#issuecomment-1918731193
|
||||
|
||||
# See https://git-scm.com/docs/githooks#_post_merge
|
||||
|
||||
# This function checks if a file has changed between the current HEAD and the previous HEAD
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
# TODO: Remove first 2 lines: https://github.com/AdguardTeam/AdguardFilters/pull/171886#issuecomment-1918731193
|
||||
|
||||
# See https://git-scm.com/docs/githooks#_pre_commit
|
||||
|
||||
npx lint-staged
|
||||
|
||||
Reference in New Issue
Block a user