Skip to content

Commit 45ec3f8

Browse files
RahulHereRahulHere
authored andcommitted
Fix lint errors in gopher-auth.ts and middleware.ts
- Suppress ban-types for Express app parameter (Function type) - Suppress unsafe-any rules in middleware (Express req/res are any)
1 parent 5b55fe7 commit 45ec3f8

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/auth/gopher-auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ export class GopherAuth {
257257
* Register OAuth discovery and flow routes on Express app
258258
*/
259259
registerOAuthRoutes(
260+
// eslint-disable-next-line @typescript-eslint/ban-types
260261
app: { get: Function; post: Function; options: Function },
261262
options?: { serverUrl?: string; allowedScopes?: string[] }
262263
): void {

src/auth/middleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function expressMiddleware(
3838
const publicMethods = options?.publicMethods ?? [];
3939
const toolScopes = options?.toolScopes ?? {};
4040

41-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
41+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
4242
return (req: any, res: any, next: any) => {
4343
// Skip if auth is disabled
4444
if (auth.isDisabled) {
@@ -151,4 +151,5 @@ export function expressMiddleware(
151151
});
152152
}
153153
};
154+
/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
154155
}

0 commit comments

Comments
 (0)