fix(jsx): consistent quotes in JSX expression (#5349)
This commit is contained in:
4 files changed
+56
-1
No files matched your search
@@ -5297,7 +5297,7 @@ function printJSXElement(path, options, print) {
|
||||
containsMultipleAttributes ||
|
||||
containsMultipleExpressions;
|
||||
|
||||
const rawJsxWhitespace = options.jsxSingleQuote ? "{' '}" : '{" "}';
|
||||
const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}';
|
||||
const jsxWhitespace = ifBreak(concat([rawJsxWhitespace, softline]), " ");
|
||||
|
||||
const isFacebookTranslationTag =
|
||||
|
||||
@@ -3865,6 +3865,12 @@ exports[`quotes.js - flow-verify 1`] = `
|
||||
doubleBoth2={"\\" '"}
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<div id=""'<>&quot;" />;
|
||||
<div id='"'<>&quot;' />;
|
||||
@@ -3895,6 +3901,12 @@ exports[`quotes.js - flow-verify 1`] = `
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "}
|
||||
</p>;
|
||||
|
||||
`;
|
||||
|
||||
exports[`quotes.js - flow-verify 2`] = `
|
||||
@@ -3934,6 +3946,12 @@ exports[`quotes.js - flow-verify 2`] = `
|
||||
doubleBoth2={"\\" '"}
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<div id='"'<>&quot;' />;
|
||||
<div id='"'<>&quot;' />;
|
||||
@@ -3964,6 +3982,12 @@ exports[`quotes.js - flow-verify 2`] = `
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "}
|
||||
</p>;
|
||||
|
||||
`;
|
||||
|
||||
exports[`quotes.js - flow-verify 3`] = `
|
||||
@@ -4003,6 +4027,12 @@ exports[`quotes.js - flow-verify 3`] = `
|
||||
doubleBoth2={"\\" '"}
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<div id=""'<>&quot;" />;
|
||||
<div id='"'<>&quot;' />;
|
||||
@@ -4033,6 +4063,12 @@ exports[`quotes.js - flow-verify 3`] = `
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>;
|
||||
|
||||
`;
|
||||
|
||||
exports[`quotes.js - flow-verify 4`] = `
|
||||
@@ -4072,6 +4108,12 @@ exports[`quotes.js - flow-verify 4`] = `
|
||||
doubleBoth2={"\\" '"}
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<div id='"'<>&quot;' />;
|
||||
<div id='"'<>&quot;' />;
|
||||
@@ -4102,6 +4144,12 @@ exports[`quotes.js - flow-verify 4`] = `
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>;
|
||||
|
||||
`;
|
||||
|
||||
exports[`return-statement.js - flow-verify 1`] = `
|
||||
|
||||
@@ -34,3 +34,9 @@
|
||||
doubleBoth2={"\" '"}
|
||||
doubleBoth3="" ' '"
|
||||
/>;
|
||||
|
||||
<p>
|
||||
GitHub Desktop has encountered an unrecoverable error and will need to 1231231
|
||||
restart. This has been reported to the team, but if youencounter this121312331
|
||||
repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
|
||||
</p>
|
||||
@@ -31,6 +31,7 @@ const ENABLED_OPTIONS = [
|
||||
"semi",
|
||||
"singleQuote",
|
||||
"bracketSpacing",
|
||||
"jsxSingleQuote",
|
||||
"jsxBracketSameLine",
|
||||
"arrowParens",
|
||||
"trailingComma",
|
||||
|
||||
Reference in new issue
Block a user