chore: add lint-staged + husky

This commit is contained in:
Sebastian Rindom
2021-10-12 22:09:46 +02:00
parent f02cb638db
commit 30b6a793f1
6 changed files with 643 additions and 23 deletions

View File

@@ -12,19 +12,24 @@
"@babel/preset-env": "^7.11.5",
"@babel/register": "^7.11.5",
"@babel/runtime": "^7.11.2",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"axios": "^0.21.1",
"axios-mock-adapter": "^1.19.0",
"babel-jest": "^26.6.3",
"babel-preset-medusa-package": "^1.0.0",
"cross-env": "^7.0.2",
"eslint": "^8.0.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"express": "^4.17.1",
"get-port": "^5.1.1",
"husky": "^7.0.2",
"import-from": "^3.0.0",
"jest": "^26.6.3",
"lerna": "^3.22.1",
"lint-staged": "^11.2.3",
"microbundle": "^0.13.3",
"mongoose": "^5.10.15",
"pg-god": "^1.0.11",
@@ -32,9 +37,16 @@
"resolve-cwd": "^3.0.0",
"typeorm": "^0.2.31"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --ext .js,.jsx,.ts,.tsx --fix",
"*.{md,yaml,yml}": "prettier --write"
},
"scripts": {
"hooks:install": "husky install",
"hooks:uninstall": "husky uninstall",
"publish:next": "lerna publish --canary --preid next --dist-tag next",
"bootstrap": "lerna bootstrap",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"jest": "jest",
"test": "jest",
"prettier": "prettier",