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.

0 commit comments

Comments
 (0)