Upgraded lint staged & husky

This commit is contained in:
Dustin Brett 2021-07-10 21:59:18 -07:00
parent ce5258555c
commit 2380e96ba1
5 changed files with 14 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/.husky/_
/.next
/node_modules
/out

4
.husky/pre-commit Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

View File

@ -1,3 +1,4 @@
/.husky
/.next
/node_modules
/out

View File

@ -18,18 +18,14 @@
"stylelint": "stylelint **/*.ts",
"prettier": "prettier --write .",
"test": "jest",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"prepare": "husky install"
},
"browserslist": [
"defaults and supports es6 and not ie 11"
],
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*": "prettier --write",
"*": "prettier --ignore-unknown --write",
"*.{js,ts,tsx}": "eslint --fix",
"*.ts": "stylelint --fix"
},
@ -78,7 +74,7 @@
"eslint-plugin-sonarjs": "^0.8.0-125",
"eslint-plugin-testing-library": "^4.6.0",
"eslint-plugin-unicorn": "^34.0.1",
"husky": "^7.0.0",
"husky": "^7.0.1",
"jest": "^27.0.6",
"jest-next-dynamic": "^1.0.1",
"lint-staged": "^11.0.0",

View File

@ -3219,10 +3219,10 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
husky@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.0.tgz#3dbd5d28e76234689ee29bb41e048f28e3e46616"
integrity sha512-xK7lO0EtSzfFPiw+oQncQVy/XqV7UVVjxBByc+Iv5iK3yhW9boDoWgvZy3OGo48QKg/hUtZkzz0hi2HXa0kn7w==
husky@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c"
integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA==
iconv-lite@0.4.24:
version "0.4.24"