Skip to content

Commit 5d16aae

Browse files
authored
chore(biome): enable noUnusedImports rule (#9895)
Adds https://biomejs.dev/linter/rules/no-unused-imports/
1 parent f819d81 commit 5d16aae

File tree

50 files changed

+73
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+73
-67
lines changed

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"suspicious": {
2121
"all": false,
2222
"noControlCharactersInRegex": "error"
23+
},
24+
"nursery": {
25+
"noUnusedImports": "error"
2326
}
2427
},
2528
"ignore": [".vscode/*", "**/*.json"]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"codecov": "codecov",
2121
"fix": "run-s fix:lerna fix:biome",
2222
"fix:lerna": "lerna run fix",
23-
"fix:biome": "biome check --apply-unsafe .",
23+
"fix:biome": "biome check --apply .",
2424
"changelog": "ts-node ./scripts/get-commit-list.ts",
2525
"link:yarn": "lerna exec yarn link",
2626
"lint": "run-s lint:lerna lint:biome",

packages/angular/test/tracing.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component } from '@angular/core';
22
import type { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router';
3-
import type { Hub } from '@sentry/types';
43

54
import { TraceClassDecorator, TraceDirective, TraceMethodDecorator, instrumentAngularRouting } from '../src';
65
import { getParameterizedRouteFromSnapshot } from '../src/tracing';

packages/astro/test/server/middleware.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as SentryNode from '@sentry/node';
22
import type { Client } from '@sentry/types';
3-
import { SpyInstance, vi } from 'vitest';
3+
import { vi } from 'vitest';
44

55
import { handleRequest, interpolateRouteFromUrlAndParams } from '../../src/server/middleware';
66

packages/browser-integration-tests/suites/public-api/startTransaction/init.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
/* eslint-disable no-unused-vars */
12
import * as Sentry from '@sentry/browser';
2-
// eslint-disable-next-line no-unused-vars
3+
// biome-ignore lint/nursery/noUnusedImports: Need to import tracing for side effect
34
import * as _ from '@sentry/tracing';
45

56
window.Sentry = Sentry;

packages/browser/src/integrations/breadcrumbs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { get } from 'http';
21
/* eslint-disable max-lines */
32
import { addBreadcrumb, convertIntegrationFnToClass, getClient } from '@sentry/core';
43
import type {

packages/browser/src/integrations/trycatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { convertIntegrationFnToClass } from '@sentry/core';
2-
import type { Client, IntegrationFn, WrappedFunction } from '@sentry/types';
2+
import type { IntegrationFn, WrappedFunction } from '@sentry/types';
33
import { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';
44

55
import { WINDOW, wrap } from '../helpers';

packages/core/src/integration.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
import type {
2-
Client,
3-
Event,
4-
EventHint,
5-
EventProcessor,
6-
Hub,
7-
Integration,
8-
IntegrationClass,
9-
IntegrationFn,
10-
Options,
11-
} from '@sentry/types';
1+
import type { Client, Event, EventHint, EventProcessor, Hub, Integration, IntegrationFn, Options } from '@sentry/types';
122
import { arrayify, logger } from '@sentry/utils';
133

144
import { DEBUG_BUILD } from './debug-build';

packages/core/src/integrations/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Event, EventItem, IntegrationFn } from '@sentry/types';
1+
import type { EventItem, IntegrationFn } from '@sentry/types';
22
import { forEachEnvelopeItem } from '@sentry/utils';
33
import { convertIntegrationFnToClass } from '../integration';
44

packages/core/src/metrics/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { MeasurementUnit, MetricBucketItem } from '@sentry/types';
22
import { dropUndefinedKeys } from '@sentry/utils';
3-
import type { MetricType, SimpleMetricBucket } from './types';
3+
import type { MetricType } from './types';
44

55
/**
66
* Generate bucket key from metric properties.

packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { PassThrough } from 'node:stream';
88

9-
import type { AppLoadContext, DataFunctionArgs, EntryContext } from '@remix-run/node';
9+
import type { AppLoadContext, EntryContext } from '@remix-run/node';
1010
import { createReadableStreamFromReadable } from '@remix-run/node';
1111
import { installGlobals } from '@remix-run/node';
1212
import { RemixServer } from '@remix-run/react';

packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { PassThrough } from 'node:stream';
88

9-
import type { AppLoadContext, DataFunctionArgs, EntryContext } from '@remix-run/node';
9+
import type { AppLoadContext, EntryContext } from '@remix-run/node';
1010
import { Response } from '@remix-run/node';
1111
import { RemixServer } from '@remix-run/react';
1212
import * as Sentry from '@sentry/remix';
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
/* eslint-disable @typescript-eslint/no-unused-vars */
2-
// we need to import the SDK to ensure tsc check the types
1+
// biome-ignore lint/nursery/noUnusedImports: we need to import the SDK to ensure tsc check the types
32
import * as _SentryBrowser from '@sentry/browser';
3+
// biome-ignore lint/nursery/noUnusedImports:
44
import * as _SentryCore from '@sentry/core';
5+
// biome-ignore lint/nursery/noUnusedImports:
56
import * as _SentryHub from '@sentry/hub';
7+
// biome-ignore lint/nursery/noUnusedImports:
68
import * as _SentryIntegrations from '@sentry/integrations';
9+
// biome-ignore lint/nursery/noUnusedImports:
710
import * as _SentryNode from '@sentry/node';
11+
// biome-ignore lint/nursery/noUnusedImports:
812
import * as _SentryOpentelemetry from '@sentry/opentelemetry-node';
13+
// biome-ignore lint/nursery/noUnusedImports:
914
import * as _SentryReplay from '@sentry/replay';
15+
// biome-ignore lint/nursery/noUnusedImports:
1016
import * as _SentryTracing from '@sentry/tracing';
17+
// biome-ignore lint/nursery/noUnusedImports:
1118
import * as _SentryTypes from '@sentry/types';
19+
// biome-ignore lint/nursery/noUnusedImports:
1220
import * as _SentryUtils from '@sentry/utils';
21+
// biome-ignore lint/nursery/noUnusedImports:
1322
import * as _SentryWasm from '@sentry/wasm';

packages/e2e-tests/test-applications/nextjs-app-dir/tests/async-context-edge.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import { waitForError, waitForTransaction } from '../event-proxy-server';
2+
import { waitForTransaction } from '../event-proxy-server';
33

44
test('Should allow for async context isolation in the edge SDK', async ({ request }) => {
55
// test.skip(process.env.TEST_ENV === 'development', "Doesn't work in dev mode.");

packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@playwright/test';
2-
import axios, { AxiosError, AxiosResponse } from 'axios';
2+
import axios, { AxiosError } from 'axios';
33
import { waitForError, waitForTransaction } from '../event-proxy-server';
44

55
const authToken = process.env.E2E_TEST_AUTH_TOKEN;

packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as Sentry from '@sentry/react';
2+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
23
import * as React from 'react';
34
import { Link } from 'react-router-dom';
45

packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
12
import * as React from 'react';
23

34
const User = () => {

packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as Sentry from '@sentry/react';
2+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
23
import * as React from 'react';
34
import { Link } from 'react-router-dom';
45

packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
12
import * as React from 'react';
23

34
const User = () => {

packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/Index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as Sentry from '@sentry/react';
2+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
23
import * as React from 'react';
34
import { Link } from 'react-router-dom';
45

packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/User.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
12
import * as React from 'react';
23

34
const User = () => {

packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as Sentry from '@sentry/react';
2+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
23
import * as React from 'react';
34
import { Link } from 'react-router-dom';
45

packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
12
import * as React from 'react';
23

34
const User = () => {

packages/gatsby/test/integration.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TextDecoder, TextEncoder } from 'util';
22
/* eslint-disable @typescript-eslint/no-explicit-any */
33
import { render } from '@testing-library/react';
44
import { useEffect } from 'react';
5-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
66
import * as React from 'react';
77

88
import { onClientEntry } from '../gatsby-browser';

packages/nextjs/src/common/_error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { captureException, getClient, withScope } from '@sentry/core';
1+
import { captureException, withScope } from '@sentry/core';
22
import type { NextPageContext } from 'next';
33
import { flushQueue } from './utils/responseEnd';
44

packages/nextjs/src/config/templates/routeHandlerWrapperTemplate.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@ import * as routeModule from '__SENTRY_WRAPPING_TARGET_FILE__';
88

99
import type { RequestAsyncStorage } from './requestAsyncStorageShim';
1010

11-
declare const requestAsyncStorage: RequestAsyncStorage;
12-
13-
declare const routeModule: {
14-
GET?: (...args: unknown[]) => unknown;
15-
POST?: (...args: unknown[]) => unknown;
16-
PUT?: (...args: unknown[]) => unknown;
17-
PATCH?: (...args: unknown[]) => unknown;
18-
DELETE?: (...args: unknown[]) => unknown;
19-
HEAD?: (...args: unknown[]) => unknown;
20-
OPTIONS?: (...args: unknown[]) => unknown;
21-
};
22-
2311
function wrapHandler<T>(handler: T, method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS'): T {
2412
// Running the instrumentation code during the build phase will mark any function as "dynamic" because we're accessing
2513
// the Request object. We do not want to turn handlers dynamic so we skip instrumentation in the build phase.
@@ -39,7 +27,8 @@ function wrapHandler<T>(handler: T, method: 'GET' | 'POST' | 'PUT' | 'PATCH' | '
3927

4028
// We try-catch here just in case the API around `requestAsyncStorage` changes unexpectedly since it is not public API
4129
try {
42-
const requestAsyncStore = requestAsyncStorage.getStore();
30+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
31+
const requestAsyncStore = requestAsyncStorage.getStore() as ReturnType<RequestAsyncStorage['getStore']>;
4332
sentryTraceHeader = requestAsyncStore?.headers.get('sentry-trace') ?? undefined;
4433
baggageHeader = requestAsyncStore?.headers.get('baggage') ?? undefined;
4534
headers = requestAsyncStore?.headers;
@@ -65,10 +54,21 @@ export * from '__SENTRY_WRAPPING_TARGET_FILE__';
6554
// @ts-expect-error This is the file we're wrapping
6655
export { default } from '__SENTRY_WRAPPING_TARGET_FILE__';
6756

68-
export const GET = wrapHandler(routeModule.GET, 'GET');
69-
export const POST = wrapHandler(routeModule.POST, 'POST');
70-
export const PUT = wrapHandler(routeModule.PUT, 'PUT');
71-
export const PATCH = wrapHandler(routeModule.PATCH, 'PATCH');
72-
export const DELETE = wrapHandler(routeModule.DELETE, 'DELETE');
73-
export const HEAD = wrapHandler(routeModule.HEAD, 'HEAD');
74-
export const OPTIONS = wrapHandler(routeModule.OPTIONS, 'OPTIONS');
57+
declare const requestAsyncStorage: RequestAsyncStorage;
58+
59+
type RouteHandler = (...args: unknown[]) => unknown;
60+
61+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
62+
export const GET = wrapHandler(routeModule.GET as RouteHandler, 'GET');
63+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
64+
export const POST = wrapHandler(routeModule.POST as RouteHandler, 'POST');
65+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
66+
export const PUT = wrapHandler(routeModule.PUT as RouteHandler, 'PUT');
67+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
68+
export const PATCH = wrapHandler(routeModule.PATCH as RouteHandler, 'PATCH');
69+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
70+
export const DELETE = wrapHandler(routeModule.DELETE as RouteHandler, 'DELETE');
71+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
72+
export const HEAD = wrapHandler(routeModule.HEAD as RouteHandler, 'HEAD');
73+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
74+
export const OPTIONS = wrapHandler(routeModule.OPTIONS as RouteHandler, 'OPTIONS');

packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import * as Sentry from '@sentry/nextjs';
22
import type { WebFetchHeaders } from '@sentry/types';
33
// @ts-expect-error Because we cannot be sure if the RequestAsyncStorage module exists (it is not part of the Next.js public
44
// API) we use a shim if it doesn't exist. The logic for this is in the wrapping loader.
5+
// biome-ignore lint/nursery/noUnusedImports: Biome doesn't understand the shim with variable import path
56
import { requestAsyncStorage } from '__SENTRY_NEXTJS_REQUEST_ASYNC_STORAGE_SHIM__';
67
// @ts-expect-error We use `__SENTRY_WRAPPING_TARGET_FILE__` as a placeholder for the path to the file being wrapped.
8+
// biome-ignore lint/nursery/noUnusedImports: Biome doesn't understand the shim with variable import path
79
import * as serverComponentModule from '__SENTRY_WRAPPING_TARGET_FILE__';
810

911
import type { RequestAsyncStorage } from './requestAsyncStorageShim';

packages/nextjs/src/edge/wrapApiHandlerWithSentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getCurrentHub, getCurrentScope } from '@sentry/core';
1+
import { getCurrentScope } from '@sentry/core';
22

33
import { withEdgeWrapping } from '../common/utils/edgeWrapperUtils';
44
import type { EdgeRouteHandler } from './types';

packages/nextjs/test/integration/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Head from 'next/head';
22
import Link from 'next/link';
3-
import React, { ReactNode } from 'react';
3+
import { ReactNode } from 'react';
44

55
type Props = {
66
children?: ReactNode;

packages/nextjs/test/integration/components/List.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
12
import * as React from 'react';
23
import { User } from '../interfaces';
34
import ListItem from './ListItem';

packages/nextjs/test/integration/components/ListDetail.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
12
import * as React from 'react';
23

34
import { User } from '../interfaces';

packages/nextjs/test/integration/components/ListItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Link from 'next/link';
2+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
23
import React from 'react';
34

45
import { User } from '../interfaces';

packages/node-experimental/src/integrations/http.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ import { SpanKind } from '@opentelemetry/api';
44
import { registerInstrumentations } from '@opentelemetry/instrumentation';
55
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
66
import { addBreadcrumb, hasTracingEnabled, isSentryRequestUrl } from '@sentry/core';
7-
import { _INTERNAL, getClient, getCurrentHub, getSpanKind, setSpanMetadata } from '@sentry/opentelemetry';
7+
import { _INTERNAL, getClient, getSpanKind, setSpanMetadata } from '@sentry/opentelemetry';
88
import type { EventProcessor, Hub, Integration } from '@sentry/types';
99
import { stringMatchesSomePattern } from '@sentry/utils';
1010

1111
import { getIsolationScope, setIsolationScope } from '../sdk/api';
12-
import { Scope } from '../sdk/scope';
1312
import type { NodeExperimentalClient } from '../types';
1413
import { addOriginToSpan } from '../utils/addOriginToSpan';
1514
import { getRequestUrl } from '../utils/getRequestUrl';

packages/node-experimental/src/otel/contextManager.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { setHubOnContext } from '@sentry/opentelemetry';
44
import { getCurrentHub } from '../sdk/hub';
55

66
import { getCurrentScope, getIsolationScope } from './../sdk/api';
7-
import { Scope } from './../sdk/scope';
87
import type { CurrentScopes } from './../sdk/types';
98
import { getScopesFromContext, setScopesOnContext } from './../utils/contextData';
109

packages/node-experimental/src/sdk/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type {
66
Breadcrumb,
77
BreadcrumbHint,
88
CaptureContext,
9-
Client,
109
Event,
1110
EventHint,
1211
EventProcessor,

packages/node-experimental/src/sdk/scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getGlobalScope as _getGlobalScope, mergeScopeData, setGlobalScope } from '@sentry/core';
1+
import { getGlobalScope as _getGlobalScope, setGlobalScope } from '@sentry/core';
22
import { OpenTelemetryScope } from '@sentry/opentelemetry';
33
import type { Breadcrumb, Client, Event, EventHint, Severity, SeverityLevel } from '@sentry/types';
44
import { uuid4 } from '@sentry/utils';

packages/node-experimental/test/integration/transactions.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { logger } from '@sentry/utils';
88
import * as Sentry from '../../src';
99
import { startSpan } from '../../src';
1010
import type { Http, NodeFetch } from '../../src/integrations';
11-
import { getIsolationScope } from '../../src/sdk/api';
1211
import type { NodeExperimentalClient } from '../../src/types';
1312
import { cleanupOtel, getProvider, mockSdkInit } from '../helpers/mockSdkInit';
1413

packages/node-experimental/test/sdk/scope.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { prepareEvent } from '@sentry/core';
22
import type { Attachment, Breadcrumb, Client, ClientOptions, EventProcessor } from '@sentry/types';
33
import { Scope, getIsolationScope } from '../../src';
44
import { getGlobalScope } from '../../src/sdk/scope';
5-
import { mockSdkInit, resetGlobals } from '../helpers/mockSdkInit';
5+
import { mockSdkInit } from '../helpers/mockSdkInit';
66

77
describe('Unit | Scope', () => {
88
it('allows to create & update a scope', () => {

packages/node/test/integrations/localvariables.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { ClientOptions, EventProcessor } from '@sentry/types';
21
import type { LRUMap } from '@sentry/utils';
32
import type { Debugger, InspectorNotification } from 'inspector';
43

packages/opentelemetry/src/spanExporter.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { Span } from '@opentelemetry/api';
21
import { SpanKind } from '@opentelemetry/api';
32
import type { ExportResult } from '@opentelemetry/core';
43
import { ExportResultCode } from '@opentelemetry/core';
@@ -9,7 +8,6 @@ import type { DynamicSamplingContext, Span as SentrySpan, SpanOrigin, Transactio
98
import { logger } from '@sentry/utils';
109

1110
import { getCurrentHub } from './custom/hub';
12-
import { OpenTelemetryScope } from './custom/scope';
1311
import type { OpenTelemetryTransaction } from './custom/transaction';
1412
import { startTransaction } from './custom/transaction';
1513
import { DEBUG_BUILD } from './debug-build';

packages/react/test/profiler.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { SpanContext } from '@sentry/types';
22
import { render } from '@testing-library/react';
33
import { renderHook } from '@testing-library/react-hooks';
4+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
45
import * as React from 'react';
56

67
import { REACT_MOUNT_OP, REACT_RENDER_OP, REACT_UPDATE_OP } from '../src/constants';

packages/react/test/reactrouterv4.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { act, render } from '@testing-library/react';
22
import { createMemoryHistory } from 'history-4';
3+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
34
import * as React from 'react';
45
import { Route, Router, Switch, matchPath } from 'react-router-4';
56

packages/react/test/reactrouterv5.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { act, render } from '@testing-library/react';
22
import { createMemoryHistory } from 'history-4';
3+
// biome-ignore lint/nursery/noUnusedImports: Need React import for JSX
34
import * as React from 'react';
45
import { Route, Router, Switch, matchPath } from 'react-router-5';
56

packages/react/test/redux.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as Sentry from '@sentry/browser';
2-
import type { Scope } from '@sentry/types';
32
import * as Redux from 'redux';
43

54
import { createReduxEnhancer } from '../src/redux';

0 commit comments

Comments
 (0)