Configuration ignored when defined in multiple sources
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 64/100
Research direction
Start by reproducing the configuration using both .prettierrc and the "prettier" property in package.json, then compare it with the case where .prettierrc is removed. Trace how these two sources are resolved and verify that braceStyle and singleQuote are retained when both sources define them.
Written by the indexing model from the issue text.
Description
Hi.
The plugin configuration is ignored when it is defined in multiple sources. For example, I set the next two config values in .prettierrc
"braceStyle": "1tbs",
"singleQuote": true
but the plugin reports the following Resolved config:
{
"parser": "php",
"phpVersion": "7.4",
"plugins": [
"@prettier/plugin-php"
]
}
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.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prettier/plugin-php
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
prettier/plugin-php#2416 · 2 comments · 6 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
prettier/plugin-php#2495 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
prettier/plugin-php#2494 · 1 comment ·
-
strange format issue Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
prettier/plugin-php#2490 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
prettier/plugin-php#2455 ·
All issues in prettier/plugin-php
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pluginsGLPI/datainjection#673 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
octobercms/october#6130 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getgrav/grav-plugin-form#656 ·
-
customer-support needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100