From 17614e348bf738872e2fa2cd33816c4e4b04f562 Mon Sep 17 00:00:00 2001 From: Maxime Thirouin Date: Mon, 8 Jan 2018 16:56:29 +0100 Subject: [PATCH] Use prettier config instead of CLI args This allows IDE plugins that rely on prettier config (introduced in [1.6.0](https://github.com/prettier/prettier/pull/2434)) to detect prettier and run it automatically with the correct config. Close #757 --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1877d167..2fd09032 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "docs:release": "cd website && yarn release", "flow": "flow", "fmt": "find packages scripts types website -name '*.js' | grep -v -E '(node_modules|dist|vendor)' | xargs yarn fmt:cmd", - "fmt:cmd": "prettier --print-width=100 --single-quote --write", + "fmt:cmd": "prettier --write", "jest": "jest --config ./scripts/jest/config.js", "lint": "yarn lint:check --fix", "lint:check": "eslint packages scripts website", @@ -62,6 +62,10 @@ "eslint" ] }, + "prettier": { + "printWidth": 100, + "singleQuote": true + }, "author": "Nicolas Gallagher", "license": "BSD-3-Clause" }