diff --git a/packages/angular/src/tracing.ts b/packages/angular/src/tracing.ts index 86d7a4771c9c..d36d8a5d0b99 100644 --- a/packages/angular/src/tracing.ts +++ b/packages/angular/src/tracing.ts @@ -1,12 +1,14 @@ import type { AfterViewInit, OnDestroy, OnInit } from '@angular/core'; -// eslint-disable-next-line @typescript-eslint/consistent-type-imports +// eslint-disable-next-line @typescript-eslint/consistent-type-imports, import/no-duplicates import { ElementRef } from '@angular/core'; +// eslint-disable-next-line import/no-duplicates import { Directive, Injectable, Input, NgModule } from '@angular/core'; import type { ActivatedRouteSnapshot, Event, RouterState } from '@angular/router'; // Duplicated import to work around a TypeScript bug where it'd complain that `Router` isn't imported as a type. // We need to import it as a value to satisfy Angular dependency injection. So: -// eslint-disable-next-line @typescript-eslint/consistent-type-imports +// eslint-disable-next-line @typescript-eslint/consistent-type-imports, import/no-duplicates import { NavigationCancel, NavigationError, Router } from '@angular/router'; +// eslint-disable-next-line import/no-duplicates import { NavigationEnd, NavigationStart, ResolveEnd } from '@angular/router'; import { browserTracingIntegration as originalBrowserTracingIntegration, diff --git a/packages/ember/tests/helpers/setup-sentry.ts b/packages/ember/tests/helpers/setup-sentry.ts index 1c4de83681e6..5793e45c5eb0 100644 --- a/packages/ember/tests/helpers/setup-sentry.ts +++ b/packages/ember/tests/helpers/setup-sentry.ts @@ -1,11 +1,11 @@ import type { TestContext } from '@ember/test-helpers'; import { resetOnerror, setupOnerror } from '@ember/test-helpers'; -import sinon from 'sinon'; +import { type SinonStub, stub } from 'sinon'; export type SentryTestContext = TestContext & { errorMessages: string[]; - fetchStub: sinon.SinonStub; - qunitOnUnhandledRejection: sinon.SinonStub; + fetchStub: SinonStub; + qunitOnUnhandledRejection: SinonStub; _windowOnError: OnErrorEventHandler; }; @@ -19,13 +19,13 @@ export function setupSentryTest(hooks: NestedHooks): void { /** * Stub out fetch function to assert on Sentry calls. */ - this.fetchStub = sinon.stub(window, 'fetch'); + this.fetchStub = stub(window, 'fetch'); /** * Stops global test suite failures from unhandled rejections and allows assertion on them. * onUncaughtException is used in QUnit 2.17 onwards. */ - this.qunitOnUnhandledRejection = sinon.stub( + this.qunitOnUnhandledRejection = stub( QUnit, // @ts-expect-error this is OK QUnit.onUncaughtException ? 'onUncaughtException' : 'onUnhandledRejection', diff --git a/packages/ember/tests/unit/instrument-route-performance-test.ts b/packages/ember/tests/unit/instrument-route-performance-test.ts index 962048f62357..9c4f432e5694 100644 --- a/packages/ember/tests/unit/instrument-route-performance-test.ts +++ b/packages/ember/tests/unit/instrument-route-performance-test.ts @@ -2,7 +2,7 @@ import Route from '@ember/routing/route'; import { instrumentRoutePerformance } from '@sentry/ember'; import { setupTest } from 'ember-qunit'; import { module, test } from 'qunit'; -import sinon from 'sinon'; +import { spy } from 'sinon'; import type { SentryTestContext } from '../helpers/setup-sentry'; import { setupSentryTest } from '../helpers/setup-sentry'; @@ -11,10 +11,10 @@ module('Unit | Utility | instrument-route-performance', function (hooks) { setupSentryTest(hooks); test('wrapped Route hooks maintain the current context', function (this: SentryTestContext, assert) { - const beforeModel = sinon.spy(); - const model = sinon.spy(); - const afterModel = sinon.spy(); - const setupController = sinon.spy(); + const beforeModel = spy(); + const model = spy(); + const afterModel = spy(); + const setupController = spy(); class DummyRoute extends Route { public beforeModel(...args: unknown[]): ReturnType {