chore(lint): exempt oidb-services from no-namespace + clean stale directives
The namespace-per-cmd OIDB service layer was tripping
`@typescript-eslint/no-namespace` across 59 files; namespace IS
the OidbCallSpec by design (structural typing, one file per
(cmd, subcmd)) so disable the rule for that subtree only. Drop
four stale `eslint-disable-next-line @typescript-eslint/no-empty-
object-type` comments that aren't needed anymore (the empty
`Params {}` shape no longer triggers the rule), and fix an indent
nit in the get-unidirectional-friend-list test.
`npx eslint packages` now reports 0 errors. The 5 remaining
warnings are unused-vars / unused-eslint-disable in unrelated
pre-existing files.
This commit is contained in:
6 files changed
+15
-6
No files matched your search
@@ -17,7 +17,6 @@ export namespace FetchDownloadRkeys {
|
||||
export const subCommand = 202;
|
||||
export const uinForm = true;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface Params {}
|
||||
|
||||
export type Deps = OidbSender;
|
||||
|
||||
@@ -18,7 +18,6 @@ export namespace FetchGroupList {
|
||||
export const subCommand = 2;
|
||||
export const uinForm = true;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface Params {}
|
||||
|
||||
export type Deps = OidbSender;
|
||||
|
||||
@@ -21,7 +21,6 @@ export namespace GetUnidirectionalFriendList {
|
||||
* `OidbSvcTrpcTcp.0xNNNN_N` namespace. */
|
||||
export const wireName = (): string => 'MQUpdateSvc_com_qq_ti.web.OidbSvc.0xe17_0';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface Params {}
|
||||
|
||||
export type Deps = OidbSender & Pick<BridgeContext, 'identity'>;
|
||||
|
||||
@@ -20,7 +20,6 @@ export namespace ForceFetchClientKey {
|
||||
export const command = 0x102A;
|
||||
export const subCommand = 1;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface Params {}
|
||||
|
||||
export type Deps = OidbSender;
|
||||
|
||||
@@ -9,8 +9,8 @@ import { GetUnidirectionalFriendList } from '../../../src/oidb-services/profile/
|
||||
function makeDeps(responseJson?: unknown) {
|
||||
const responseData = responseJson !== undefined
|
||||
? Buffer.from(protobuf_encode<OidbBase<Oidb0xe17Resp>>({
|
||||
body: { jsonBody: JSON.stringify(responseJson) },
|
||||
}))
|
||||
body: { jsonBody: JSON.stringify(responseJson) },
|
||||
}))
|
||||
: Buffer.alloc(0);
|
||||
const r: SendPacketResult = { success: true, gotResponse: true, errorCode: 0, errorMessage: '', responseData };
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user