You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configuration ignored when defined in multiple sources #2498
Then, I noticed I also had some "prettier": {...} configuration in package.json. The new configuration was still ignored after I added the same two config values to the Prettier property in this file. At this point, both configuration sources are the same.
Finally, the new configuration was in effect after I deleted the .prettierrc file.
this is prettier core, not the plugin. prettier resolves exactly one config source per file, sources are never merged.
verified on prettier 3.9.10: with a prettier key in package.json and a .prettierrc in the same folder, resolveConfig returns only one source's values. the other source is ignored whole, nothing is merged in. remove one source and the other applies on its own.
so with config split across .prettierrc and package.json, one wins and the rest is dropped, which matches what you saw (deleting .prettierrc unblocked the package.json values). fix is to keep the config in one place. plugin options like braceStyle and phpVersion follow the same rule, they come from whichever single source wins.
Activity
benjaminkincses commentedon Nov 3, 2026
this is prettier core, not the plugin. prettier resolves exactly one config source per file, sources are never merged.
verified on prettier 3.9.10: with a
prettierkey in package.json and a.prettierrcin the same folder, resolveConfig returns only one source's values. the other source is ignored whole, nothing is merged in. remove one source and the other applies on its own.so with config split across
.prettierrcand package.json, one wins and the rest is dropped, which matches what you saw (deleting.prettierrcunblocked the package.json values). fix is to keep the config in one place. plugin options likebraceStyleandphpVersionfollow the same rule, they come from whichever single source wins.