From e7b0cebd17f093793e93f4f236921cb4a3f595b8 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 | 9 ++++++++- packages/zone/src/durable.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d54d1466f19b..adc3d0d2de94 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -50,7 +50,14 @@ module.exports = { reportUnusedDisableDirectives: true, rules: { - '@typescript-eslint/prefer-ts-expect-error': 'error', + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + // TODO tigthen to 'allow-with-description' + 'ts-expect-error': false, + '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 34bcb69cd515..9f30309fa576 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']} */