style(repo): clear workspace lint violations
Align existing managed source with the repository lint rules so the workspace can adopt one reliable root validation command. This normalizes the private file upload block, removes stale test suppressions, makes an error boundary explicit, and records a stable settings dependency without changing user-facing behavior. The cleanup creates a deterministic baseline before lint becomes a required pull request gate.
This commit is contained in:
4 files changed
+122
-121
No files matched your search
@@ -55,15 +55,18 @@ export namespace RequestDbKey {
|
||||
success: true,
|
||||
dbKey: key,
|
||||
};
|
||||
} catch (error: any) {
|
||||
const code = error?.code ?? -1;
|
||||
} catch (error: unknown) {
|
||||
const failure = typeof error === 'object' && error !== null
|
||||
? error as { code?: number; serverMsg?: string; message?: string }
|
||||
: {};
|
||||
const code = failure.code ?? -1;
|
||||
|
||||
return {
|
||||
success: false,
|
||||
errorCode: code,
|
||||
errorMsg: code === 1006
|
||||
? "数据库不匹配!检查数据库是否属于当前帐号"
|
||||
: (error?.serverMsg || error?.message || "网络或包结构解析失败"),
|
||||
? '数据库不匹配!检查数据库是否属于当前帐号'
|
||||
: (failure.serverMsg || failure.message || '网络或包结构解析失败'),
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,7 +33,6 @@ describe('qzone feeds JS-literal parsing (issue #182)', () => {
|
||||
|
||||
it('mapFeeds drops the undefined hole and normalises the feed', () => {
|
||||
const data = parseQzoneCallback(SAMPLE);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const result = mapFeeds(data as any);
|
||||
expect(result.feeds).toHaveLength(1);
|
||||
const f = result.feeds[0]!;
|
||||
@@ -59,7 +58,6 @@ describe('qzone feeds JS-literal parsing (issue #182)', () => {
|
||||
|
||||
it('does not pollute Object.prototype via a __proto__ key', () => {
|
||||
parseQzoneCallback('_preloadCallback({"__proto__":{"polluted":1},"code":0})');
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
expect(({} as any).polluted).toBeUndefined();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user