mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
feat(fmt): format top-level JSX elements/fragments with parens when multi-line (#11582)
This commit is contained in:
parent
fcaf8cd8e3
commit
299c7cfe54
6 changed files with 9 additions and 13 deletions
|
@ -35,9 +35,9 @@
|
||||||
"tools/wpt/manifest.json"
|
"tools/wpt/manifest.json"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"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/json-0.12.1.wasm",
|
||||||
"https://plugins.dprint.dev/markdown-0.9.1.wasm",
|
"https://plugins.dprint.dev/markdown-0.9.2.wasm",
|
||||||
"https://plugins.dprint.dev/toml-0.4.0.wasm"
|
"https://plugins.dprint.dev/toml-0.4.1.wasm"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -971,9 +971,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dprint-plugin-typescript"
|
name = "dprint-plugin-typescript"
|
||||||
version = "0.49.0"
|
version = "0.50.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "905ce2026766bc341bf489819b6ed31973e52f66b285f7f2dcb5040582b765ca"
|
checksum = "8edb35478b903fe9d38c7d4f5d1508aa1b51d29d05999c90cdd2b1d50841c2e2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dprint-core",
|
"dprint-core",
|
||||||
"dprint-swc-ecma-ast-view",
|
"dprint-swc-ecma-ast-view",
|
||||||
|
|
|
@ -55,7 +55,7 @@ data-url = "0.1.0"
|
||||||
dissimilar = "1.0.2"
|
dissimilar = "1.0.2"
|
||||||
dprint-plugin-json = "0.12.1"
|
dprint-plugin-json = "0.12.1"
|
||||||
dprint-plugin-markdown = "0.9.2"
|
dprint-plugin-markdown = "0.9.2"
|
||||||
dprint-plugin-typescript = "0.49.0"
|
dprint-plugin-typescript = "0.50.0"
|
||||||
encoding_rs = "0.8.28"
|
encoding_rs = "0.8.28"
|
||||||
env_logger = "0.8.4"
|
env_logger = "0.8.4"
|
||||||
fancy-regex = "0.5.0"
|
fancy-regex = "0.5.0"
|
||||||
|
|
|
@ -8,7 +8,5 @@ const React = {
|
||||||
return { factory, props, children };
|
return { factory, props, children };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const View = () => (
|
const View = () => <div class="deno">land</div>;
|
||||||
<div class="deno">land</div>
|
|
||||||
);
|
|
||||||
console.log(<View />);
|
console.log(<View />);
|
||||||
|
|
|
@ -3,7 +3,5 @@ const React = {
|
||||||
return { factory, props, children };
|
return { factory, props, children };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const View = () => (
|
const View = () => <div class="deno">land</div>;
|
||||||
<div class="deno">land</div>
|
|
||||||
);
|
|
||||||
console.log(<View />);
|
console.log(<View />);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default class A {
|
export default class A {
|
||||||
render() {
|
render() {
|
||||||
return (<div>Hello world!</div>);
|
return <div>Hello world!</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue