Skip to content

Commit 65e6f9c

Browse files
committed
feat: add simple-git-hooks lint code
1 parent 6965a65 commit 65e6f9c

File tree

2 files changed

+222
-30
lines changed

2 files changed

+222
-30
lines changed

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"astro": "astro",
1313
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.astro",
1414
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx,.astro --fix",
15-
"release": "bumpp"
15+
"release": "bumpp",
16+
"postinstall": "npx simple-git-hooks"
1617
},
1718
"dependencies": {
1819
"@astrojs/netlify": "2.0.0",
@@ -66,8 +67,16 @@
6667
"@unocss/preset-icons": "^0.50.6",
6768
"@unocss/preset-typography": "^0.50.6",
6869
"eslint-plugin-astro": "^0.24.0",
70+
"lint-staged": "^13.2.2",
6971
"punycode": "^2.3.0",
72+
"simple-git-hooks": "^2.8.1",
7073
"unocss": "^0.50.6",
7174
"vite-plugin-pwa": "^0.14.7"
72-
}
75+
},
76+
"simple-git-hooks": {
77+
"pre-commit": "pnpm lint-staged"
78+
},
79+
"lint-staged": {
80+
"*": "pnpm lint:fix"
81+
}
7382
}

0 commit comments

Comments
 (0)