diff --git a/package.json b/package.json index c88292b043..a610559d41 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,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", @@ -44,9 +45,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" ] } } diff --git a/prettier.config.js b/prettier.config.js deleted file mode 100644 index e12d35a880..0000000000 --- a/prettier.config.js +++ /dev/null @@ -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'); diff --git a/yarn.lock b/yarn.lock index 7050c664e3..0d3dc866db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2692,6 +2692,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"