Skip to content

Commit bfd1e95

Browse files
fix: use prettierRcOptions directly for prettier 3.6+ (#748)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 9c4b792 commit bfd1e95

File tree

6 files changed

+28
-55
lines changed

6 files changed

+28
-55
lines changed

.changeset/shiny-bears-turn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-prettier": patch
3+
---
4+
5+
fix: use `prettierRcOptions` directly for prettier 3.6+

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"singleQuote": true,
44
"plugins": [
55
"@prettier/plugin-pug",
6-
"prettier-plugin-jsdoc",
76
"prettier-plugin-pkg",
87
"prettier-plugin-svelte"
98
],

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ If you’re fixing large of amounts of previously unformatted code, consider tem
122122
> Note: While it is possible to pass options to Prettier via your ESLint configuration file, it is not recommended because editor extensions such as `prettier-atom` and `prettier-vscode` **will** read [`.prettierrc`](https://prettier.io/docs/en/configuration.html), but **won't** read settings from ESLint, which can lead to an inconsistent experience.
123123
124124
- The first option:
125-
126125
- An object representing [options](https://prettier.io/docs/en/options.html) that will be passed into prettier. Example:
127126

128127
```json
@@ -140,9 +139,7 @@ If you’re fixing large of amounts of previously unformatted code, consider tem
140139
NB: This option will merge and override any config set with `.prettierrc` files
141140

142141
- The second option:
143-
144142
- An object with the following options
145-
146143
- `usePrettierrc`: Enables loading of the Prettier configuration file, (default: `true`). May be useful if you are using multiple tools that conflict with each other, or do not wish to mix your ESLint settings with your Prettier configuration. And also, it is possible to run prettier without loading the prettierrc config file [via the CLI's --no-config option](https://prettier.io/docs/en/cli.html#--no-config) or through the API by [calling prettier.format() without passing through the options generated by calling resolveConfig](https://prettier.io/docs/en/api.html#prettierresolveconfigfilepath--options).
147144

148145
```json

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
"lint-staged": "^16.0.0",
9494
"mocha": "^11.1.0",
9595
"prettier": "^3.5.3",
96-
"prettier-plugin-jsdoc": "^1.3.2",
9796
"prettier-plugin-pkg": "^0.21.0",
9897
"prettier-plugin-svelte": "^3.3.3",
9998
"simple-git-hooks": "^2.12.1",
@@ -105,7 +104,7 @@
105104
106105
},
107106
"overrides": {
108-
"prettier": "^3.5.3"
107+
"prettier": "^3.6.1"
109108
}
110109
}
111110
}

pnpm-lock.yaml

Lines changed: 21 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

worker.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ runAsWorker(
4545
resolveConfig: false,
4646
withNodeModules: false,
4747
ignorePath: '.prettierignore',
48-
plugins: /** @type {string[] | undefined} */ (
49-
prettierRcOptions ? prettierRcOptions.plugins : undefined
50-
),
48+
...prettierRcOptions,
5149
...eslintFileInfoOptions,
5250
},
5351
);

0 commit comments

Comments
 (0)