refactor: 优化eslint配置,提升代码质量 (#1341)

* feat: 统一并标准化eslint

* lint: napcat.webui

* lint: napcat.webui

* lint: napcat.core

* build: fix

* lint: napcat.webui

* refactor: 重构eslint

* Update README.md
This commit is contained in:
时瑾 authored and GitHub committed 2025-11-03 16:30:45 +08:00
1 parent d5b8f886d6
commit 06f6a542f5
651 files changed
+37978 -37584

No files matched your search

@@ -1,7 +1,7 @@
import { Chip } from '@heroui/chip'
import { Chip } from '@heroui/chip';
import NetworkDisplayCard from './common_card'
import type { NetworkDisplayCardFields } from './common_card'
import NetworkDisplayCard from './common_card';
import type { NetworkDisplayCardFields } from './common_card';
interface HTTPClientDisplayCardProps {
data: OneBotConfig['network']['httpClients'][0]
@@ -13,8 +13,8 @@ interface HTTPClientDisplayCardProps {
}
const HTTPClientDisplayCard: React.FC<HTTPClientDisplayCardProps> = (props) => {
const { data, showType, onEdit, onEnable, onDelete, onEnableDebug } = props
const { url, reportSelfMessage, messagePostFormat } = data
const { data, showType, onEdit, onEnable, onDelete, onEnableDebug } = props;
const { url, reportSelfMessage, messagePostFormat } = data;
const fields: NetworkDisplayCardFields<'httpClients'> = [
{ label: 'URL', value: url },
@@ -23,25 +23,25 @@ const HTTPClientDisplayCard: React.FC<HTTPClientDisplayCardProps> = (props) => {
label: '上报自身消息',
value: reportSelfMessage,
render: (value) => (
<Chip color={value ? 'success' : 'default'} size="sm" variant="flat">
<Chip color={value ? 'success' : 'default'} size='sm' variant='flat'>
{value ? '是' : '否'}
</Chip>
)
}
]
),
},
];
return (
<NetworkDisplayCard
data={data}
showType={showType}
typeLabel="HTTP客户端"
typeLabel='HTTP客户端'
fields={fields}
onEdit={onEdit}
onEnable={onEnable}
onDelete={onDelete}
onEnableDebug={onEnableDebug}
/>
)
}
);
};
export default HTTPClientDisplayCard
export default HTTPClientDisplayCard;