Skip to content

Commit b9ffb16

Browse files
committed
chore: fix lint issues
1 parent 8032970 commit b9ffb16

11 files changed

Lines changed: 22 additions & 7 deletions

File tree

apps/playground/src/__tests__/hooks.harness.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe('Hooks', () => {
1919
let suiteSetupComplete = false;
2020
let testCounter = 0;
2121
let beforeEachCounter = 0;
22-
let afterEachCounter = 0;
2322

2423
beforeAll(() => {
2524
// This should run once before all tests in this suite
@@ -42,7 +41,6 @@ describe('Hooks', () => {
4241

4342
afterEach(() => {
4443
// This should run after each individual test
45-
afterEachCounter++;
4644
executionLog.push(`afterEach: Test ${testCounter} cleanup`);
4745
});
4846

@@ -114,6 +112,7 @@ describe('Hooks', () => {
114112
});
115113

116114
describe('State management', () => {
115+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
117116
let localState: Record<string, any> = {};
118117

119118
beforeEach(() => {
@@ -156,6 +155,7 @@ describe('Hooks', () => {
156155

157156
describe('Async operations', () => {
158157
let asyncSetupComplete = false;
158+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
159159
let asyncData: any = null;
160160

161161
beforeAll(async () => {

apps/playground/src/__tests__/mocking/modules.harness.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ describe('Module mocking', () => {
6363
const mockedPlatform = {
6464
OS: 'mockOS',
6565
Version: 999,
66+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6667
select: fn().mockImplementation((options: Record<string, any>) => {
6768
return options.mockOS || options.default;
6869
}),

apps/playground/src/__tests__/ui/screenshot.harness.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, test, render, expect } from 'react-native-harness';
2-
import { View, Text } from 'react-native';
2+
import { View } from 'react-native';
33
import { screen } from '@react-native-harness/ui';
44

55
describe('Screenshot', () => {

packages/cli/src/wizard/bundleId.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const getBundleIds = async (
5959
try {
6060
new URL(value);
6161
return;
62-
} catch (e) {
62+
} catch (_e) {
6363
return 'Please enter a valid URL';
6464
}
6565
},

packages/platform-android/src/__tests__/app-monitor.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const createMockSubprocess = (): tools.Subprocess =>
1111
nodeChildProcess: Promise.resolve({
1212
kill: vi.fn(),
1313
}),
14+
// eslint-disable-next-line @typescript-eslint/no-empty-function
1415
[Symbol.asyncIterator]: async function* () {},
1516
}) as unknown as tools.Subprocess;
1617

@@ -216,6 +217,7 @@ describe('createAndroidLogEvent', () => {
216217
await monitor.stop();
217218

218219
expect(details?.artifactPath).toContain('/.harness/crash-reports/');
220+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
219221
expect(fs.readFileSync(details!.artifactPath!, 'utf8')).toContain(
220222
'RuntimeException: boom'
221223
);

packages/platform-ios/src/__tests__/app-monitor.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ describe('createIosSimulatorAppMonitor', () => {
273273
summary: 'simulator crash report',
274274
});
275275
expect(details?.artifactPath).toContain('/.harness/crash-reports/');
276+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
276277
expect(fs.existsSync(details!.artifactPath!)).toBe(true);
277278
});
278279

@@ -383,6 +384,7 @@ describe('createIosSimulatorAppMonitor', () => {
383384
const kill = vi.fn();
384385
vi.spyOn(tools, 'spawn').mockReturnValue({
385386
nodeChildProcess: Promise.resolve({ kill }),
387+
// eslint-disable-next-line @typescript-eslint/no-empty-function
386388
[Symbol.asyncIterator]: async function* () {},
387389
} as unknown as Subprocess);
388390
vi.spyOn(simctl, 'getAppInfo').mockResolvedValue(null);
@@ -550,6 +552,7 @@ describe('createIosDeviceAppMonitor', () => {
550552
summary: 'full crash report',
551553
});
552554
expect(details?.artifactPath).toContain('/.harness/crash-reports/');
555+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
553556
expect(fs.existsSync(details!.artifactPath!)).toBe(true);
554557
});
555558
});

packages/platform-ios/src/__tests__/libimobiledevice.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ describe('collectCrashReports', () => {
236236
});
237237

238238
expect(reports[0]?.artifactPath).toContain('/.harness/crash-reports/');
239+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
239240
expect(fs.existsSync(reports[0]!.artifactPath)).toBe(true);
240241
expect(fs.existsSync(workDir)).toBe(false);
241242
});

packages/platform-ios/src/app-monitor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ export const createIosSimulatorAppMonitor = ({
442442
await new Promise((resolve) =>
443443
setTimeout(resolve, CRASH_ARTIFACT_POLL_INTERVAL_MS)
444444
);
445+
// eslint-disable-next-line no-constant-condition
445446
} while (true);
446447
};
447448

@@ -582,6 +583,7 @@ export const createIosDeviceAppMonitor = ({
582583
await new Promise((resolve) =>
583584
setTimeout(resolve, CRASH_ARTIFACT_POLL_INTERVAL_MS)
584585
);
586+
// eslint-disable-next-line no-constant-condition
585587
} while (true);
586588
};
587589

packages/platform-ios/src/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212

1313
const getAppleRunner = async (
1414
config: ApplePlatformConfig,
15-
harnessConfig: Config
15+
_harnessConfig: Config
1616
): Promise<HarnessPlatformRunner> => {
1717
const parsedConfig = ApplePlatformConfigSchema.parse(config);
1818

packages/platform-vega/src/runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ const getVegaRunner = async (
101101
isAppRunning: async () => {
102102
return await kepler.isAppRunning(deviceId, bundleId);
103103
},
104+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
104105
createAppMonitor: (_options?: CreateAppMonitorOptions) =>
105106
createPollingAppMonitor({
106107
interval: 250,

0 commit comments

Comments
 (0)