Check AST shape instead of parser (#18672)
This commit is contained in:
1 parent
0bc2286c9d
commit
68b64f2aa3
1 file changed
+1
-3
@@ -146,9 +146,7 @@ function chooseLayout(path, options, print, leftDoc, rightPropertyName) {
|
||||
(rightNode.type === "CallExpression" &&
|
||||
rightNode.callee.name === "require") ||
|
||||
// do not put values on a separate line from the key in json
|
||||
options.parser === "json5" ||
|
||||
options.parser === "jsonc" ||
|
||||
options.parser === "json"
|
||||
path.root.type === "JsonRoot"
|
||||
) {
|
||||
return "never-break-after-operator";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user