Skip to content

Commit f232042

Browse files
authored
Merge pull request #1450 from ethereum-optimism/fix-husky
update husky fix
2 parents 4d807e4 + 0640b40 commit f232042

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

.husky/install.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
# Add hooks here
5+
npx husky add .husky/pre-push 'pnpm fix'

.husky/pre-push

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,18 @@
33

44
echo "🔍 Running automatic fixes before pushing..."
55
pnpm fix
6-
echo "✅ Fixes applied - your contribution is now ready for review!"
6+
7+
# Check if there are any changes after running fixes
8+
if [ -n "$(git status --porcelain)" ]; then
9+
echo "🔄 Changes detected after running fixes. Committing them automatically..."
10+
11+
# Stage all changes
12+
git add .
13+
14+
# Create a commit with a descriptive message
15+
git commit -m "Auto-fix: Update breadcrumbs, spelling dictionary and other automated fixes"
16+
17+
echo "✅ Changes committed automatically. Continuing with push..."
18+
else
19+
echo "✅ No changes needed. Continuing with push..."
20+
fi

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint && pnpm check-breadcrumbs && pnpm check-redirects && pnpm validate-metadata && pnpm link-checker",
88
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix && pnpm breadcrumbs && pnpm fix-redirects && pnpm metadata-batch-cli",
99
"spellcheck:lint": "cspell lint \"**/*.mdx\"",
10+
"prepare": "husky",
1011
"spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt",
1112
"breadcrumbs": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/create-breadcrumbs.ts",
1213
"check-breadcrumbs": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/breadcrumbs.ts",
@@ -60,6 +61,7 @@
6061
"ethers": "^5",
6162
"globby": "^11.0.4",
6263
"gray-matter": "^4.0.3",
64+
"husky": "^9.1.7",
6365
"remark": "^15.0.1",
6466
"remark-code-import": "^1.2.0",
6567
"remark-frontmatter": "^5.0.0",

pnpm-lock.yaml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

words.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ inator
172172
INFLUXDBV
173173
influxdbv
174174
initcode
175-
interopble
176175
IPCDISABLE
177176
ipcdisable
178177
ipcfile
@@ -273,6 +272,7 @@ Pausability
273272
pausable
274273
pcscdpath
275274
Pectra
275+
pectra
276276
Pectra's
277277
Peerstore
278278
peerstore
@@ -388,6 +388,7 @@ Superchain
388388
superchain
389389
Superchain's
390390
Superchainerc
391+
superchainerc
391392
Superlend
392393
Superloans
393394
Superscan

0 commit comments

Comments
 (0)