package: depend on spotify prettier config directly, and add eslint fix to commit hook

This commit is contained in:
Patrik Oldsberg
2020-05-19 11:05:39 +02:00
parent a6c3256ad7
commit afff6f67af
3 changed files with 12 additions and 17 deletions
+7 -1
View File
@@ -32,6 +32,7 @@
"version": "1.0.0",
"devDependencies": {
"@spotify/eslint-config-oss": "^1.0.1",
"@spotify/prettier-config": "^7.0.0",
"husky": "^4.2.3",
"lerna": "^3.20.2",
"lint-staged": "^10.1.0",
@@ -43,9 +44,14 @@
"pre-commit": "lint-staged"
}
},
"prettier": "@spotify/prettier-config",
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --config ./prettier.config.js --list-different --write"
"eslint --fix",
"prettier --write"
],
"*.{json,md}": [
"prettier --write"
]
}
}