From d7a43b3f2b1ac8d951d5bf40c2548f5f79713189 Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 30 Jun 2022 11:04:16 +0800 Subject: [PATCH 1/2] chore: reuse prettierRcOptions instead of resolveConfig again --- eslint-plugin-prettier.js | 4 +++- package.json | 4 ++-- yarn.lock | 7 +------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/eslint-plugin-prettier.js b/eslint-plugin-prettier.js index 0ea45fb6..3b5179f9 100644 --- a/eslint-plugin-prettier.js +++ b/eslint-plugin-prettier.js @@ -143,8 +143,10 @@ module.exports = { const { ignored, inferredParser } = prettier.getFileInfo.sync( onDiskFilepath, { - resolveConfig: true, + resolveConfig: false, + withNodeModules: false, ignorePath: '.prettierignore', + plugins: prettierRcOptions ? prettierRcOptions.plugins : null, ...eslintFileInfoOptions, }, ); diff --git a/package.json b/package.json index 1bdc7361..74cf1634 100644 --- a/package.json +++ b/package.json @@ -59,13 +59,13 @@ "graphql": "^16.5.0", "mocha": "^9.2.2", "patch-package": "^6.4.7", - "prettier": "^2.7.1", "svelte": "^3.48.0", "vue-eslint-parser": "^8.3.0" }, "resolutions": { "@babel/traverse": "^7.18.5", - "eslint-plugin-prettier": "link:." + "eslint-plugin-prettier": "link:.", + "prettier": "^2.7.1" }, "packageManager": "yarn@1.22.19" } diff --git a/yarn.lock b/yarn.lock index c0c18cc3..1de76ea7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6406,16 +6406,11 @@ prettier-plugin-toml@^0.3.1: "@toml-tools/parser" "^0.3.1" prettier "^1.16.0" -prettier@>=2.3, prettier@>=2.3.0, prettier@>=2.4.0, prettier@^2.5.1, prettier@^2.6.1, prettier@^2.7.1: +prettier@>=2.3, prettier@>=2.3.0, prettier@>=2.4.0, prettier@^1.16.0, prettier@^1.19.1, prettier@^2.5.1, prettier@^2.6.1, prettier@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== -prettier@^1.16.0, prettier@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== - prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" From 7351cb8a5274902260f060e7ba18320e284e6da0 Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 30 Jun 2022 11:23:45 +0800 Subject: [PATCH 2/2] docs: add changeset for releasing --- .changeset/grumpy-rabbits-sell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/grumpy-rabbits-sell.md diff --git a/.changeset/grumpy-rabbits-sell.md b/.changeset/grumpy-rabbits-sell.md new file mode 100644 index 00000000..0d0d1044 --- /dev/null +++ b/.changeset/grumpy-rabbits-sell.md @@ -0,0 +1,5 @@ +--- +'eslint-plugin-prettier': patch +--- + +chore: reuse prettierRcOptions instead of resolveConfig again