From 5a454e36479b3f368a63b0b3b66a12507231edb1 Mon Sep 17 00:00:00 2001
From: zhom <2717306+zhom@users.noreply.github.com>
Date: Wed, 11 Jun 2025 04:17:07 +0400
Subject: [PATCH] chore: linting
---
eslint.config.mjs | 44 +---------------------
nodecar/eslint.config.mjs | 41 --------------------
src/components/permission-dialog.tsx | 12 ------
src/components/profile-selector-dialog.tsx | 21 ++++-------
src/components/theme-provider.tsx | 1 -
src/components/update-notification.tsx | 1 -
src/components/version-selector.tsx | 4 +-
src/hooks/use-browser-download.ts | 20 +---------
src/hooks/use-version-updater.ts | 6 +--
src/lib/toast-utils.ts | 2 +-
10 files changed, 15 insertions(+), 137 deletions(-)
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 41af948..fb2096f 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -68,48 +68,7 @@ const eslintConfig = tseslint.config(
"react-hooks/exhaustive-deps": "off",
"react-hooks/rules-of-hooks": "off",
// typescript-eslint rules - some handled by TypeScript compiler or disabled for project needs
- "@typescript-eslint/adjacent-overload-signatures": "off",
- "@typescript-eslint/array-type": "off",
- "@typescript-eslint/ban-types": "off",
- "@typescript-eslint/consistent-type-exports": "off",
- "@typescript-eslint/consistent-type-imports": "off",
- "@typescript-eslint/default-param-last": "off",
- "@typescript-eslint/dot-notation": "off",
- "@typescript-eslint/explicit-function-return-type": "off",
- "@typescript-eslint/explicit-member-accessibility": "off",
- "@typescript-eslint/naming-convention": "off",
- "@typescript-eslint/no-dupe-class-members": "off",
- "@typescript-eslint/no-empty-function": "off",
- "@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
- "@typescript-eslint/no-extra-non-null-assertion": "off",
- "@typescript-eslint/no-extraneous-class": "off",
- "@typescript-eslint/no-inferrable-types": "off",
- "@typescript-eslint/no-invalid-void-type": "off",
- "@typescript-eslint/no-loss-of-precision": "off",
- "@typescript-eslint/no-misused-new": "off",
- "@typescript-eslint/no-namespace": "off",
- "@typescript-eslint/no-non-null-assertion": "off",
- "@typescript-eslint/no-redeclare": "off",
- "@typescript-eslint/no-require-imports": "off",
- "@typescript-eslint/no-restricted-imports": "off",
- "@typescript-eslint/no-restricted-types": "off",
- "@typescript-eslint/no-this-alias": "off",
- "@typescript-eslint/no-unnecessary-type-constraint": "off",
- "@typescript-eslint/no-unsafe-declaration-merging": "off",
- "@typescript-eslint/no-unused-vars": "off",
- "@typescript-eslint/no-use-before-define": "off",
- "@typescript-eslint/no-useless-constructor": "off",
- "@typescript-eslint/no-useless-empty-export": "off",
- "@typescript-eslint/only-throw-error": "off",
- "@typescript-eslint/parameter-properties": "off",
- "@typescript-eslint/prefer-as-const": "off",
- "@typescript-eslint/prefer-enum-initializers": "off",
- "@typescript-eslint/prefer-for-of": "off",
- "@typescript-eslint/prefer-function-type": "off",
- "@typescript-eslint/prefer-literal-enum-member": "off",
- "@typescript-eslint/prefer-namespace-keyword": "off",
- "@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/require-await": "off",
// Custom rules
"@typescript-eslint/restrict-template-expressions": [
@@ -127,6 +86,7 @@ const eslintConfig = tseslint.config(
tsconfigRootDir: import.meta.dirname,
},
},
- });
+ }
+);
export default eslintConfig;
diff --git a/nodecar/eslint.config.mjs b/nodecar/eslint.config.mjs
index b5f8cc0..76360f8 100644
--- a/nodecar/eslint.config.mjs
+++ b/nodecar/eslint.config.mjs
@@ -66,48 +66,7 @@ const eslintConfig = tseslint.config(
"react-hooks/exhaustive-deps": "off",
"react-hooks/rules-of-hooks": "off",
// typescript-eslint rules - some handled by TypeScript compiler or disabled for project needs
- "@typescript-eslint/adjacent-overload-signatures": "off",
- "@typescript-eslint/array-type": "off",
- "@typescript-eslint/ban-types": "off",
- "@typescript-eslint/consistent-type-exports": "off",
- "@typescript-eslint/consistent-type-imports": "off",
- "@typescript-eslint/default-param-last": "off",
- "@typescript-eslint/dot-notation": "off",
- "@typescript-eslint/explicit-function-return-type": "off",
- "@typescript-eslint/explicit-member-accessibility": "off",
- "@typescript-eslint/naming-convention": "off",
- "@typescript-eslint/no-dupe-class-members": "off",
- "@typescript-eslint/no-empty-function": "off",
- "@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
- "@typescript-eslint/no-extra-non-null-assertion": "off",
- "@typescript-eslint/no-extraneous-class": "off",
- "@typescript-eslint/no-inferrable-types": "off",
- "@typescript-eslint/no-invalid-void-type": "off",
- "@typescript-eslint/no-loss-of-precision": "off",
- "@typescript-eslint/no-misused-new": "off",
- "@typescript-eslint/no-namespace": "off",
- "@typescript-eslint/no-non-null-assertion": "off",
- "@typescript-eslint/no-redeclare": "off",
- "@typescript-eslint/no-require-imports": "off",
- "@typescript-eslint/no-restricted-imports": "off",
- "@typescript-eslint/no-restricted-types": "off",
- "@typescript-eslint/no-this-alias": "off",
- "@typescript-eslint/no-unnecessary-type-constraint": "off",
- "@typescript-eslint/no-unsafe-declaration-merging": "off",
- "@typescript-eslint/no-unused-vars": "off",
- "@typescript-eslint/no-use-before-define": "off",
- "@typescript-eslint/no-useless-constructor": "off",
- "@typescript-eslint/no-useless-empty-export": "off",
- "@typescript-eslint/only-throw-error": "off",
- "@typescript-eslint/parameter-properties": "off",
- "@typescript-eslint/prefer-as-const": "off",
- "@typescript-eslint/prefer-enum-initializers": "off",
- "@typescript-eslint/prefer-for-of": "off",
- "@typescript-eslint/prefer-function-type": "off",
- "@typescript-eslint/prefer-literal-enum-member": "off",
- "@typescript-eslint/prefer-namespace-keyword": "off",
- "@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/require-await": "off",
// Custom rules
"@typescript-eslint/restrict-template-expressions": [
diff --git a/src/components/permission-dialog.tsx b/src/components/permission-dialog.tsx
index bb57d7c..225f829 100644
--- a/src/components/permission-dialog.tsx
+++ b/src/components/permission-dialog.tsx
@@ -1,7 +1,6 @@
"use client";
import { LoadingButton } from "@/components/loading-button";
-import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -90,17 +89,6 @@ export function PermissionDialog({
}
};
- const getStatusBadge = (isGranted: boolean) => {
- if (isGranted) {
- return (
-