diff --git a/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/eslint.config.cjs b/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/eslint.config.cjs deleted file mode 100644 index 63647b52cc..0000000000 --- a/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/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-restify/package.json b/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/package.json index 9453486b69..2ea1dfd202 100644 --- a/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/package.json +++ b/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/package.json @@ -31,7 +31,6 @@ "botbuilder": "4.1.6", "botbuilder-dialogs-adaptive-runtime": "4.1.6", "botbuilder-dialogs-adaptive-runtime-core": "4.1.6", - "eslint-plugin-only-warn": "^1.1.0", "restify": "^11.1.0", "zod": "^3.23.8" }, @@ -39,7 +38,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": [ diff --git a/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/src/index.ts b/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/src/index.ts index b9fddd2ddb..e59836fae5 100644 --- a/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/src/index.ts +++ b/libraries/botbuilder-dialogs-adaptive-runtime-integration-restify/src/index.ts @@ -72,7 +72,7 @@ async function resolveOptions(options: Partial, configuration: Configur export async function start( applicationRoot: string, settingsDirectory: string, - options: Partial = {} + options: Partial = {}, ): Promise { const [services, configuration] = await getRuntimeServices(applicationRoot, settingsDirectory); @@ -104,7 +104,7 @@ export async function makeServer( configuration: Configuration, applicationRoot: string, options: Partial = {}, - server = restify.createServer() + server = restify.createServer(), ): Promise { server.use(restify.plugins.acceptParser(server.acceptable)); server.use(restify.plugins.queryParser()); @@ -125,12 +125,11 @@ export async function makeServer( } 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); res.json({ - message: err instanceof Error ? err.message : err ?? 'Internal server error', + message: err instanceof Error ? err.message : (err ?? 'Internal server error'), }); } }; @@ -155,8 +154,8 @@ export async function makeServer( name: z.string(), enabled: z.boolean().optional(), route: z.string(), - }) - ) + }), + ), ) ?? []; adapters @@ -187,7 +186,7 @@ export async function makeServer( res.setHeader('Content-Type', contentType); } }, - }) + }), ); server.on('upgrade', async (req, socket, head) => {