fix: lint

This commit is contained in:
yyh 2026-03-03 13:09:47 +08:00
parent aa7a6e96ed
commit 7d64082c6f
No known key found for this signature in database
2 changed files with 2 additions and 47 deletions

View File

@ -6,7 +6,7 @@ import hyoban from 'eslint-plugin-hyoban'
import sonar from 'eslint-plugin-sonarjs'
import storybook from 'eslint-plugin-storybook'
import dify from './eslint-rules/index.js'
import { BASE_UI_PRIMITIVE_EXPORT_NAMES, OVERLAY_MIGRATION_LEGACY_BASE_FILES } from './eslint.constants.mjs'
import { OVERLAY_MIGRATION_LEGACY_BASE_FILES } from './eslint.constants.mjs'
// Enable Tailwind CSS IntelliSense mode for ESLint runs
// See: tailwind-css-plugin.ts
@ -150,9 +150,7 @@ export default antfu(
name: 'dify/base-ui-primitives',
files: ['app/components/base/ui/**/*.tsx'],
rules: {
'react-refresh/only-export-components': ['error', {
allowExportNames: BASE_UI_PRIMITIVE_EXPORT_NAMES,
}],
'react-refresh/only-export-components': 'off',
},
},
{

View File

@ -1,46 +1,3 @@
export const BASE_UI_PRIMITIVE_EXPORT_NAMES = [
'Dialog',
'DialogClose',
'DialogContent',
'DialogDescription',
'DialogTitle',
'DialogTrigger',
'DropdownMenu',
'DropdownMenuCheckboxItem',
'DropdownMenuCheckboxItemIndicator',
'DropdownMenuContent',
'DropdownMenuGroup',
'DropdownMenuGroupLabel',
'DropdownMenuItem',
'DropdownMenuPortal',
'DropdownMenuRadioGroup',
'DropdownMenuRadioItem',
'DropdownMenuRadioItemIndicator',
'DropdownMenuSeparator',
'DropdownMenuSub',
'DropdownMenuSubContent',
'DropdownMenuSubTrigger',
'DropdownMenuTrigger',
'Popover',
'PopoverClose',
'PopoverContent',
'PopoverDescription',
'PopoverTitle',
'PopoverTrigger',
'Select',
'SelectContent',
'SelectGroup',
'SelectGroupLabel',
'SelectItem',
'SelectSeparator',
'SelectTrigger',
'SelectValue',
'Tooltip',
'TooltipContent',
'TooltipProvider',
'TooltipTrigger',
]
export const OVERLAY_MIGRATION_LEGACY_BASE_FILES = [
'app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.tsx',
'app/components/base/chat/chat-with-history/header/operation.tsx',