chore(web): new lint setup (#30020)

Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
Stephen Zhou
2025-12-23 16:58:55 +08:00
committed by GitHub
parent 9701a2994b
commit f2842da397
3356 changed files with 85046 additions and 81278 deletions

View File

@ -1,13 +1,13 @@
'use client'
import { useTranslation } from 'react-i18next'
import Link from 'next/link'
import { cn } from '@/utils/classnames'
import { Group } from '@/app/components/base/icons/src/vender/other'
import { useSelectedLayoutSegment } from 'next/navigation'
import DownloadingIcon from './downloading-icon'
import { usePluginTaskStatus } from '@/app/components/plugins/plugin-page/plugin-tasks/hooks'
import { useTranslation } from 'react-i18next'
import { Group } from '@/app/components/base/icons/src/vender/other'
import Indicator from '@/app/components/header/indicator'
import { usePluginTaskStatus } from '@/app/components/plugins/plugin-page/plugin-tasks/hooks'
import { cn } from '@/utils/classnames'
import DownloadingIcon from './downloading-icon'
type PluginsNavProps = {
className?: string
@ -26,27 +26,27 @@ const PluginsNav = ({
} = usePluginTaskStatus()
return (
<Link href="/plugins" className={cn(className, 'group', 'plugins-nav-button',
// used for use-fold-anim-into.ts
)}>
<Link
href="/plugins"
className={cn(className, 'group', 'plugins-nav-button',
// used for use-fold-anim-into.ts
)}
>
<div
className={cn('system-sm-medium relative flex h-8 flex-row items-center justify-center gap-0.5 rounded-xl border border-transparent p-1.5',
activated && 'border-components-main-nav-nav-button-border bg-components-main-nav-nav-button-bg-active text-components-main-nav-nav-button-text shadow-md',
!activated && 'text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary',
(isInstallingWithError || isFailed) && !activated && 'border-components-panel-border-subtle')}
className={cn('system-sm-medium relative flex h-8 flex-row items-center justify-center gap-0.5 rounded-xl border border-transparent p-1.5', activated && 'border-components-main-nav-nav-button-border bg-components-main-nav-nav-button-bg-active text-components-main-nav-nav-button-text shadow-md', !activated && 'text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary', (isInstallingWithError || isFailed) && !activated && 'border-components-panel-border-subtle')}
>
{
(isFailed || isInstallingWithError) && !activated && (
<Indicator
color='red'
className='absolute left-[-1px] top-[-1px]'
color="red"
className="absolute left-[-1px] top-[-1px]"
/>
)
}
<div className='mr-0.5 flex h-5 w-5 items-center justify-center'>
<div className="mr-0.5 flex h-5 w-5 items-center justify-center">
{
(!(isInstalling || isInstallingWithError) || activated) && (
<Group className='h-4 w-4' />
<Group className="h-4 w-4" />
)
}
{
@ -55,7 +55,7 @@ const PluginsNav = ({
)
}
</div>
<span className='px-0.5'>{t('common.menus.plugins')}</span>
<span className="px-0.5">{t('common.menus.plugins')}</span>
</div>
</Link>
)