From e6a3d1573f0ac78442043b811b352fb3d0bb6379 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 +- yarn.lock | 81 +----------------------------------- 3 files changed, 12 insertions(+), 81 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d54d1466f19b..c018e82e0ada 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -50,7 +50,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 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']} */ diff --git a/yarn.lock b/yarn.lock index aa2963f44bad..3d3a4e437424 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3463,7 +3463,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.11", "@types/json-schema@^7.0.15": +"@types/json-schema@*", "@types/json-schema@^7.0.11": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3596,11 +3596,6 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== -"@types/semver@^7.5.8": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/send@*": version "0.17.1" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" @@ -3659,23 +3654,6 @@ natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/eslint-plugin@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz#50a9044e3e5fe76b22caf64fb7fc1f97614bdbfd" - integrity sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q== - dependencies: - "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/type-utils" "7.7.1" - "@typescript-eslint/utils" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" - debug "^4.3.4" - graphemer "^1.4.0" - ignore "^5.3.1" - natural-compare "^1.4.0" - semver "^7.6.0" - ts-api-utils "^1.3.0" - "@typescript-eslint/parser@7.12.0", "@typescript-eslint/parser@^7.0.1": version "7.12.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.12.0.tgz#8761df3345528b35049353db80010b385719b1c3" @@ -3687,17 +3665,6 @@ "@typescript-eslint/visitor-keys" "7.12.0" debug "^4.3.4" -"@typescript-eslint/parser@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.1.tgz#f940e9f291cdca40c46cb75916217d3a42d6ceea" - integrity sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw== - dependencies: - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/typescript-estree" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" - debug "^4.3.4" - "@typescript-eslint/scope-manager@7.12.0": version "7.12.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.12.0.tgz#259c014362de72dd34f995efe6bd8dda486adf58" @@ -3706,14 +3673,6 @@ "@typescript-eslint/types" "7.12.0" "@typescript-eslint/visitor-keys" "7.12.0" -"@typescript-eslint/scope-manager@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz#07fe59686ca843f66e3e2b5c151522bc38effab2" - integrity sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA== - dependencies: - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" - "@typescript-eslint/type-utils@7.12.0": version "7.12.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.12.0.tgz#9dfaaa1972952f395ec5be4f5bbfc4d3cdc63908" @@ -3724,27 +3683,12 @@ debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/type-utils@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz#2f8094edca3bebdaad009008929df645ed9c8743" - integrity sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q== - dependencies: - "@typescript-eslint/typescript-estree" "7.7.1" - "@typescript-eslint/utils" "7.7.1" - debug "^4.3.4" - ts-api-utils "^1.3.0" - "@typescript-eslint/types@7.12.0": version "7.12.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.12.0.tgz#bf208f971a8da1e7524a5d9ae2b5f15192a37981" integrity sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg== -"@typescript-eslint/types@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.1.tgz#f903a651fb004c75add08e4e9e207f169d4b98d7" - integrity sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w== - -"@typescript-eslint/typescript-estree@7.12.0", "@typescript-eslint/typescript-estree@7.7.1", "@typescript-eslint/typescript-estree@^7.12.0": +"@typescript-eslint/typescript-estree@7.12.0", "@typescript-eslint/typescript-estree@^7.12.0": version "7.12.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.12.0.tgz#e6c1074f248b3db6573ab6a7c47a39c4cd498ff9" integrity sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ== @@ -3768,19 +3712,6 @@ "@typescript-eslint/types" "7.12.0" "@typescript-eslint/typescript-estree" "7.12.0" -"@typescript-eslint/utils@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.1.tgz#5d161f2b4a55e1bc38b634bebb921e4bd4e4a16e" - integrity sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.15" - "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/typescript-estree" "7.7.1" - semver "^7.6.0" - "@typescript-eslint/visitor-keys@7.12.0": version "7.12.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.12.0.tgz#c053b55a996679528beeedd8e565710ce1ae1ad3" @@ -3789,14 +3720,6 @@ "@typescript-eslint/types" "7.12.0" eslint-visitor-keys "^3.4.3" -"@typescript-eslint/visitor-keys@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz#da2294796220bb0f3b4add5ecbb1b9c3f4f65798" - integrity sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw== - dependencies: - "@typescript-eslint/types" "7.7.1" - eslint-visitor-keys "^3.4.3" - "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"