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"
]
}
}
-16
View File
@@ -1,16 +0,0 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = require('@spotify/web-scripts/config/prettier.config.js');
+5
View File
@@ -2710,6 +2710,11 @@
resolved "https://registry.npmjs.org/@spotify/prettier-config/-/prettier-config-6.0.0.tgz#f3a72cf290af8f5b57e89fc65e6eaff8178a6e83"
integrity sha512-lO/ykZ/GNtzH63mFzs1VeqOVNCZwQJyZm/PBNBZuYk3hnWOfDC8XA5G/D4opV/gxqkED5+Ek7LSAnPcQNv/wUA==
"@spotify/prettier-config@^7.0.0":
version "7.0.0"
resolved "https://registry.npmjs.org/@spotify/prettier-config/-/prettier-config-7.0.0.tgz#47750979d1282197295108b6958360660a955c16"
integrity sha512-lIMcx/2oDqTtW84iHKkRJe+8U6HK6GPwWH5sJp9UEHcDpdXomOQYvwcGXy2I2zwPQQ14gYYE6nEJuSnnYqsYRw==
"@spotify/tsconfig@^6.0.0":
version "6.0.0"
resolved "https://registry.npmjs.org/@spotify/tsconfig/-/tsconfig-6.0.0.tgz#bf9fd0b8188494d87ba6c172f0030376d2aa5dd8"