接入 ESLint 并清理未使用代码
- 前后端接入 ESLint 10 扁平配置(typescript-eslint 类型感知检查 + react-hooks/react-refresh),新增 lint / lint:check / lint:fix 脚本并纳入 check 链路 - 清理全部 no-unused-vars 与 no-useless-assignment 警告,修复 floating promises、正则转义等问题 - 删除确认无引用的死代码(markKuaishouCloudBindUrlRefreshFailed、未使用 helper 等)
This commit is contained in:
@@ -1368,7 +1368,7 @@ function resolveDefaultSourceKey(sourceRows: SourceRow[], selectedSourceKey: str
|
||||
function normalizeMatchName(value: unknown) {
|
||||
return String(value || '')
|
||||
.toLowerCase()
|
||||
.replace(/[【】\[\]()()]/g, ' ')
|
||||
.replace(/[【】[\]()()]/g, ' ')
|
||||
.replace(/(自动发货|秒发|极速发货|官方直充|官方充值)/gi, ' ')
|
||||
.replace(/[^\p{L}\p{N}]+/gu, ' ')
|
||||
.replace(/\s+/g, ' ')
|
||||
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
Input,
|
||||
InputNumber,
|
||||
Popconfirm,
|
||||
Select,
|
||||
Space,
|
||||
Spin,
|
||||
Switch,
|
||||
@@ -134,7 +133,7 @@ export default function AdminPlatformShopsPage() {
|
||||
const [feifeiConfig, setFeifeiConfig] = useState<AdminKuaishouFeifeiConfigResponse | null>(null)
|
||||
const [cloudtentaclesConfig, setCloudtentaclesConfig] =
|
||||
useState<AdminCloudtentaclesSourceConfigResponse | null>(null)
|
||||
const [affiliateDashConfig, setAffiliateDashConfig] =
|
||||
const [_affiliateDashConfig, setAffiliateDashConfig] =
|
||||
useState<AdminAffiliateDashConfigResponse | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
@@ -2930,7 +2929,9 @@ function AffiliateDashPlatformPanel() {
|
||||
current: productPage,
|
||||
pageSize: 20,
|
||||
total: productTotal,
|
||||
onChange: (page) => loadProducts(page),
|
||||
onChange: (page) => {
|
||||
void loadProducts(page)
|
||||
},
|
||||
})}
|
||||
/>
|
||||
</Space>
|
||||
|
||||
Reference in New Issue
Block a user