Skip to content

Commit 722183b

Browse files
authored
ref(eslint): Remove unused eslint-disable directives (#10771)
Remove some unused directives to for less eslint warnings. Related to #10610
1 parent 1782d80 commit 722183b

File tree

36 files changed

+6
-49
lines changed

36 files changed

+6
-49
lines changed

dev-packages/e2e-tests/prepare.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-lines */
21
/* eslint-disable no-console */
32
import * as dotenv from 'dotenv';
43

dev-packages/e2e-tests/publish-packages.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-console */
21
import * as childProcess from 'child_process';
32
import * as path from 'path';
43
import * as glob from 'glob';

dev-packages/e2e-tests/run.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-lines */
21
/* eslint-disable no-console */
32
import { spawn } from 'child_process';
43
import { resolve } from 'path';

packages/browser/test/unit/index.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ describe('SentryBrowser', () => {
9191
getCurrentScope().setUser(EX_USER);
9292
setCurrentClient(client);
9393

94-
// eslint-disable-next-line deprecation/deprecation
9594
showReportDialog({ eventId: 'foobar' });
9695

9796
expect(getReportDialogEndpoint).toHaveBeenCalledTimes(1);
@@ -106,7 +105,6 @@ describe('SentryBrowser', () => {
106105
setCurrentClient(client);
107106

108107
const DIALOG_OPTION_USER = { email: '[email protected]' };
109-
// eslint-disable-next-line deprecation/deprecation
110108
showReportDialog({ eventId: 'foobar', user: DIALOG_OPTION_USER });
111109

112110
expect(getReportDialogEndpoint).toHaveBeenCalledTimes(1);
@@ -140,7 +138,7 @@ describe('SentryBrowser', () => {
140138

141139
it('should call `onClose` when receiving `__sentry_reportdialog_closed__` MessageEvent', async () => {
142140
const onClose = jest.fn();
143-
// eslint-disable-next-line deprecation/deprecation
141+
144142
showReportDialog({ eventId: 'foobar', onClose });
145143

146144
await waitForPostMessage('__sentry_reportdialog_closed__');
@@ -155,7 +153,7 @@ describe('SentryBrowser', () => {
155153
const onClose = jest.fn(() => {
156154
throw new Error();
157155
});
158-
// eslint-disable-next-line deprecation/deprecation
156+
159157
showReportDialog({ eventId: 'foobar', onClose });
160158

161159
await waitForPostMessage('__sentry_reportdialog_closed__');
@@ -168,7 +166,7 @@ describe('SentryBrowser', () => {
168166

169167
it('should not call `onClose` for other MessageEvents', async () => {
170168
const onClose = jest.fn();
171-
// eslint-disable-next-line deprecation/deprecation
169+
172170
showReportDialog({ eventId: 'foobar', onClose });
173171

174172
await waitForPostMessage('some_message');

packages/bun/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ export { bunServerIntegration } from './integrations/bunserver';
121121
const INTEGRATIONS = {
122122
// eslint-disable-next-line deprecation/deprecation
123123
...CoreIntegrations,
124-
// eslint-disable-next-line deprecation/deprecation
125124
...NodeIntegrations,
126125
BunServer,
127126
};

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/core/src/integrations/inboundfilters.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ function _getPossibleEventMessages(event: Event): string[] {
173173
let lastException;
174174
try {
175175
// @ts-expect-error Try catching to save bundle size
176-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
177176
lastException = event.exception.values[event.exception.values.length - 1];
178177
} catch (e) {
179178
// try catching to save bundle size checking existence of variables
@@ -198,7 +197,6 @@ function _getPossibleEventMessages(event: Event): string[] {
198197
function _isSentryError(event: Event): boolean {
199198
try {
200199
// @ts-expect-error can't be a sentry error if undefined
201-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
202200
return event.exception.values[0].type === 'SentryError';
203201
} catch (e) {
204202
// ignore

packages/core/src/tracing/hubextensions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ function _startTransaction(
4242
The transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,
4343
);
4444

45-
// eslint-disable-next-line deprecation/deprecation
4645
transactionContext.sampled = false;
4746
}
4847

packages/core/src/tracing/idletransaction.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-lines */
21
import type { Hub, SpanTimeInput, TransactionContext } from '@sentry/types';
32
import { logger, timestampInSeconds } from '@sentry/utils';
43

packages/core/src/tracing/sampling.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export function sampleTransaction<T extends Transaction>(
107107
*/
108108
function isValidSampleRate(rate: unknown): boolean {
109109
// we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck
110-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
111110
if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {
112111
DEBUG_BUILD &&
113112
logger.warn(

0 commit comments

Comments
 (0)