Skip to content

Commit 4415917

Browse files
committed
remove unused eslint-disable directives
1 parent 7d4f791 commit 4415917

File tree

9 files changed

+2
-87
lines changed

9 files changed

+2
-87
lines changed

packages/bun/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ export { bunServerIntegration } from './integrations/bunserver';
125125
const INTEGRATIONS = {
126126
// eslint-disable-next-line deprecation/deprecation
127127
...CoreIntegrations,
128-
// eslint-disable-next-line deprecation/deprecation
129128
...NodeIntegrations,
130129
BunServer,
131130
};

packages/core/src/baseclient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
150150
/**
151151
* @inheritDoc
152152
*/
153-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
153+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
154154
public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {
155155
// ensure we haven't captured this very object before
156156
if (checkOrSetAlreadyCaught(exception)) {
@@ -857,7 +857,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
857857
/**
858858
* @inheritDoc
859859
*/
860-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
860+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
861861
public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event>;
862862

863863
/**

packages/profiling-node/src/cpu_profiler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
3434
return require(`${binaryPath}.node`);
3535
}
3636

37-
/* eslint-disable no-fallthrough */
3837
// We need the fallthrough so that in the end, we can fallback to the require dynamice require.
3938
// This is for cases where precompiled binaries were not provided, but may have been compiled from source.
4039
if (platform === 'darwin') {

packages/profiling-node/src/hubextensions.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ export function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: S
149149
const transaction: Transaction = startTransaction.call(this, transactionContext, customSamplingContext);
150150

151151
// Client is required if we want to profile
152-
// eslint-disable-next-line deprecation/deprecation
153152
const client = this.getClient() as NodeClient | undefined;
154153
if (!client) {
155154
return transaction;
@@ -186,7 +185,6 @@ export function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: S
186185
}, maxProfileDurationMs);
187186

188187
// We need to reference the original finish call to avoid creating an infinite loop
189-
// eslint-disable-next-line deprecation/deprecation
190188
const originalFinish = transaction.finish.bind(transaction);
191189

192190
// Wrap the transaction finish method to stop profiling and set the profile on the transaction.
@@ -213,7 +211,6 @@ export function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: S
213211
return originalFinish();
214212
}
215213

216-
// eslint-disable-next-line deprecation/deprecation
217214
transaction.finish = profilingWrappedTransactionFinish;
218215
return transaction;
219216
};

packages/profiling-node/src/integration.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export class ProfilingIntegration implements Integration {
5656
*/
5757
public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
5858
this.getCurrentHub = getCurrentHub;
59-
// eslint-disable-next-line deprecation/deprecation
6059
const client = this.getCurrentHub().getClient() as NodeClient;
6160

6261
if (client && typeof client.on === 'function') {
@@ -137,7 +136,6 @@ export class ProfilingIntegration implements Integration {
137136

138137
// Remove the profile from the transaction context before sending, relay will take care of the rest.
139138
if (profileContext) {
140-
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
141139
delete profiledTransaction.contexts?.['profile'];
142140
}
143141

@@ -199,7 +197,6 @@ export class ProfilingIntegration implements Integration {
199197
// and forward it to the next event processor.
200198
const hub = this.getCurrentHub();
201199

202-
// eslint-disable-next-line deprecation/deprecation
203200
const client = hub.getClient();
204201

205202
if (!client) {

packages/profiling-node/src/utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import type { DebugImage } from './types';
2626

2727
// We require the file because if we import it, it will be included in the bundle.
2828
// I guess tsc does not check file contents when it's imported.
29-
// eslint-disable-next-line
3029
const THREAD_ID_STRING = String(threadId);
3130
const THREAD_NAME = isMainThread ? 'main' : 'worker';
3231
const FORMAT_VERSION = '1';
@@ -454,9 +453,7 @@ export function applyDebugMetadata(resource_paths: ReadonlyArray<string>): Debug
454453
return [];
455454
}
456455

457-
// eslint-disable-next-line deprecation/deprecation
458456
const hub = Sentry.getCurrentHub();
459-
// eslint-disable-next-line deprecation/deprecation
460457
const client = hub.getClient();
461458
const options = client && client.getOptions();
462459

packages/profiling-node/test/hubextensions.hub.test.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ function makeClientWithoutHooks(): [Sentry.NodeClient, Transport] {
2424
integrations: [integration],
2525
transport: _opts => transport,
2626
});
27-
// eslint-disable-next-line deprecation/deprecation
2827
client.setupIntegrations = () => {
2928
integration.setupOnce(
3029
cb => {
3130
// @ts-expect-error __SENTRY__ is a private property
3231
getMainCarrier().__SENTRY__.globalEventProcessors = [cb];
3332
},
34-
// eslint-disable-next-line deprecation/deprecation
3533
() => Sentry.getCurrentHub(),
3634
);
3735
};
@@ -59,14 +57,12 @@ function makeClientWithHooks(): [Sentry.NodeClient, Transport] {
5957
}),
6058
});
6159

62-
// eslint-disable-next-line deprecation/deprecation
6360
client.setupIntegrations = () => {
6461
integration.setupOnce(
6562
cb => {
6663
// @ts-expect-error __SENTRY__ is a private property
6764
getMainCarrier().__SENTRY__.globalEventProcessors = [cb];
6865
},
69-
// eslint-disable-next-line deprecation/deprecation
7066
() => Sentry.getCurrentHub(),
7167
);
7268
};
@@ -91,17 +87,14 @@ describe('hubextensions', () => {
9187

9288
it('pulls environment from sdk init', async () => {
9389
const [client, transport] = makeClientWithoutHooks();
94-
// eslint-disable-next-line deprecation/deprecation
9590
const hub = Sentry.getCurrentHub();
96-
// eslint-disable-next-line deprecation/deprecation
9791
hub.bindClient(client);
9892

9993
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
10094

10195
// eslint-disable-next-line deprecation/deprecation
10296
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub' });
10397
await wait(500);
104-
// eslint-disable-next-line deprecation/deprecation
10598
transaction.finish();
10699

107100
await Sentry.flush(1000);
@@ -112,9 +105,7 @@ describe('hubextensions', () => {
112105
const logSpy = jest.spyOn(logger, 'log');
113106

114107
const [client, transport] = makeClientWithoutHooks();
115-
// eslint-disable-next-line deprecation/deprecation
116108
const hub = Sentry.getCurrentHub();
117-
// eslint-disable-next-line deprecation/deprecation
118109
hub.bindClient(client);
119110

120111
jest.spyOn(CpuProfilerBindings, 'stopProfiling').mockImplementation(() => {
@@ -138,7 +129,6 @@ describe('hubextensions', () => {
138129

139130
// eslint-disable-next-line deprecation/deprecation
140131
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub' });
141-
// eslint-disable-next-line deprecation/deprecation
142132
transaction.finish();
143133

144134
await Sentry.flush(1000);
@@ -156,9 +146,7 @@ describe('hubextensions', () => {
156146
const logSpy = jest.spyOn(logger, 'log');
157147

158148
const [client, transport] = makeClientWithoutHooks();
159-
// eslint-disable-next-line deprecation/deprecation
160149
const hub = Sentry.getCurrentHub();
161-
// eslint-disable-next-line deprecation/deprecation
162150
hub.bindClient(client);
163151

164152
jest.spyOn(CpuProfilerBindings, 'stopProfiling').mockImplementation(() => {
@@ -188,7 +176,6 @@ describe('hubextensions', () => {
188176
// eslint-disable-next-line deprecation/deprecation
189177
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub', traceId: 'boop' });
190178
await wait(500);
191-
// eslint-disable-next-line deprecation/deprecation
192179
transaction.finish();
193180

194181
await Sentry.flush(1000);
@@ -198,9 +185,7 @@ describe('hubextensions', () => {
198185
describe('with hooks', () => {
199186
it('calls profiler when transaction is started/stopped', async () => {
200187
const [client, transport] = makeClientWithHooks();
201-
// eslint-disable-next-line deprecation/deprecation
202188
const hub = Sentry.getCurrentHub();
203-
// eslint-disable-next-line deprecation/deprecation
204189
hub.bindClient(client);
205190

206191
const startProfilingSpy = jest.spyOn(CpuProfilerBindings, 'startProfiling');
@@ -211,7 +196,6 @@ describe('hubextensions', () => {
211196
// eslint-disable-next-line deprecation/deprecation
212197
const transaction = hub.startTransaction({ name: 'profile_hub' });
213198
await wait(500);
214-
// eslint-disable-next-line deprecation/deprecation
215199
transaction.finish();
216200

217201
await Sentry.flush(1000);
@@ -222,17 +206,14 @@ describe('hubextensions', () => {
222206

223207
it('sends profile in the same envelope as transaction', async () => {
224208
const [client, transport] = makeClientWithHooks();
225-
// eslint-disable-next-line deprecation/deprecation
226209
const hub = Sentry.getCurrentHub();
227-
// eslint-disable-next-line deprecation/deprecation
228210
hub.bindClient(client);
229211

230212
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
231213

232214
// eslint-disable-next-line deprecation/deprecation
233215
const transaction = hub.startTransaction({ name: 'profile_hub' });
234216
await wait(500);
235-
// eslint-disable-next-line deprecation/deprecation
236217
transaction.finish();
237218

238219
await Sentry.flush(1000);
@@ -244,9 +225,7 @@ describe('hubextensions', () => {
244225

245226
it('does not crash if transaction has no profile context or it is invalid', async () => {
246227
const [client] = makeClientWithHooks();
247-
// eslint-disable-next-line deprecation/deprecation
248228
const hub = Sentry.getCurrentHub();
249-
// eslint-disable-next-line deprecation/deprecation
250229
hub.bindClient(client);
251230

252231
// @ts-expect-error transaction is partial
@@ -270,9 +249,7 @@ describe('hubextensions', () => {
270249

271250
it('if transaction was profiled, but profiler returned null', async () => {
272251
const [client, transport] = makeClientWithHooks();
273-
// eslint-disable-next-line deprecation/deprecation
274252
const hub = Sentry.getCurrentHub();
275-
// eslint-disable-next-line deprecation/deprecation
276253
hub.bindClient(client);
277254

278255
jest.spyOn(CpuProfilerBindings, 'stopProfiling').mockReturnValue(null);
@@ -285,7 +262,6 @@ describe('hubextensions', () => {
285262
// eslint-disable-next-line deprecation/deprecation
286263
const transaction = hub.startTransaction({ name: 'profile_hub' });
287264
await wait(500);
288-
// eslint-disable-next-line deprecation/deprecation
289265
transaction.finish();
290266

291267
await Sentry.flush(1000);
@@ -297,9 +273,7 @@ describe('hubextensions', () => {
297273

298274
it('emits preprocessEvent for profile', async () => {
299275
const [client] = makeClientWithHooks();
300-
// eslint-disable-next-line deprecation/deprecation
301276
const hub = Sentry.getCurrentHub();
302-
// eslint-disable-next-line deprecation/deprecation
303277
hub.bindClient(client);
304278
const onPreprocessEvent = jest.fn();
305279

@@ -308,7 +282,6 @@ describe('hubextensions', () => {
308282
// eslint-disable-next-line deprecation/deprecation
309283
const transaction = hub.startTransaction({ name: 'profile_hub' });
310284
await wait(500);
311-
// eslint-disable-next-line deprecation/deprecation
312285
transaction.finish();
313286

314287
await Sentry.flush(1000);
@@ -325,9 +298,7 @@ describe('hubextensions', () => {
325298
describe('without hooks', () => {
326299
it('calls profiler when transaction is started/stopped', async () => {
327300
const [client] = makeClientWithoutHooks();
328-
// eslint-disable-next-line deprecation/deprecation
329301
const hub = Sentry.getCurrentHub();
330-
// eslint-disable-next-line deprecation/deprecation
331302
hub.bindClient(client);
332303

333304
const startProfilingSpy = jest.spyOn(CpuProfilerBindings, 'startProfiling');
@@ -336,7 +307,6 @@ describe('hubextensions', () => {
336307
// eslint-disable-next-line deprecation/deprecation
337308
const transaction = hub.startTransaction({ name: 'profile_hub' });
338309
await wait(500);
339-
// eslint-disable-next-line deprecation/deprecation
340310
transaction.finish();
341311

342312
await Sentry.flush(1000);
@@ -347,9 +317,7 @@ describe('hubextensions', () => {
347317

348318
it('sends profile in separate envelope', async () => {
349319
const [client, transport] = makeClientWithoutHooks();
350-
// eslint-disable-next-line deprecation/deprecation
351320
const hub = Sentry.getCurrentHub();
352-
// eslint-disable-next-line deprecation/deprecation
353321
hub.bindClient(client);
354322

355323
const transportSpy = jest.spyOn(transport, 'send').mockImplementation(() => {
@@ -360,7 +328,6 @@ describe('hubextensions', () => {
360328
// eslint-disable-next-line deprecation/deprecation
361329
const transaction = hub.startTransaction({ name: 'profile_hub' });
362330
await wait(500);
363-
// eslint-disable-next-line deprecation/deprecation
364331
transaction.finish();
365332

366333
await Sentry.flush(1000);
@@ -379,9 +346,7 @@ describe('hubextensions', () => {
379346
const stopProfilingSpy = jest.spyOn(CpuProfilerBindings, 'stopProfiling');
380347

381348
const [client] = makeClientWithoutHooks();
382-
// eslint-disable-next-line deprecation/deprecation
383349
const hub = Sentry.getCurrentHub();
384-
// eslint-disable-next-line deprecation/deprecation
385350
hub.bindClient(client);
386351

387352
// eslint-disable-next-line deprecation/deprecation
@@ -392,7 +357,6 @@ describe('hubextensions', () => {
392357
expect(stopProfilingSpy).toHaveBeenCalledTimes(1);
393358
expect((stopProfilingSpy.mock.calls[startProfilingSpy.mock.calls.length - 1]?.[0] as string).length).toBe(32);
394359

395-
// eslint-disable-next-line deprecation/deprecation
396360
transaction.finish();
397361
expect(stopProfilingSpy).toHaveBeenCalledTimes(1);
398362
});
@@ -402,16 +366,12 @@ describe('hubextensions', () => {
402366
const stopProfilingSpy = jest.spyOn(CpuProfilerBindings, 'stopProfiling');
403367

404368
const [client] = makeClientWithoutHooks();
405-
// eslint-disable-next-line deprecation/deprecation
406369
const hub = Sentry.getCurrentHub();
407-
// eslint-disable-next-line deprecation/deprecation
408370
hub.bindClient(client);
409371

410372
// eslint-disable-next-line deprecation/deprecation
411373
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'txn' });
412-
// eslint-disable-next-line deprecation/deprecation
413374
transaction.finish();
414-
// eslint-disable-next-line deprecation/deprecation
415375
transaction.finish();
416376
expect(stopProfilingSpy).toHaveBeenCalledTimes(1);
417377
});
@@ -446,17 +406,14 @@ describe('hubextensions', () => {
446406
});
447407

448408
const [client, transport] = makeClientWithHooks();
449-
// eslint-disable-next-line deprecation/deprecation
450409
const hub = Sentry.getCurrentHub();
451-
// eslint-disable-next-line deprecation/deprecation
452410
hub.bindClient(client);
453411

454412
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
455413

456414
// eslint-disable-next-line deprecation/deprecation
457415
const transaction = hub.startTransaction({ name: 'profile_hub' });
458416
await wait(500);
459-
// eslint-disable-next-line deprecation/deprecation
460417
transaction.finish();
461418

462419
await Sentry.flush(1000);

0 commit comments

Comments
 (0)