-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(biome): enable noUnusedImports rule #9895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9ac07a4
f4b1169
51830a5
9249efe
b7f3093
deb31ac
f49ba0d
44de515
afd7045
bf65682
1442d60
03708d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import { get } from 'http'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a bug that was caught from this, I'd rather we merge this sooner rather than later. |
||
/* eslint-disable max-lines */ | ||
import { addBreadcrumb, convertIntegrationFnToClass, getClient } from '@sentry/core'; | ||
import type { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
// we need to import the SDK to ensure tsc check the types | ||
// biome-ignore lint/nursery/noUnusedImports: we need to import the SDK to ensure tsc check the types | ||
import * as _SentryBrowser from '@sentry/browser'; | ||
anonrig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryCore from '@sentry/core'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryHub from '@sentry/hub'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryIntegrations from '@sentry/integrations'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryNode from '@sentry/node'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryOpentelemetry from '@sentry/opentelemetry-node'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryReplay from '@sentry/replay'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryTracing from '@sentry/tracing'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryTypes from '@sentry/types'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryUtils from '@sentry/utils'; | ||
// biome-ignore lint/nursery/noUnusedImports: | ||
import * as _SentryWasm from '@sentry/wasm'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,10 @@ import * as Sentry from '@sentry/nextjs'; | |
import type { WebFetchHeaders } from '@sentry/types'; | ||
// @ts-expect-error Because we cannot be sure if the RequestAsyncStorage module exists (it is not part of the Next.js public | ||
// API) we use a shim if it doesn't exist. The logic for this is in the wrapping loader. | ||
// biome-ignore lint/nursery/noUnusedImports: Biome doesn't understand the shim with variable import path | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also open an issue to Biome for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done biomejs/biome#1269 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Turns out that it's a typescript bug, so i refactored this code a little. |
||
import { requestAsyncStorage } from '__SENTRY_NEXTJS_REQUEST_ASYNC_STORAGE_SHIM__'; | ||
// @ts-expect-error We use `__SENTRY_WRAPPING_TARGET_FILE__` as a placeholder for the path to the file being wrapped. | ||
// biome-ignore lint/nursery/noUnusedImports: Biome doesn't understand the shim with variable import path | ||
import * as serverComponentModule from '__SENTRY_WRAPPING_TARGET_FILE__'; | ||
|
||
import type { RequestAsyncStorage } from './requestAsyncStorageShim'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ import type { | |
Breadcrumb, | ||
BreadcrumbHint, | ||
CaptureContext, | ||
Client, | ||
Event, | ||
EventHint, | ||
EventProcessor, | ||
|
Uh oh!
There was an error while loading. Please reload this page.