added husky & lint-staged

This commit is contained in:
Ren Amamiya 2023-02-25 15:45:27 +07:00
parent 19b99349a9
commit f03b396251
4 changed files with 1272 additions and 913 deletions

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm exec lint-staged

View File

@ -3,7 +3,7 @@
"trailingComma": "es5",
"singleQuote": true,
"tabWidth": 2,
"printWidth": 100,
"printWidth": 150,
"useTabs": false,
"endOfLine": "lf",
"bracketSpacing": true,

View File

@ -5,7 +5,11 @@
"scripts": {
"dev": "next dev -p 1420",
"build": "next build && next export -o dist",
"tauri": "tauri"
"tauri": "tauri",
"prepare": "husky install"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"dependencies": {
"@nanostores/persistent": "^0.7.0",
@ -51,6 +55,8 @@
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.0",
"lint-staged": "^13.1.2",
"postcss": "^8.4.21",
"prettier": "^2.8.4",
"prettier-plugin-tailwindcss": "^0.2.3",

File diff suppressed because it is too large Load Diff