From 725fc8265789a9bbf36c8dfebb97477e845d3e0f Mon Sep 17 00:00:00 2001 From: Fabian <11352551+fabm3n@users.noreply.github.com> Date: Sat, 12 Jun 2021 19:46:10 +0200 Subject: [PATCH] fix eslint issues (#3410) --- .../scripts/components/dashboard/ServerRow.tsx | 16 ++++++++-------- resources/scripts/components/server/Console.tsx | 12 ++++++------ .../components/server/users/EditSubuserModal.tsx | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/scripts/components/dashboard/ServerRow.tsx b/resources/scripts/components/dashboard/ServerRow.tsx index 212407569..3c3878586 100644 --- a/resources/scripts/components/dashboard/ServerRow.tsx +++ b/resources/scripts/components/dashboard/ServerRow.tsx @@ -132,13 +132,13 @@ export default ({ server, className }: { server: Server; className?: string }) = :
-
- - - {stats.cpuUsagePercent.toFixed(2)} % - -
-

of {cpuLimit}

+
+ + + {stats.cpuUsagePercent.toFixed(2)} % + +
+

of {cpuLimit}

@@ -164,4 +164,4 @@ export default ({ server, className }: { server: Server; className?: string }) =
); -}; \ No newline at end of file +}; diff --git a/resources/scripts/components/server/Console.tsx b/resources/scripts/components/server/Console.tsx index 201c77de7..fcc43e3c6 100644 --- a/resources/scripts/components/server/Console.tsx +++ b/resources/scripts/components/server/Console.tsx @@ -75,11 +75,11 @@ export default () => { const webLinksAddon = new WebLinksAddon(); const scrollDownHelperAddon = new ScrollDownHelperAddon(); const { connected, instance } = ServerContext.useStoreState(state => state.socket); - const [canSendCommands] = usePermissions(['control.console']); + const [ canSendCommands ] = usePermissions([ 'control.console' ]); const serverId = ServerContext.useStoreState(state => state.server.data!.id); const isTransferring = ServerContext.useStoreState(state => state.server.data!.isTransferring); - const [history, setHistory] = usePersistedState(`${serverId}:command_history`, []); - const [historyIndex, setHistoryIndex] = useState(-1); + const [ history, setHistory ] = usePersistedState(`${serverId}:command_history`, []); + const [ historyIndex, setHistoryIndex ] = useState(-1); const handleConsoleOutput = (line: string, prelude = false) => terminal.writeln( (prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m', @@ -127,7 +127,7 @@ export default () => { const command = e.currentTarget.value; if (e.key === 'Enter' && command.length > 0) { - setHistory(prevHistory => [command, ...prevHistory!].slice(0, 32)); + setHistory(prevHistory => [ command, ...prevHistory! ].slice(0, 32)); setHistoryIndex(-1); instance && instance.send('send command', command); @@ -161,7 +161,7 @@ export default () => { return true; }); } - }, [terminal, connected]); + }, [ terminal, connected ]); useEventListener('resize', debounce(() => { if (terminal.element) { @@ -199,7 +199,7 @@ export default () => { }); } }; - }, [connected, instance]); + }, [ connected, instance ]); return (
diff --git a/resources/scripts/components/server/users/EditSubuserModal.tsx b/resources/scripts/components/server/users/EditSubuserModal.tsx index 3f2b8fe9f..d7caf3a8f 100644 --- a/resources/scripts/components/server/users/EditSubuserModal.tsx +++ b/resources/scripts/components/server/users/EditSubuserModal.tsx @@ -99,7 +99,7 @@ const EditSubuserModal = ({ subuser }: Props) => {

{subuser ? `${canEditUser ? 'Modify' : 'View'} permissions for ${subuser.email}` : 'Create new subuser'}

-
+