Enforce no-explicit-any; allow in tests

Enable @typescript-eslint/no-explicit-any as an error in the ESLint config to tighten typing across the codebase, and add an override to disable this rule for test files. Also apply non-functional cleanup in packages/proton/src/runtime.ts: reorder/imports and adjust formatting/indentation and string alignment for readability — no behavioral changes.
This commit is contained in:
手瓜一十雪 committed 2026-05-24 13:38:13 +08:00
1 parent acc5084647
commit 80ee12ecc2
36 files changed
+229 -147

No files matched your search

+3 -3
View File
@@ -139,7 +139,7 @@ export function register(h: ApiHandler, ctx: ApiActionContext): void {
try {
const essenceDataAll = await ctx.bridge.apis.web.getEssenceAll(groupId);
const allMsgs = essenceDataAll.flatMap((res: any) => res.data?.msg_list || []);
const allMsgs = essenceDataAll.flatMap((res) => res.data?.msg_list || []);
return okResponse(allMsgs);
} catch (e) {
@@ -347,7 +347,7 @@ export function register(h: ApiHandler, ctx: ApiActionContext): void {
message_id: 0,
};
if (groupId > 0) data.group_id = groupId;
return okResponse(data as any);
return okResponse(data as import('../types').JsonObject);
});
h.registerAction('upload_foward_msg', async (params) => {
@@ -985,7 +985,7 @@ export function register(h: ApiHandler, ctx: ApiActionContext): void {
}
});
const handleGroupSign = async (params: any) => {
const handleGroupSign = async (params: import('../types').JsonObject) => {
const groupId = asNumber(params.group_id);
if (!groupId) {