Skip to content
Closed
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
22 changes: 22 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Code Quality Check

on: [push, pull_request]

jobs:
lint-format-typecheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run format, lint, and typecheck
run: npm run check
14 changes: 13 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
#!/bin/sh
npx lint-staged

echo "🧹 Running Prettier & ESLint on staged files..."

npx lint-staged

RESULT=$?

if [ $RESULT -ne 0 ]; then
echo "❌ Commit aborted due to lint errors or formatting issues."
exit 1
else
echo "✅ All good! Proceeding with commit."
fi
14 changes: 13 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
#!/bin/sh
npm run typecheck

echo "🔍 Running TypeScript type check..."

npm run typecheck

RESULT=$?

if [ $RESULT -ne 0 ]; then
echo "❌ Push aborted due to TypeScript errors."
exit 1
else
echo "✅ No TypeScript errors. Proceeding with push."
fi
29 changes: 24 additions & 5 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"trailingComma": "es5",
"jsxSingleQuote": true,
"useTabs": false,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always"
"arrowParens": "always",
"endOfLine": "lf",
"overrides": [
{
"files": "*.md",
"options": {
"printWidth": 80,
"proseWrap": "always"
}
},
{
"files": "*.{ts,tsx}",
"options": {
"parser": "typescript"
}
}
],
"plugins": ["prettier-plugin-tailwindcss"]
}
84 changes: 82 additions & 2 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": "prettier --write .",
"typecheck": "tsc --noEmit",
"lint:fix": "eslint . --fix",
"lint": "eslint ."
"lint": "eslint .",
"check": "npm run format && npm run lint && npm run typecheck"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
Expand Down Expand Up @@ -92,6 +93,7 @@
"lovable-tagger": "^1.1.7",
"postcss": "^8.4.47",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"tailwindcss": "^3.4.11",
"typescript": "^5.8.3",
"typescript-eslint": "^8.0.1",
Expand Down
Loading