Skip to content

Commit

Permalink
chore: add husky and lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
aleessandrohr committed Feb 16, 2024
1 parent 1511e2c commit 995cfb5
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_style = space
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn husky:pre-commit
5 changes: 5 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.{js,jsx,ts,tsx}": [
"pnpm format"
]
}
73 changes: 39 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "explorer http://localhost:3000 & next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"type-check": "tsc"
},
"dependencies": {
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"lucide-react": "^0.331.0",
"next": "14.1.0",
"react": "^18",
"react-dom": "^18",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@rocketseat/eslint-config": "^2.2.2",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"postcss": "^8",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "explorer http://localhost:3000 & next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "eslint . --fix --quiet",
"type-check": "tsc",
"prepare": "husky",
"husky:pre-commit": "lint-staged && pnpm type-check && pnpm build"
},
"dependencies": {
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"lucide-react": "^0.331.0",
"next": "14.1.0",
"react": "^18",
"react-dom": "^18",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@rocketseat/eslint-config": "^2.2.2",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"postcss": "^8",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}
Loading

0 comments on commit 995cfb5

Please sign in to comment.