Merge pull request #2 from acid-info/topic-configure-husky
Configure husky and lint-staged
This commit is contained in:
commit
871936702f
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
11
package.json
11
package.json
|
@ -6,14 +6,13 @@
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint",
|
||||||
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.{ts,tsx}": [
|
"*.{ts,tsx}": [
|
||||||
"eslint --ext .tsx,ts src/ --fix"
|
"prettier --write",
|
||||||
],
|
"eslint --fix"
|
||||||
"src/**": [
|
|
||||||
"prettier --check 'src/**/*.ts' 'src/**/*.tsx'"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
|
Loading…
Reference in New Issue