Fix code style errors

Remove extra whitespace, use more consistent spacing, add missing
semicolons, using dangling commas, break up long lines, consistent
multiline operator placement, add missing JSDoc strings and so on.
This commit is contained in:
Hornwitser committed 2023-11-19 04:48:38 +01:00
1 parent 97e05c0610
commit 7314dc99c8
71 files changed
+403 -290

No files matched your search

+9 -9
View File
@@ -37,7 +37,7 @@ function GenerateHostTokenButton() {
}, []);
async function generateToken() {
let id = undefined;
let id;
let values = form.getFieldsValue();
if (values.hostId) {
id = Number.parseInt(values.hostId, 10);
@@ -114,12 +114,12 @@ function GenerateHostTokenButton() {
<div className="codeblock">
<CopyButton
message={"Copied host setup commands to clipboard"}
text={`
mkdir clusterio
cd clusterio
`+
// eslint-disable-next-line max-len
`npm init "@clusterio" -- --controller-token ${token} --mode "host" --download-headless --controller-url ${document.location.origin}/ --host-name "Host ${hostId || "?"}" --public-address localhost ${pluginString.length ? "--plugins" : ""} ${pluginString}`
text={`\
mkdir clusterio
cd clusterio
npm init "@clusterio" -- --controller-token ${token} --mode "host" --download-headless \
--controller-url ${document.location.origin}/ --host-name "Host ${hostId || "?"}" \
--public-address localhost ${pluginString.length ? "--plugins" : ""} ${pluginString}`
}/>
<p>&gt; mkdir clusterio</p>
<p>&gt; cd clusterio</p>
@@ -166,7 +166,7 @@ function CopyButton({ text, message }: { text:string, message:string }) {
return result.state === "granted";
} catch (err: any) {
//If it fail because "clipboard-write" is not supported.
// If it fail because "clipboard-write" is not supported.
return err.name === "TypeError";
}
}
@@ -229,7 +229,7 @@ export default function HostsPage() {
{host.connected ? "Connected" : "Disconnected"}
</Tag>,
sorter: (a, b) => Number(a.connected) - Number(b.connected),
}
},
]}
dataSource={hostList}
rowKey={host => host.id}