Skip to content

update husky fix #1450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .husky/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Add hooks here
npx husky add .husky/pre-push 'pnpm fix'
16 changes: 15 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,18 @@

echo "🔍 Running automatic fixes before pushing..."
pnpm fix
echo "✅ Fixes applied - your contribution is now ready for review!"

# Check if there are any changes after running fixes
if [ -n "$(git status --porcelain)" ]; then
echo "🔄 Changes detected after running fixes. Committing them automatically..."

# Stage all changes
git add .

# Create a commit with a descriptive message
git commit -m "Auto-fix: Update breadcrumbs, spelling dictionary and other automated fixes"

echo "✅ Changes committed automatically. Continuing with push..."
else
echo "✅ No changes needed. Continuing with push..."
fi
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"lint": "eslint . --ext mdx --max-warnings 0 && pnpm spellcheck:lint && pnpm check-breadcrumbs && pnpm check-redirects && pnpm validate-metadata && pnpm link-checker",
"fix": "eslint . --ext mdx --fix && pnpm spellcheck:fix && pnpm breadcrumbs && pnpm fix-redirects && pnpm metadata-batch-cli",
"spellcheck:lint": "cspell lint \"**/*.mdx\"",
"prepare": "husky",
"spellcheck:fix": "cspell --words-only --unique \"**/*.mdx\" | sort --ignore-case | uniq > words.txt",
"breadcrumbs": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/create-breadcrumbs.ts",
"check-breadcrumbs": "NODE_NO_WARNINGS=1 node --loader ts-node/esm utils/breadcrumbs.ts",
Expand Down Expand Up @@ -60,6 +61,7 @@
"ethers": "^5",
"globby": "^11.0.4",
"gray-matter": "^4.0.3",
"husky": "^9.1.7",
"remark": "^15.0.1",
"remark-code-import": "^1.2.0",
"remark-frontmatter": "^5.0.0",
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ inator
INFLUXDBV
influxdbv
initcode
interopble
IPCDISABLE
ipcdisable
ipcfile
Expand Down Expand Up @@ -273,6 +272,7 @@ Pausability
pausable
pcscdpath
Pectra
pectra
Pectra's
Peerstore
peerstore
Expand Down Expand Up @@ -388,6 +388,7 @@ Superchain
superchain
Superchain's
Superchainerc
superchainerc
Superlend
Superloans
Superscan
Expand Down