Skip to content

Commit

Permalink
Update Husky to v9
Browse files Browse the repository at this point in the history
Merge in ADGUARD-FILTERS/aglint from fix/update-husky-to-v9 to master

Squashed commit of the following:

commit d350977
Author: scripthunter7 <[email protected]>
Date:   Wed Jan 31 11:09:16 2024 +0100

    Clean comment

commit 802ad91
Author: scripthunter7 <[email protected]>
Date:   Wed Jan 31 11:07:34 2024 +0100

    Update Husky to v9
  • Loading branch information
scripthunter7 committed Feb 1, 2024
1 parent 31c3ab6 commit 4ccf69d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// See: https://typicode.github.io/husky/how-to.html#ci-server-and-docker
import ci from 'ci-info';

// Do not initialize Husky in CI environments.
if (ci.isCI) {
console.log('Skipping Husky initialization, because we detected a CI environment:', ci.name);
process.exit(0);
}

// Initialize Husky programmatically.
const husky = (await import('husky')).default;
console.log(husky());
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn check-types
yarn lint
yarn test
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"lint": "yarn lint:ts && yarn lint:md",
"lint:md": "markdownlint .",
"lint:ts": "eslint . --cache --ext .ts",
"prepare": "husky install",
"prepare": "node .husky/install.mjs",
"increment": "yarn version --patch --no-git-tag-version",
"test": "jest --runInBand"
},
Expand All @@ -67,12 +67,13 @@
"@types/text-table": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"ci-info": "^4.0.0",
"eslint": "^8.43.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import-newlines": "^1.3.1",
"eslint-plugin-jsdoc": "^46.3.0",
"husky": "^8.0.3",
"husky": "^9.0.7",
"jest": "^29.5.0",
"jsdoc": "^4.0.2",
"markdownlint": "^0.30.0",
Expand Down
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2394,6 +2394,11 @@ ci-info@^3.2.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91"
integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==

ci-info@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2"
integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==

cjs-module-lexer@^1.0.0:
version "1.2.3"
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107"
Expand Down Expand Up @@ -3355,10 +3360,10 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

husky@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
husky@^9.0.7:
version "9.0.7"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.7.tgz#047f24ec1b6c681206af714b4217c13ee97fff20"
integrity sha512-vWdusw+y12DUEeoZqW1kplOFqk3tedGV8qlga8/SF6a3lOiWLqGZZQvfWvY0fQYdfiRi/u1DFNpudTSV9l1aCg==

ignore@^5.2.0, ignore@^5.2.4, ignore@~5.2.4:
version "5.2.4"
Expand Down

0 comments on commit 4ccf69d

Please sign in to comment.