diff --git a/libraries/botbuilder-applicationinsights/eslint.config.cjs b/libraries/botbuilder-applicationinsights/eslint.config.cjs deleted file mode 100644 index 63647b52cc..0000000000 --- a/libraries/botbuilder-applicationinsights/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-applicationinsights/package.json b/libraries/botbuilder-applicationinsights/package.json index e414308a7d..746c82a0f2 100644 --- a/libraries/botbuilder-applicationinsights/package.json +++ b/libraries/botbuilder-applicationinsights/package.json @@ -30,8 +30,7 @@ "dependencies": { "applicationinsights": "^2.9.6", "botbuilder-core": "4.1.6", - "cls-hooked": "^4.2.2", - "eslint-plugin-only-warn": "^1.1.0" + "cls-hooked": "^4.2.2" }, "scripts": { "build": "tsc -b", @@ -39,7 +38,7 @@ "build:rollup": "yarn clean && yarn build && api-extractor run --verbose --local", "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", "test": "npm-run-all build test:mocha", "test:compat": "api-extractor run --verbose", diff --git a/libraries/botbuilder-applicationinsights/src/applicationInsightsTelemetryClient.ts b/libraries/botbuilder-applicationinsights/src/applicationInsightsTelemetryClient.ts index 93cea83548..af029818e0 100644 --- a/libraries/botbuilder-applicationinsights/src/applicationInsightsTelemetryClient.ts +++ b/libraries/botbuilder-applicationinsights/src/applicationInsightsTelemetryClient.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /** * @module botbuilder-applicationinsights */ diff --git a/libraries/botbuilder-applicationinsights/src/telemetryInitializerMiddleware.ts b/libraries/botbuilder-applicationinsights/src/telemetryInitializerMiddleware.ts index 2318afcab2..b07e9f7e89 100644 --- a/libraries/botbuilder-applicationinsights/src/telemetryInitializerMiddleware.ts +++ b/libraries/botbuilder-applicationinsights/src/telemetryInitializerMiddleware.ts @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License -import { TelemetryLoggerMiddleware } from 'botbuilder-core'; -import { Middleware } from 'botbuilder-core'; -import { TurnContext } from 'botbuilder-core'; +import { TelemetryLoggerMiddleware, Middleware, TurnContext } from 'botbuilder-core'; import { CorrelationContext } from 'applicationinsights/out/AutoCollection/CorrelationContextManager'; import * as appInsights from 'applicationinsights'; diff --git a/libraries/botbuilder-applicationinsights/tests/TelemetryWaterfallTest.test.js b/libraries/botbuilder-applicationinsights/tests/TelemetryWaterfallTest.test.js index 28ada17e39..51ba2ca546 100644 --- a/libraries/botbuilder-applicationinsights/tests/TelemetryWaterfallTest.test.js +++ b/libraries/botbuilder-applicationinsights/tests/TelemetryWaterfallTest.test.js @@ -90,7 +90,7 @@ describe('TelemetryWaterfall', function () { if (telemetry.name === 'WaterfallStep') { assert( telemetry.properties.StepName === 'Step' + (count + 1) + 'of' + dialog.steps.length, - 'waterfallstep step name is wrong' + 'waterfallstep step name is wrong', ); count++; } @@ -252,23 +252,23 @@ describe('TelemetryWaterfall', function () { assert( component.findDialog('secondary').telemetryClient instanceof NullTelemetryClient, - 'should be nulltelemetryclient by default' + 'should be nulltelemetryclient by default', ); assert( component.telemetryClient instanceof NullTelemetryClient, - 'child dialog should have same telemetry client' + 'child dialog should have same telemetry client', ); component.telemetryClient = new TestClient(); assert( component.findDialog('secondary').telemetryClient instanceof TestClient, - 'child dialogs should now be TestClient' + 'child dialogs should now be TestClient', ); assert(component.telemetryClient instanceof TestClient, 'component should have a testclient as well'); assert( component.telemetryClient === component.findDialog('secondary').telemetryClient, - 'component should have same client as children' + 'component should have same client as children', ); component.addDialog(new WaterfallDialog('third'), [ @@ -279,29 +279,29 @@ describe('TelemetryWaterfall', function () { assert( component.findDialog('third').telemetryClient instanceof TestClient, - 'child dialogs should now be TestClient' + 'child dialogs should now be TestClient', ); assert( component.findDialog('secondary').telemetryClient instanceof TestClient, - 'child dialogs should now be TestClient' + 'child dialogs should now be TestClient', ); assert( component.telemetryClient === component.findDialog('third').telemetryClient, - 'component should have same client as new children' + 'component should have same client as new children', ); assert( component.findDialog('third').telemetryClient === component.findDialog('secondary').telemetryClient, - 'children should have identical clients' + 'children should have identical clients', ); component.telemetryClient = null; assert( component.findDialog('secondary').telemetryClient instanceof NullTelemetryClient, - 'child dialog should be reset to nulltelemetryclient' + 'child dialog should be reset to nulltelemetryclient', ); assert( component.telemetryClient instanceof NullTelemetryClient, - 'component should be reset to nulltelemetryclient' + 'component should be reset to nulltelemetryclient', ); }); }); diff --git a/libraries/botbuilder-applicationinsights/tests/telemetryInitializer.test.js b/libraries/botbuilder-applicationinsights/tests/telemetryInitializer.test.js index f3286c9f12..182abc2a90 100644 --- a/libraries/botbuilder-applicationinsights/tests/telemetryInitializer.test.js +++ b/libraries/botbuilder-applicationinsights/tests/telemetryInitializer.test.js @@ -151,7 +151,7 @@ describe('TelemetryInitializerMiddleware', function () { (err) => { assert.strictEqual(err.message, 'context is null'); return true; - } + }, ); }); @@ -175,7 +175,7 @@ describe('TelemetryInitializerMiddleware', function () { () => new Promise((resolve) => { resolve(); - }) + }), ); const updatedContext = appInsights.getCorrelationContext(); @@ -200,7 +200,7 @@ describe('TelemetryInitializerMiddleware', function () { () => new Promise((resolve) => { resolve(); - }) + }), ); const updatedContext = appInsights.getCorrelationContext(); @@ -229,7 +229,7 @@ describe('TelemetryInitializerMiddleware', function () { () => new Promise((resolve) => { resolve(); - }) + }), ); const updatedContext = appInsights.getCorrelationContext();