Skip to content

Commit

Permalink
feat(fmt): format top-level JSX elements/fragments with parens when m…
Browse files Browse the repository at this point in the history
…ulti-line (#11582)
  • Loading branch information
dsherret authored Aug 5, 2021
1 parent fcaf8cd commit 299c7cf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"tools/wpt/manifest.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.47.0.wasm",
"https://plugins.dprint.dev/typescript-0.50.0.wasm",
"https://plugins.dprint.dev/json-0.12.1.wasm",
"https://plugins.dprint.dev/markdown-0.9.1.wasm",
"https://plugins.dprint.dev/toml-0.4.0.wasm"
"https://plugins.dprint.dev/markdown-0.9.2.wasm",
"https://plugins.dprint.dev/toml-0.4.1.wasm"
]
}
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ data-url = "0.1.0"
dissimilar = "1.0.2"
dprint-plugin-json = "0.12.1"
dprint-plugin-markdown = "0.9.2"
dprint-plugin-typescript = "0.49.0"
dprint-plugin-typescript = "0.50.0"
encoding_rs = "0.8.28"
env_logger = "0.8.4"
fancy-regex = "0.5.0"
Expand Down
4 changes: 1 addition & 3 deletions cli/tests/046_jsx_test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ const React = {
return { factory, props, children };
},
};
const View = () => (
<div class="deno">land</div>
);
const View = () => <div class="deno">land</div>;
console.log(<View />);
4 changes: 1 addition & 3 deletions cli/tests/047_jsx_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ const React = {
return { factory, props, children };
},
};
const View = () => (
<div class="deno">land</div>
);
const View = () => <div class="deno">land</div>;
console.log(<View />);
2 changes: 1 addition & 1 deletion cli/tests/module_graph/https_deno.land-x-transpile.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default class A {
render() {
return (<div>Hello world!</div>);
return <div>Hello world!</div>;
}
}

0 comments on commit 299c7cf

Please sign in to comment.