perf: remove unused imports

This commit is contained in:
hamster1963 2025-01-21 10:08:02 +08:00
parent b4c3bccace
commit a8f4c8564f
10 changed files with 6 additions and 10 deletions

View File

@ -8,7 +8,7 @@ import getEnv from "@/lib/env-entry"
import { DateTime } from "luxon" import { DateTime } from "luxon"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import { useRouter } from "next/navigation" import { useRouter } from "next/navigation"
import React, { useEffect, useRef, useState } from "react" import { useEffect, useState } from "react"
function Header() { function Header() {
const t = useTranslations("Header") const t = useTranslations("Header")

View File

@ -1,6 +1,6 @@
"use client" "use client"
import React, { ReactNode, createContext, useContext, useState } from "react" import { ReactNode, createContext, useContext, useState } from "react"
interface FilterContextType { interface FilterContextType {
filter: boolean filter: boolean

View File

@ -1,6 +1,6 @@
"use client" "use client"
import React, { ReactNode, createContext, useContext, useState } from "react" import { ReactNode, createContext, useContext, useState } from "react"
type Status = "all" | "online" | "offline" type Status = "all" | "online" | "offline"

View File

@ -52,6 +52,7 @@
"linter": { "linter": {
"rules": { "rules": {
"correctness": { "correctness": {
"noUnusedImports": "error",
"noConstAssign": "off", "noConstAssign": "off",
"noGlobalObjectCalls": "off", "noGlobalObjectCalls": "off",
"noInvalidBuiltinInstantiation": "off", "noInvalidBuiltinInstantiation": "off",
@ -73,7 +74,6 @@
"noDuplicateObjectKeys": "off", "noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off", "noDuplicateParameters": "off",
"noFunctionAssign": "off", "noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off", "noRedeclare": "off",
"noUnsafeNegation": "off", "noUnsafeNegation": "off",
"useGetterReturn": "off" "useGetterReturn": "off"

View File

@ -12,7 +12,6 @@ import { setUserLocale } from "@/i18n/locale"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
import { CheckCircleIcon } from "@heroicons/react/20/solid" import { CheckCircleIcon } from "@heroicons/react/20/solid"
import { useLocale } from "next-intl" import { useLocale } from "next-intl"
import * as React from "react"
export function LanguageSwitcher() { export function LanguageSwitcher() {
const locale = useLocale() const locale = useLocale()

View File

@ -1,5 +1,4 @@
import { Progress } from "@/components/ui/progress" import { Progress } from "@/components/ui/progress"
import React from "react"
type ServerUsageBarProps = { type ServerUsageBarProps = {
value: number value: number

View File

@ -3,7 +3,7 @@
import getEnv from "@/lib/env-entry" import getEnv from "@/lib/env-entry"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import React, { createRef, useEffect, useRef, useState } from "react" import { createRef, useEffect, useRef, useState } from "react"
export default function Switch({ export default function Switch({
allTag, allTag,

View File

@ -2,7 +2,7 @@
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import React, { useEffect, useRef, useState } from "react" import { useEffect, useRef, useState } from "react"
export default function TabSwitch({ export default function TabSwitch({
tabs, tabs,

View File

@ -1,6 +1,5 @@
import Image from "next/image" import Image from "next/image"
import Link from "next/link" import Link from "next/link"
import React from "react"
export const AnimatedTooltip = ({ export const AnimatedTooltip = ({
items, items,

View File

@ -1,4 +1,3 @@
import React from "react"
import type { SVGProps } from "react" import type { SVGProps } from "react"
export function GetFontLogoClass(platform: string): string { export function GetFontLogoClass(platform: string): string {