Add husky, lint-staged and set up pre-commit hook.

This commit is contained in:
maxswa
2021-03-25 00:53:25 -04:00
parent e3e904a23f
commit 29c76b4afb
2 changed files with 201 additions and 4 deletions

View File

@@ -36,6 +36,18 @@
"url": "https://github.com/maxswa/osrs-json-hiscores/issues"
},
"homepage": "https://github.com/maxswa/osrs-json-hiscores#readme",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts}": [
"eslint --fix",
"prettier --write",
"git add"
]
},
"eslintConfig": {
"root": true,
"parser": "@typescript-eslint/parser",
@@ -91,7 +103,9 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^5.2.0",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"np": "6.5.0",
"prettier": "^2.2.1",
"ts-jest": "^26.5.4",