Skip to content
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
24 changes: 24 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
echo "Running pre-commit checks..."

# Check formatting with Prettier
echo "Checking code formatting..."
npm run format:check || {
echo "❌ Formatting check failed! Run 'npm run format' to fix."
exit 1
}

# Run ESLint
echo "Running linter..."
npm run lint || {
echo "❌ Linting failed! Run 'npm run lint:fix' to fix auto-fixable issues."
exit 1
}

# Run tests
echo "Running tests..."
npm test -- --run || {
echo "❌ Tests failed!"
exit 1
}

echo "✅ All pre-commit checks passed!"
17 changes: 17 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"",
"preview": "vite preview",
"test": "vitest",
"stamp-version": "replace-in-file --is-regex true /REPLACE_WITH_RELEASE/g $VERSION src/components/layout/Footer.tsx && replace-in-file --is-regex true /REPLACE_WITH_RELEASE/g $VERSION src/app/slice.ts"
"stamp-version": "replace-in-file --is-regex true /REPLACE_WITH_RELEASE/g $VERSION src/components/layout/Footer.tsx && replace-in-file --is-regex true /REPLACE_WITH_RELEASE/g $VERSION src/app/slice.ts",
"prepare": "husky"
},
"dependencies": {
"@emotion/react": "^11.14.0",
Expand Down Expand Up @@ -41,6 +42,7 @@
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"prettier": "^3.5.3",
"replace-in-file": "^8.3.0",
Expand Down