Skip to content

Commit 08659ea

Browse files
committed
fix linting
1 parent da8699d commit 08659ea

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

dev-packages/node-integration-tests/suites/public-api/onUnhandledRejectionIntegration/scenario-with-span-ended.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@ Sentry.init({
88
transport: loggingTransport,
99
});
1010

11+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
1112
recordSpan(async () => {
13+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
1214
doSomething();
15+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
1316
doSomethingWithError();
1417
});
1518

16-
async function doSomething() {
19+
async function doSomething(): Promise<void> {
1720
return Promise.resolve();
1821
}
1922

20-
async function doSomethingWithError() {
23+
async function doSomethingWithError(): Promise<void> {
2124
await new Promise(resolve => setTimeout(resolve, 100));
2225
throw new Error('test error');
2326
}
2427

25-
function recordSpan(fn: (span: unknown) => Promise<void>) {
28+
// Duplicating some code from vercel-ai to verify how things work in more complex/weird scenarios
29+
function recordSpan(fn: (span: unknown) => Promise<void>): Promise<void> {
2630
return Sentry.startSpanManual({ name: 'test-span' }, async span => {
2731
try {
2832
const result = await fn(span);

dev-packages/node-integration-tests/suites/public-api/onUnhandledRejectionIntegration/scenario-with-span.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Sentry.init({
88
transport: loggingTransport,
99
});
1010

11+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
1112
Sentry.startSpan({ name: 'test-span' }, async () => {
1213
throw new Error('test error');
1314
});

dev-packages/node-integration-tests/suites/public-api/onUnhandledRejectionIntegration/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import type { Event } from '@sentry/node';
12
import * as childProcess from 'child_process';
23
import * as path from 'path';
34
import { afterAll, describe, expect, test } from 'vitest';
45
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
5-
import type { Event } from '@sentry/node';
66

77
describe('onUnhandledRejectionIntegration', () => {
88
afterAll(() => {

0 commit comments

Comments
 (0)