feat(poc): improve lint for commit

This commit is contained in:
Björn Meyer 2023-07-12 14:14:15 +02:00
parent ef1fb57535
commit a1b435487f
3 changed files with 22 additions and 3 deletions

5
.husky/pre-commit Normal file
View File

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

View File

@ -5,13 +5,13 @@
"pnpm": ">=7"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"dev": "next dev",
"lint": "next lint",
"lint-staged": "lint-staged",
"prepare": "husky install",
"prettier": "prettier --write --ignore-unknown .",
"prettier:check": "prettier --check --ignore-unknown .",
"start": "next start",
"test": "pnpm lint && pnpm prettier:check",
"test:e2e": "playwright test"
},
@ -45,6 +45,7 @@
"eslint-config-next": "^13.4.9",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-unicorn": "^47.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"postcss": "^8.4.25",
"prettier": "^2.8.8",

13
pnpm-lock.yaml generated
View File

@ -1,5 +1,9 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@headlessui/react':
specifier: ^1.7.15
@ -66,6 +70,9 @@ devDependencies:
eslint-plugin-unicorn:
specifier: ^47.0.0
version: 47.0.0(eslint@8.44.0)
husky:
specifier: ^8.0.3
version: 8.0.3
lint-staged:
specifier: ^13.2.3
version: 13.2.3
@ -1840,6 +1847,12 @@ packages:
engines: {node: '>=14.18.0'}
dev: true
/husky@8.0.3:
resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==}
engines: {node: '>=14'}
hasBin: true
dev: true
/ignore@5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
engines: {node: '>= 4'}