Skip to content

Commit 7d85f83

Browse files
authored
Add lint staged (#116)
* Add lint staged * Fix linting errors * Fix prettier errors
1 parent fc759a7 commit 7d85f83

File tree

26 files changed

+2220
-940
lines changed

26 files changed

+2220
-940
lines changed

.eslintrc.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2-
"plugins": ["@typescript-eslint"],
3-
"extends": ["plugin:@typescript-eslint/recommended", "next/core-web-vitals", "prettier"]
2+
"plugins": ["@typescript-eslint", "prettier"],
3+
"extends": [
4+
"plugin:@typescript-eslint/recommended",
5+
"next/core-web-vitals",
6+
"plugin:prettier/recommended"
7+
],
8+
"rules": {
9+
"prettier/prettier": "error",
10+
"arrow-body-style": "off",
11+
"prefer-arrow-callback": "off"
12+
}
413
}

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{md,html,css,json}": "prettier --write",
3+
"*.{ts,tsx}": "eslint --fix --max-warnings=0"
4+
}

0 commit comments

Comments
 (0)