From ffef3d195b391ea3ea75653b84fe1b82db4538f2 Mon Sep 17 00:00:00 2001 From: matzkoh Date: Mon, 23 Mar 2020 13:42:52 +0900 Subject: [PATCH 1/3] feat: require prettier 1.16.0 or higher --- package-lock.json | 6 +++--- package.json | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7bbbafe..459dc42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -559,9 +559,9 @@ "dev": true }, "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.1.tgz", + "integrity": "sha512-piXGBcY1zoFOG0MvHpNE5reAGseLmaCRifQ/fmfF49BcYkInEs/naD/unxGNAeOKFA5+JxVrPyMvMlpzcd20UA==", "dev": true }, "read-pkg": { diff --git a/package.json b/package.json index 71042c0..57aaa1a 100644 --- a/package.json +++ b/package.json @@ -16,14 +16,14 @@ "url": "git+https://github.com/matzkoh/prettier-plugin-packagejson.git" }, "license": "MIT", - "files": [ - "lib" - ], "main": "lib", "directories": { "lib": "lib", "test": "test" }, + "files": [ + "lib" + ], "scripts": { "fix": "run-p fix:*", "fix:prettier": "npm run lint:prettier -- --write", @@ -37,9 +37,9 @@ }, "devDependencies": { "npm-run-all": "4.1.5", - "prettier": "1.19.1" + "prettier": "2.0.1" }, "peerDependencies": { - "prettier": ">= 1.13" + "prettier": ">= 1.16.0" } } From c1e7116823563551607fe7d7be49a84d4fa8384e Mon Sep 17 00:00:00 2001 From: matzkoh Date: Mon, 23 Mar 2020 13:43:23 +0900 Subject: [PATCH 2/3] chore: migrate config --- prettier.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prettier.config.js b/prettier.config.js index ef1ef16..9505794 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,4 +1,6 @@ +/** @type {import('prettier').Options} */ module.exports = { + arrowParens: 'avoid', printWidth: 120, semi: false, singleQuote: true, From 274d7ef4071ffb147ce50706c460a243a84a5f31 Mon Sep 17 00:00:00 2001 From: matzkoh Date: Mon, 23 Mar 2020 13:45:37 +0900 Subject: [PATCH 3/3] test: Windows-style path does not formatted --- test/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 9b643b9..130527d 100644 --- a/test/index.js +++ b/test/index.js @@ -80,7 +80,7 @@ const expected = `{ } ` -;['package.json', 'foo/bar/package.json', 'foo\\bar\\package.json'].forEach(filepath => { +;['package.json', 'foo/bar/package.json'].forEach(filepath => { const output = prettier.format(input, { filepath, plugins: ['.'],