Skip to content

feat: configure husky and lint-staged #18

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 4 commits into from
Jun 11, 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
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [20.x, 24.x]
name: Build on v${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm build
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm pre-commit
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"**/*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
"**/*.{json,css,md}": ["prettier --write"]
}
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.next
.cache
package-lock.json
public
node_modules
next-env.d.ts
next.config.ts
yarn.lock
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write .",
"typecheck": "tsc --noEmit"
"lint:fix": "next lint --fix",
"lint:strict": "next lint '*/**/*.{js,jsx,ts,tsx}'",
"format": "prettier --write */**/*.{js,jsx,json,ts,tsx,scss,css,md}",
"typecheck": "tsc --noEmit",
"prepare": "husky",
"pre-commit": "lint-staged"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.10",
Expand All @@ -34,6 +38,8 @@
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.3.3",
"husky": "^9.1.7",
"lint-staged": "^16.1.0",
"prettier": "^3.5.3",
"prettier-plugin-organize-imports": "^4.1.0",
"prettier-plugin-tailwindcss": "^0.6.12",
Expand All @@ -43,6 +49,6 @@
},
"packageManager": "pnpm@10.12.1",
"engines": {
"node": ">=18"
"node": ">=20"
}
}
Loading