Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

style(lint): fix pre-existing ESLint errors across frontend

Juan Denisc4e82357466a
diff --git a/frontend/src/components/settings/UsersTab.jsx b/frontend/src/components/settings/UsersTab.jsx
index 9120faa9..f5284aa8 100644
--- a/frontend/src/components/settings/UsersTab.jsx
+++ b/frontend/src/components/settings/UsersTab.jsx
@@ -49,17 +49,13 @@ const UsersTab = () => {
}
async function handleSaveUser(userData) {
- try {
- if (editingUser) {
- await api.updateUser(editingUser.id, userData);
- } else {
- await api.createUser(userData);
- }
- await loadUsers();
- handleCloseModal();
- } catch (err) {
- throw err;
+ if (editingUser) {
+ await api.updateUser(editingUser.id, userData);
+ } else {
+ await api.createUser(userData);
}
+ await loadUsers();
+ handleCloseModal();
}
async function handleDeleteUser(user) {
diff --git a/frontend/src/components/setup/SetupStepSummary.jsx b/frontend/src/components/setup/SetupStepSummary.jsx
index 7676d3d1..c9d8f70d 100644
--- a/frontend/src/components/setup/SetupStepSummary.jsx
+++ b/frontend/src/components/setup/SetupStepSummary.jsx
@@ -56,9 +56,9 @@ const SetupStepSummary = ({ accountInfo, useCases, onFinish }) => {
return (
<div className="wizard-step">
- <h2 className="wizard-step-title">You're all set</h2>
+ <h2 className="wizard-step-title">You&apos;re all set</h2>
<p className="wizard-step-description">
- Here's a summary of your setup. You can change these later in Settings.
+ Here&apos;s a summary of your setup. You can change these later in Settings.
</p>
<div className="summary-panel">
diff --git a/frontend/src/components/setup/SetupStepTier.jsx b/frontend/src/components/setup/SetupStepTier.jsx
index 85a9ce47..e2118dd8 100644
--- a/frontend/src/components/setup/SetupStepTier.jsx
+++ b/frontend/src/components/setup/SetupStepTier.jsx
@@ -67,7 +67,7 @@ const SetupStepTier = ({ useCases, onComplete }) => {
<div className="wizard-step">
<h2 className="wizard-step-title">Server Resources</h2>
<p className="wizard-step-description">
- We detected your server's hardware. Here's what each tier unlocks.
+ We detected your server&apos;s hardware. Here&apos;s what each tier unlocks.
</p>
{showWarning && (
diff --git a/frontend/src/components/ui/command.jsx b/frontend/src/components/ui/command.jsx
index 7ea212ea..cf72f7f1 100644
--- a/frontend/src/components/ui/command.jsx
+++ b/frontend/src/components/ui/command.jsx
@@ -29,6 +29,7 @@ function CommandDialog({ children, ...props }) {
}
const CommandInput = React.forwardRef(({ className, ...props }, ref) => (
+ /* eslint-disable-next-line react/no-unknown-property */
<div className="flex items-center border-b border-border px-3" cmdk-input-wrapper="">
<Search className="mr-2 size-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
diff --git a/frontend/src/hooks/useService.js b/frontend/src/hooks/useService.js
index a21ea4a3..d9a55df6 100644
--- a/frontend/src/hooks/useService.js
+++ b/frontend/src/hooks/useService.js
@@ -53,14 +53,10 @@ export function useService(id) {
const performAction = useCallback(async (action) => {
if (!id) return;
- try {
- if (action === 'start') await api.startApp(id);
- else if (action === 'stop') await api.stopApp(id);
- else if (action === 'restart') await api.restartApp(id);
- await load();
- } catch (err) {
- throw err;
- }
+ if (action === 'start') await api.startApp(id);
+ else if (action === 'stop') await api.stopApp(id);
+ else if (action === 'restart') await api.restartApp(id);
+ await load();
}, [id, load]);
const deleteService = useCallback(async () => {
diff --git a/frontend/src/pages/Firewall.jsx b/frontend/src/pages/Firewall.jsx
index 1c9b3b51..b968fbc3 100644
--- a/frontend/src/pages/Firewall.jsx
+++ b/frontend/src/pages/Firewall.jsx
@@ -633,7 +633,7 @@ function Firewall() {
) : (
<p>
<strong>firewalld</strong> is a dynamically managed firewall with zone-based
- configuration. It's the default firewall on CentOS and RHEL systems.
+ configuration. It&apos;s the default firewall on CentOS and RHEL systems.
</p>
)}
</div>
diff --git a/frontend/src/pages/Setup.jsx b/frontend/src/pages/Setup.jsx
index bc4d9701..2816d940 100644
--- a/frontend/src/pages/Setup.jsx
+++ b/frontend/src/pages/Setup.jsx
@@ -119,7 +119,7 @@ const Setup = () => {
<div className="wizard-header">
<ServerKitLogo className="wizard-logo" width={48} height={48} />
<h1>Welcome to ServerKit</h1>
- <p>Let's get your server ready</p>
+ <p>Let&apos;s get your server ready</p>
</div>
{renderProgressBar()}
diff --git a/frontend/src/pages/WordPressProject.jsx b/frontend/src/pages/WordPressProject.jsx
index ccb1d6df..f182dd34 100644
--- a/frontend/src/pages/WordPressProject.jsx
+++ b/frontend/src/pages/WordPressProject.jsx
@@ -943,7 +943,7 @@ const CreatePipelineEnvModal = ({ onClose, onCreate, productionDomain, existingT
))}
{filteredBranches.length === 0 && (
<div className="branch-picker-empty">
- No branches match "{branchSearch}"
+ No branches match &quot;{branchSearch}&quot;
</div>
)}
</div>
diff --git a/frontend/vite.config.js b/frontend/vite.config.js
index 837126ec..83a7c714 100644
--- a/frontend/vite.config.js
+++ b/frontend/vite.config.js
@@ -1,3 +1,4 @@
+/* global process */
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'