Configuration ignored when defined in multiple sources
还没有人认领这个 Issue。
评估
调研方向
首先分别使用 .prettierrc 和 package.json 中的 "prettier" 属性重现配置,然后将其与移除 .prettierrc 的情况进行比较。跟踪这两个来源的解析方式,并验证当两个来源都定义 braceStyle 和 singleQuote 时,它们会被保留。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- PHP
- 星标
- 1.9k
- 派生
- 139
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
prettier/plugin-php 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 62/100
prettier/plugin-php#2416 · 2 条评论 · 6 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 55/100
prettier/plugin-php#2495 ·
-
难度 3/5 1-2 天 新手友好度 55/100
prettier/plugin-php#2494 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
prettier/plugin-php#2490 ·
-
难度 3/5 1-2 天 新手友好度 35/100
prettier/plugin-php#2455 ·
查看 prettier/plugin-php 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
getgrav/grav-plugin-api#45 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
RSS-Bridge/rss-bridge#5098 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
phingofficial/phing#2025 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
silverstripe/developer-docs#911 ·
-
难度 2/5 1-3 小时 新手友好度 74/100