add husky

This commit is contained in:
Matthias Kretschmann 2024-04-02 10:54:41 +01:00
parent fd5707709b
commit 5bfac6001b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 47 additions and 1 deletions

1
.husky/pre-commit Normal file
View File

@ -0,0 +1 @@
npx lint-staged

32
package-lock.json generated
View File

@ -23,6 +23,8 @@
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.1.4",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"typescript": "^5"
}
},
@ -2396,6 +2398,21 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/husky": {
"version": "9.0.11",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz",
"integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==",
"dev": true,
"bin": {
"husky": "bin.mjs"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/ignore": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@ -4094,6 +4111,21 @@
"node": ">= 0.8.0"
}
},
"node_modules/prettier": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prop-types": {
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",

View File

@ -6,7 +6,9 @@
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"typecheck": "tsc --noEmit",
"prepare": "husky"
},
"dependencies": {
"@coingecko/cryptoformat": "^0.8.1",
@ -24,6 +26,17 @@
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.1.4",
"husky": "^9.0.11",
"prettier": "^3.2.5",
"typescript": "^5"
},
"lint-staged": {
"*.{ts,mjs}": [
"prettier --write",
"eslint"
],
"**/*.{json,yml,md}": [
"prettier --write"
]
}
}