From df05b073ad5e24c0ae794332cc602ea11afad057 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Sun, 9 Jun 2024 16:14:26 -0700 Subject: [PATCH] lint: use ban-ts-comment prefer-ts-expect-error was deprecated https://github.com/typescript-eslint/typescript-eslint/pull/9081/ --- .eslintrc.cjs | 10 +++++++++- packages/zone/src/durable.js | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index b134ca606ac..1f2067b174c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -81,7 +81,15 @@ module.exports = { reportUnusedDisableDirectives: true, rules: { - '@typescript-eslint/prefer-ts-expect-error': 'error', + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + // TODO tighten to 'allow-with-description' (42 unexplained atm) + 'ts-expect-error': false, + // TODO make this error (start with `src` sans codegen) + 'ts-nocheck': false, + }, + ], '@typescript-eslint/no-floating-promises': 'error', // so that floating-promises can be explicitly permitted with void operator 'no-void': ['error', { allowAsStatement: true }], diff --git a/packages/zone/src/durable.js b/packages/zone/src/durable.js index 24f8093a088..8f9461e489b 100644 --- a/packages/zone/src/durable.js +++ b/packages/zone/src/durable.js @@ -86,7 +86,7 @@ export const makeDurableZone = (baggage, baseLabel = 'durableZone') => { /** @type {import('.').Zone['exoClass']} */ const exoClass = (...args) => prepareExoClass(baggage, ...args); /** @type {import('.').Zone['exoClassKit']} */ - // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- happens only integrating with Endo master + // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- happens only integrating with Endo master // @ts-ignore FIXME in Endo const exoClassKit = (...args) => prepareExoClassKit(baggage, ...args); /** @type {import('.').Zone['exo']} */