Remove extra parens around jsx (#19329)
This commit is contained in:
1 parent
1cb7fcb3b1
commit
e76e746131
4 files changed
+50
-17
No files matched your search
@@ -511,7 +511,7 @@ parsers: ["babel", "flow", "typescript"]
|
||||
=====================================input======================================
|
||||
export default (<a></a>);
|
||||
=====================================output=====================================
|
||||
export default (<a></a>);
|
||||
export default <a></a>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
@@ -56,3 +56,27 @@ A(
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "babel-flow", "babel-ts", "__babel_estree", "typescript", "flow", "meriyah", "acorn", "espree", "espree", "hermes", "oxc", "oxc-ts"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
export default <></>
|
||||
=====================================output=====================================
|
||||
export default <></>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "babel-flow", "babel-ts", "__babel_estree", "typescript", "flow", "meriyah", "acorn", "espree", "espree", "hermes", "oxc", "oxc-ts"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
export default <div/>
|
||||
=====================================output=====================================
|
||||
export default <div />;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -1,15 +1,21 @@
|
||||
runFormatTest(import.meta, [
|
||||
"babel",
|
||||
"babel-flow",
|
||||
"babel-ts",
|
||||
"__babel_estree",
|
||||
"typescript",
|
||||
"flow",
|
||||
"meriyah",
|
||||
"acorn",
|
||||
"espree",
|
||||
"espree",
|
||||
"hermes",
|
||||
"oxc",
|
||||
"oxc-ts",
|
||||
]);
|
||||
runFormatTest(
|
||||
{
|
||||
importMeta: import.meta,
|
||||
snippets: ["export default <></>", "export default <div/>"],
|
||||
},
|
||||
[
|
||||
"babel",
|
||||
"babel-flow",
|
||||
"babel-ts",
|
||||
"__babel_estree",
|
||||
"typescript",
|
||||
"flow",
|
||||
"meriyah",
|
||||
"acorn",
|
||||
"espree",
|
||||
"espree",
|
||||
"hermes",
|
||||
"oxc",
|
||||
"oxc-ts",
|
||||
],
|
||||
);
|
||||
Reference in new issue
Block a user