diff --git a/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/eslint.config.cjs b/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/eslint.config.cjs deleted file mode 100644 index 63647b52cc..0000000000 --- a/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/eslint.config.cjs +++ /dev/null @@ -1,10 +0,0 @@ -const onlyWarn = require("eslint-plugin-only-warn"); -const sharedConfig = require("../../eslint.config.cjs") - -module.exports = [ - ...sharedConfig, - { - plugins: { - "only-warn": onlyWarn, - }, - }]; diff --git a/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/package.json b/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/package.json index 13eb04cf32..1d60891c2b 100644 --- a/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/package.json +++ b/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/package.json @@ -28,7 +28,7 @@ "build": "tsc -b", "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", "depcheck": "depcheck --config ../../.depcheckrc", - "lint": "eslint .", + "lint": "eslint . --config ../../eslint.config.cjs", "postbuild": "downlevel-dts lib _ts3.4/lib --checksum" }, "files": [ @@ -44,7 +44,6 @@ "botbuilder-dialogs-adaptive-runtime-core": "4.1.6", "botframework-connector": "4.1.6", "express": "^4.21.0", - "eslint-plugin-only-warn": "^1.1.0", "zod": "^3.23.8" } } diff --git a/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/src/index.ts b/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/src/index.ts index e9560c934d..26005cf656 100644 --- a/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/src/index.ts +++ b/libraries/botbuilder-dialogs-adaptive-runtime-integration-express/src/index.ts @@ -43,7 +43,7 @@ const TypedOptions = z.object({ /** * Used when creating ConnectorClients. */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any + connectorClientOptions: z.object({}) as z.ZodObject, }); @@ -71,7 +71,7 @@ const defaultOptions: Options = { export async function start( applicationRoot: string, settingsDirectory: string, - options: Partial = {} + options: Partial = {}, ): Promise { const [services, configuration] = await getRuntimeServices(applicationRoot, settingsDirectory, { connectorClientOptions: options.connectorClientOptions, @@ -102,7 +102,7 @@ export async function makeApp( configuration: Configuration, applicationRoot: string, options: Partial = {}, - app: Application = express() + app: Application = express(), ): Promise<[Application, (callback?: () => void) => Server]> { const configOverrides: Partial = {}; @@ -119,11 +119,10 @@ export async function makeApp( } if (res && !res.headersSent) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const statusCode = typeof (err as any)?.statusCode === 'number' ? (err as any).statusCode : 500; res.status(statusCode).json({ - message: err instanceof Error ? err.message : err ?? 'Internal server error', + message: err instanceof Error ? err.message : (err ?? 'Internal server error'), }); } }; @@ -146,7 +145,7 @@ export async function makeApp( res.setHeader('Content-Type', contentType); } }, - }) + }), ); app.post(resolvedOptions.messagingEndpointPath, async (req, res) => { @@ -169,8 +168,8 @@ export async function makeApp( name: z.string(), enabled: z.boolean().optional(), route: z.string(), - }) - ) + }), + ), ) ?? []; adapters @@ -200,7 +199,7 @@ export async function makeApp( // after the app starts listening for requests. const server = app.listen( resolvedOptions.port, - callback ?? (() => console.log(`server listening on port ${resolvedOptions.port}`)) + callback ?? (() => console.log(`server listening on port ${resolvedOptions.port}`)), ); server.on('upgrade', async (req, socket, head) => {