refactor: minor lint and consistency fixes

Apply a collection of small code cleanups across the repo for consistency and lint-safety. Changes include:

- Use strict equality (===) where appropriate (GetEmojiLikes, about page checks).
- Replace Array.map used for side effects with Array.forEach (GetMsg).
- Rename unused catch parameters to underscore-prefixed names to avoid lint warnings (multiple backend/middleware files).
- Replace void with undefined in an actions.call invocation (builtin plugin index).
- Remove an unused loadedCount variable when reading .env (napcat-shell).
- Rename promise resolver parameter to `resolve` for clarity in tests and keep setTimeout usage (rpc.test.ts).
- Strengthen external shims types by changing generic parameter names to _T and update inversify ServiceIdentifier generic param (external-shims.d.ts).
- Simplify post-build script imports and comment out an external-type mapping block; fix a regex character class bug (post-build.mjs).
- Prefix several unused test stub variables with underscore to indicate intentional unused status (test-dist.ts).
- Minor JSX formatting/indentation fixes in password_login component and UI text indentation in system_info.
- Misc: SSE/config and plugin config handlers adjusted to consistent catch parameter naming; update mirror/download error catch variable name.

These edits are non-functional refactors focused on code style, lint compliance and small robustness/clarity improvements.
This commit is contained in:
手瓜一十雪 committed 2026-03-05 18:53:58 +08:00
1 parent 974528fe7e
commit b15d02535e
19 files changed
+49 -65

No files matched your search

@@ -133,24 +133,24 @@ const PasswordLogin: React.FC<PasswordLoginProps> = ({ onSubmit, onCaptchaSubmit
>
{(item) => (
<DropdownItem key={item.uin} textValue={item.uin}>
<div className='flex items-center gap-2'>
<Avatar
alt={item.uin}
className='flex-shrink-0'
size='sm'
src={
<div className='flex items-center gap-2'>
<Avatar
alt={item.uin}
className='flex-shrink-0'
size='sm'
src={
isQQQuickNewItem(item)
? item.faceUrl
: `https://q1.qlogo.cn/g?b=qq&nk=${item.uin}&s=1`
}
/>
<div className='flex flex-col'>
{isQQQuickNewItem(item)
? `${item.nickName}(${item.uin})`
: item.uin}
</div>
</div>
</DropdownItem>
/>
<div className='flex flex-col'>
{isQQQuickNewItem(item)
? `${item.nickName}(${item.uin})`
: item.uin}
</div>
</div>
</DropdownItem>
)}
</DropdownMenu>
</Dropdown>
@@ -325,7 +325,7 @@ const VersionSelectDialogContent: React.FC<VersionSelectDialogProps> = ({
} else {
setMirrorLatency(null);
}
} catch (e) {
} catch (_e) {
setMirrorLatency(null);
} finally {
setMirrorTesting(false);
@@ -672,8 +672,8 @@ const VersionSelectDialogContent: React.FC<VersionSelectDialogProps> = ({
<div className='flex items-center gap-2'>
<span className='truncate max-w-[300px]'>
{version.type === 'action'
? (version.workflowTitle || version.artifactName || version.tag)
: version.tag}
? (version.workflowTitle || version.artifactName || version.tag)
: version.tag}
</span>
{version.type === 'prerelease' && (
<Chip size='sm' color='secondary' variant='flat'>预发布</Chip>