Skip to content

Commit 95d1151

Browse files
committed
[repo] Update Husky installation for Yarn2
Yarn 2 does not run the `prepare` script. We need to switch to `postinstall` or `install`. Husky recommends using the postinstall.
1 parent c9f7f90 commit 95d1151

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

44
yarn lint-staged

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"mdxfix-all": "markdownlint-cli2 --config .markdownlint/mdx/fix/.markdownlint-cli2.cjs '{docs,general}/**/*.mdx' '*.mdx'",
2929
"migrate": "scripts/wikimedia-fetch.mjs migrate",
3030
"lint": "yarn mdlint-all; yarn mdxlint-all; yarn spell",
31-
"prepare": "husky install",
31+
"postinstall": "husky install",
3232
"spell": "cspell '*.md' '*.mdx' '**/*.md' '**/*.mdx' 'docs/*.md' 'docs/*.mdx' 'docs/**/*.md' 'docs/**/*.mdx' 'general/*.md' 'general/*.mdx' 'general/**/*.md' 'general/**/*.mdx'"
3333
},
3434
"dependencies": {

0 commit comments

Comments
 (0)