Skip to content

Commit

Permalink
lint: use ban-ts-comment
Browse files Browse the repository at this point in the history
prefer-ts-expect-error was deprecated
typescript-eslint/typescript-eslint#9081
  • Loading branch information
turadg committed Jun 10, 2024
1 parent 8d63cff commit e6a3d15
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 81 deletions.
10 changes: 9 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }],
Expand Down
2 changes: 1 addition & 1 deletion packages/zone/src/durable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']} */
Expand Down
81 changes: 2 additions & 79 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -3659,23 +3654,6 @@
natural-compare "^1.4.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/[email protected]":
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/[email protected]", "@typescript-eslint/parser@^7.0.1":
version "7.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.12.0.tgz#8761df3345528b35049353db80010b385719b1c3"
Expand All @@ -3687,17 +3665,6 @@
"@typescript-eslint/visitor-keys" "7.12.0"
debug "^4.3.4"

"@typescript-eslint/[email protected]":
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/[email protected]":
version "7.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.12.0.tgz#259c014362de72dd34f995efe6bd8dda486adf58"
Expand All @@ -3706,14 +3673,6 @@
"@typescript-eslint/types" "7.12.0"
"@typescript-eslint/visitor-keys" "7.12.0"

"@typescript-eslint/[email protected]":
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/[email protected]":
version "7.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.12.0.tgz#9dfaaa1972952f395ec5be4f5bbfc4d3cdc63908"
Expand All @@ -3724,27 +3683,12 @@
debug "^4.3.4"
ts-api-utils "^1.3.0"

"@typescript-eslint/[email protected]":
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/[email protected]":
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/[email protected]":
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/[email protected]", "@typescript-eslint/[email protected]", "@typescript-eslint/typescript-estree@^7.12.0":
"@typescript-eslint/[email protected]", "@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==
Expand All @@ -3768,19 +3712,6 @@
"@typescript-eslint/types" "7.12.0"
"@typescript-eslint/typescript-estree" "7.12.0"

"@typescript-eslint/[email protected]":
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/[email protected]":
version "7.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.12.0.tgz#c053b55a996679528beeedd8e565710ce1ae1ad3"
Expand All @@ -3789,14 +3720,6 @@
"@typescript-eslint/types" "7.12.0"
eslint-visitor-keys "^3.4.3"

"@typescript-eslint/[email protected]":
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"
Expand Down

0 comments on commit e6a3d15

Please sign in to comment.