Skip to content

Commit eb89158

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

File tree

67 files changed

+614
-204
lines changed

Some content is hidden

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

67 files changed

+614
-204
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
"clean:deps": "lerna clean --yes && rm -rf node_modules && yarn",
1919
"clean:all": "run-s clean:build clean:caches clean:deps",
2020
"codecov": "codecov",
21-
"fix": "run-s fix:lerna fix:biome",
21+
"fix": "run-p 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",
26-
"lint": "run-s lint:lerna lint:biome",
26+
"lint": "run-p lint:lerna lint:biome",
2727
"lint:lerna": "lerna run lint",
2828
"lint:biome": "biome check .",
2929
"validate:es5": "lerna run validate:es5",

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/bun/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export {
7070
startInactiveSpan,
7171
startSpanManual,
7272
continueTrace,
73+
metrics,
7374
} from '@sentry/core';
7475
export type { SpanStatusType } from '@sentry/core';
7576
export { autoDiscoverNodePerformanceMonitoringIntegrations } from '@sentry/node';

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

0 commit comments

Comments
 (0)