diff --git a/packages/jest/src/jest-fast-check-worker.ts b/packages/jest/src/jest-fast-check-worker.ts index 58bd7129..25f5c9e9 100644 --- a/packages/jest/src/jest-fast-check-worker.ts +++ b/packages/jest/src/jest-fast-check-worker.ts @@ -70,7 +70,7 @@ export const init = (url: URL, options?: PropertyForOptions): InitOutput => { // But in ES Modules mode, it cannot be accessed directly, thus users have to directly import it // But root import of it is failing in the context of workers, so only dynamic version is acceptable // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + // @ts-ignore - Dynamic imports cause TS1323 error only in ESM build (not CJS), so @ts-expect-error would fail CJS build return import('@jest/globals').then( ({ jest }): InitOutput => ({ test: buildTest(test as It, jest, fcExtra), diff --git a/packages/poisoning/test/internals/TrackDiffsOnGlobal.spec.ts b/packages/poisoning/test/internals/TrackDiffsOnGlobal.spec.ts index 6a0eaa2e..e9bb8847 100644 --- a/packages/poisoning/test/internals/TrackDiffsOnGlobal.spec.ts +++ b/packages/poisoning/test/internals/TrackDiffsOnGlobal.spec.ts @@ -162,8 +162,7 @@ describe('trackDiffsOnGlobals', () => { const allGlobals: AllGlobals = PoisoningFreeMap.from([ [globalA, extractGlobalDetailsFor('globalA', globalA)], ]); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + // @ts-expect-error - Cannot delete required property 'hello' from object, intentionally deleting for testing prototype chain behavior delete globalA.hello; // deleting hello from globalA but globalA.hello can still be called (prototype call) // Act diff --git a/packages/poisoning/test/main.spec.ts b/packages/poisoning/test/main.spec.ts index 52adc1a9..957ccfef 100644 --- a/packages/poisoning/test/main.spec.ts +++ b/packages/poisoning/test/main.spec.ts @@ -15,8 +15,7 @@ describe('assertNoPoisoning', () => { it('should throw an Error if new global appeared and be able to revert the change', () => { // Arrange - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + // @ts-expect-error - Property 'a' does not exist on globalThis, intentionally adding it for testing globalThis.a = 'Hello'; // Act / Assert @@ -25,8 +24,7 @@ describe('assertNoPoisoning', () => { restoreGlobals(options); expect(() => assertNoPoisoning(options)).not.toThrow(); } finally { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + // @ts-expect-error - Property 'a' has been added on globalThis during the test, deleting it delete globalThis.a; } }); @@ -34,8 +32,7 @@ describe('assertNoPoisoning', () => { it('should throw an Error if global removed and be able to revert the change', () => { // Arrange const F = globalThis.Function; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + // @ts-expect-error - Cannot delete required property 'Function' from globalThis, intentionally doing so for testing delete globalThis.Function; // Act / Assert @@ -119,8 +116,7 @@ describe('assertNoPoisoning', () => { let numDeleted = 0; for (const k of own(obj)) { try { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + // @ts-expect-error - Cannot delete required property from object, intentionally doing so for testing delete obj[k]; ++numDeleted; } catch { diff --git a/packages/worker/test/e2e/asyncThrow.spec.ts b/packages/worker/test/e2e/asyncThrow.spec.ts index f6efbf8d..cce326ac 100644 --- a/packages/worker/test/e2e/asyncThrow.spec.ts +++ b/packages/worker/test/e2e/asyncThrow.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { asyncThrowProperty } from './__properties__/asyncThrow.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/blockEventLoop.spec.ts b/packages/worker/test/e2e/blockEventLoop.spec.ts index 89fc031a..07635479 100644 --- a/packages/worker/test/e2e/blockEventLoop.spec.ts +++ b/packages/worker/test/e2e/blockEventLoop.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { blockEventLoopProperty } from './__properties__/blockEventLoop.mjs'; import { expectThrowWithCause } from './__test-helpers__/ThrowWithCause.js'; diff --git a/packages/worker/test/e2e/concurrentAssert.spec.ts b/packages/worker/test/e2e/concurrentAssert.spec.ts index 56243e1e..3b96f15d 100644 --- a/packages/worker/test/e2e/concurrentAssert.spec.ts +++ b/packages/worker/test/e2e/concurrentAssert.spec.ts @@ -4,8 +4,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { readerAssert, writerAssert, concurrentLogFile } from './__properties__/concurrentAssert.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/failing.spec.ts b/packages/worker/test/e2e/failing.spec.ts index d1d9e7e0..1cb70d55 100644 --- a/packages/worker/test/e2e/failing.spec.ts +++ b/packages/worker/test/e2e/failing.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { failingProperty } from './__properties__/failing.mjs'; import { expectThrowWithCause } from './__test-helpers__/ThrowWithCause.js'; diff --git a/packages/worker/test/e2e/nonSerializableButSameData.spec.ts b/packages/worker/test/e2e/nonSerializableButSameData.spec.ts index d942f03f..7c5ef23c 100644 --- a/packages/worker/test/e2e/nonSerializableButSameData.spec.ts +++ b/packages/worker/test/e2e/nonSerializableButSameData.spec.ts @@ -7,8 +7,7 @@ import { describe, it, expect } from 'vitest'; import { nonSerializableButSameDataProperty, nonSerializableButSameDataRawProperty, - /* eslint-disable @typescript-eslint/ban-ts-comment */ - // @ts-ignore + // @ts-expect-error - Importing .mjs file without type definitions } from './__properties__/nonSerializableButSameData.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/nonSerializableData.spec.ts b/packages/worker/test/e2e/nonSerializableData.spec.ts index a55b85b4..8487cd78 100644 --- a/packages/worker/test/e2e/nonSerializableData.spec.ts +++ b/packages/worker/test/e2e/nonSerializableData.spec.ts @@ -6,8 +6,7 @@ import { describe, it, expect } from 'vitest'; import { nonSerializableDataProperty, nonSerializableDataPropertyMainThread, - /* eslint-disable @typescript-eslint/ban-ts-comment */ - // @ts-ignore + // @ts-expect-error - Importing .mjs file without type definitions } from './__properties__/nonSerializableData.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/passing.spec.ts b/packages/worker/test/e2e/passing.spec.ts index 9c2a0a78..f420cac7 100644 --- a/packages/worker/test/e2e/passing.spec.ts +++ b/packages/worker/test/e2e/passing.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { passingProperty } from './__properties__/passing.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/predicateIsolation.spec.ts b/packages/worker/test/e2e/predicateIsolation.spec.ts index 2a938b76..4083c41e 100644 --- a/packages/worker/test/e2e/predicateIsolation.spec.ts +++ b/packages/worker/test/e2e/predicateIsolation.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { predicateIsolation } from './__properties__/predicateIsolation.mjs'; import { expectThrowWithCause } from './__test-helpers__/ThrowWithCause.js'; diff --git a/packages/worker/test/e2e/propertyIsolation.spec.ts b/packages/worker/test/e2e/propertyIsolation.spec.ts index 434f501a..e2854b4a 100644 --- a/packages/worker/test/e2e/propertyIsolation.spec.ts +++ b/packages/worker/test/e2e/propertyIsolation.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { propertyIsolation } from './__properties__/propertyIsolation.mjs'; import { expectThrowWithCause } from './__test-helpers__/ThrowWithCause.js'; diff --git a/packages/worker/test/e2e/supportPre.spec.ts b/packages/worker/test/e2e/supportPre.spec.ts index a0765086..18938445 100644 --- a/packages/worker/test/e2e/supportPre.spec.ts +++ b/packages/worker/test/e2e/supportPre.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { supportPreProperty } from './__properties__/supportPre.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/syncThrow.spec.ts b/packages/worker/test/e2e/syncThrow.spec.ts index ff9ce7ff..a6819592 100644 --- a/packages/worker/test/e2e/syncThrow.spec.ts +++ b/packages/worker/test/e2e/syncThrow.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it, expect } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { syncThrowProperty } from './__properties__/syncThrow.mjs'; if (isMainThread) { diff --git a/packages/worker/test/e2e/unregistered.spec.ts b/packages/worker/test/e2e/unregistered.spec.ts index fbc1b7a7..c1475e3f 100644 --- a/packages/worker/test/e2e/unregistered.spec.ts +++ b/packages/worker/test/e2e/unregistered.spec.ts @@ -3,8 +3,7 @@ import type { Parameters } from 'fast-check'; import { assert } from '@fast-check/worker'; import { describe, it } from 'vitest'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-ignore +// @ts-expect-error - Importing .mjs file without type definitions import { buildUnregisteredProperty } from './__properties__/unregistered.mjs'; import { expectThrowWithCause } from './__test-helpers__/ThrowWithCause.js'; diff --git a/website/docs/tutorials/detect-race-conditions/Playgrounds.tsx b/website/docs/tutorials/detect-race-conditions/Playgrounds.tsx index c809f4cc..e3af096b 100644 --- a/website/docs/tutorials/detect-race-conditions/Playgrounds.tsx +++ b/website/docs/tutorials/detect-race-conditions/Playgrounds.tsx @@ -8,7 +8,6 @@ import { UnstyledOpenInCodeSandboxButton, } from '@codesandbox/sandpack-react'; import { atomDark } from '@codesandbox/sandpack-themes'; -// @ts-ignore import styles from './Playgrounds.module.css'; import * as snippets from './snippets.mjs';