Skip to content

Commit

Permalink
fix(eslint-plugin): bump typescript-eslint to 8.0 (#3384)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Oct 8, 2024
1 parent d091088 commit 05c6b97
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 83 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-scissors-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rnx-kit/eslint-plugin": patch
---

Bumped `typescript-eslint` to 8.0
2 changes: 1 addition & 1 deletion incubator/patcher-rnmacos/src/patch_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function applyPatchEmbedded({
dryRun: false,
}
);
} catch (e) {
} catch (_) {
try {
executeEffects(
reverse ? patch : reversePatch(patch),
Expand Down
2 changes: 1 addition & 1 deletion packages/align-deps/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function loadConfig(
customProfiles,
manifest,
};
} catch (e) {
} catch (_) {
return "invalid-configuration";
}
}
8 changes: 4 additions & 4 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"enhanced-resolve": "^5.8.3",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript-eslint": "^7.5.0"
"typescript-eslint": "^8.0.0"
},
"peerDependencies": {
"eslint": ">=8.56.0"
"eslint": ">=8.57.0"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^0.2.0",
Expand All @@ -65,8 +65,8 @@
"@types/estree": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@typescript-eslint/types": "^7.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@typescript-eslint/types": "^8.0.0",
"eslint": "^8.56.0",
"eslint-plugin-node": "11.1.0",
"jest": "^29.2.1",
Expand Down
11 changes: 8 additions & 3 deletions packages/eslint-plugin/src/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,19 @@ module.exports = [
"@rnx-kit/no-export-all": "warn",
"@typescript-eslint/consistent-type-imports": [
"error",
{
disallowTypeAnnotations: false,
},
{ disallowTypeAnnotations: false },
],
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-expressions": "off", // Catches valid expressions like template literals
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function resolveAsset(
filePaths: assets,
};
}
} catch (e) {
} catch (_) {
//
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/metro-service/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function isDevServerRunning(
statusResponse.headers.get("X-React-Native-Project-Root") === projectRoot
? "already_running"
: "in_use";
} catch (e) {
} catch (_) {
return "unknown";
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/third-party-notices/src/extractors.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function _getSpdxLicenseInformation(license, moduleName) {
if (tree.right) {
licenses = licenses.concat(_getSpdxLicenseInformation(tree.right));
}
} catch (e) {
} catch (_) {
if (license.toUpperCase() !== "UNLICENSED") {
console.warn(
`WARNING: Unable to parse license "${license}" in ${moduleName}`
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/commands/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ function listFiles(...patterns) {
/** @type {import("../process.js").Command} */
export async function lint(_args, rawArgs = ["--no-warn-ignored"]) {
const files = listFiles("*.cjs", "*.js", "*.jsx", "*.mjs", "*.ts", "*.tsx");
await runScript("eslint", ...files, ...rawArgs);
await runScript("eslint", "--no-warn-ignored", ...files, ...rawArgs);
}
136 changes: 66 additions & 70 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3993,8 +3993,8 @@ __metadata:
"@types/estree": "npm:*"
"@types/jest": "npm:^29.2.1"
"@types/node": "npm:^20.0.0"
"@typescript-eslint/parser": "npm:^7.0.0"
"@typescript-eslint/types": "npm:^7.0.0"
"@typescript-eslint/parser": "npm:^8.0.0"
"@typescript-eslint/types": "npm:^8.0.0"
enhanced-resolve: "npm:^5.8.3"
eslint: "npm:^8.56.0"
eslint-plugin-node: "npm:11.1.0"
Expand All @@ -4003,9 +4003,9 @@ __metadata:
jest: "npm:^29.2.1"
prettier: "npm:^3.0.0"
typescript: "npm:^5.0.0"
typescript-eslint: "npm:^7.5.0"
typescript-eslint: "npm:^8.0.0"
peerDependencies:
eslint: ">=8.56.0"
eslint: ">=8.57.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -5189,121 +5189,119 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0"
"@typescript-eslint/eslint-plugin@npm:8.8.1":
version: 8.8.1
resolution: "@typescript-eslint/eslint-plugin@npm:8.8.1"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/type-utils": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.8.1"
"@typescript-eslint/type-utils": "npm:8.8.1"
"@typescript-eslint/utils": "npm:8.8.1"
"@typescript-eslint/visitor-keys": "npm:8.8.1"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
"@typescript-eslint/parser": ^7.0.0
eslint: ^8.56.0
"@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/2b37948fa1b0dab77138909dabef242a4d49ab93e4019d4ef930626f0a7d96b03e696cd027fa0087881c20e73be7be77c942606b4a76fa599e6b37f6985304c3
checksum: 10c0/020a0a482202b34c6665a56ec5902e38ae1870b2600ec1b2092de352b23099dde553781ee8323974f63962ebe164a6304f0019e937afb5cf7854b0e0163ad1ca
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:7.18.0, @typescript-eslint/parser@npm:^7.0.0":
version: 7.18.0
resolution: "@typescript-eslint/parser@npm:7.18.0"
"@typescript-eslint/parser@npm:8.8.1, @typescript-eslint/parser@npm:^8.0.0":
version: 8.8.1
resolution: "@typescript-eslint/parser@npm:8.8.1"
dependencies:
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.8.1"
"@typescript-eslint/types": "npm:8.8.1"
"@typescript-eslint/typescript-estree": "npm:8.8.1"
"@typescript-eslint/visitor-keys": "npm:8.8.1"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^8.56.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/370e73fca4278091bc1b657f85e7d74cd52b24257ea20c927a8e17546107ce04fbf313fec99aed0cc2a145ddbae1d3b12e9cc2c1320117636dc1281bcfd08059
checksum: 10c0/2afd147ccec6754316d6837d6108a5d822eb6071e1a7355073288c232530bc3e49901d3f08755ce02d497110c531f3b3658eb46d0ff875a69d4f360b5f938cb4
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/scope-manager@npm:7.18.0"
"@typescript-eslint/scope-manager@npm:8.8.1":
version: 8.8.1
resolution: "@typescript-eslint/scope-manager@npm:8.8.1"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
checksum: 10c0/038cd58c2271de146b3a594afe2c99290034033326d57ff1f902976022c8b0138ffd3cb893ae439ae41003b5e4bcc00cabf6b244ce40e8668f9412cc96d97b8e
"@typescript-eslint/types": "npm:8.8.1"
"@typescript-eslint/visitor-keys": "npm:8.8.1"
checksum: 10c0/6f697baf087aedc3f0f228ff964fd108a9dd33fe4e5cc6c914be6367c324cee55629e099832668042bedfec8cdc72c6ef2ca960ee26966dbcc75753059a1352f
languageName: node
linkType: hard

"@typescript-eslint/type-utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/type-utils@npm:7.18.0"
"@typescript-eslint/type-utils@npm:8.8.1":
version: 8.8.1
resolution: "@typescript-eslint/type-utils@npm:8.8.1"
dependencies:
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:8.8.1"
"@typescript-eslint/utils": "npm:8.8.1"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/ad92a38007be620f3f7036f10e234abdc2fdc518787b5a7227e55fd12896dacf56e8b34578723fbf9bea8128df2510ba8eb6739439a3879eda9519476d5783fd
checksum: 10c0/6edfc2b9fca5233dd922141f080377b677db1093ec3e702a3ab52d58f77b91c0fb69479d4d42f125536b8fc0ffa85c07c7de2f17cc4c6fa1df1226ec01e5608c
languageName: node
linkType: hard

"@typescript-eslint/types@npm:7.18.0, @typescript-eslint/types@npm:^7.0.0":
version: 7.18.0
resolution: "@typescript-eslint/types@npm:7.18.0"
checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054
"@typescript-eslint/types@npm:8.8.1, @typescript-eslint/types@npm:^8.0.0":
version: 8.8.1
resolution: "@typescript-eslint/types@npm:8.8.1"
checksum: 10c0/4b44857332a0b1bfafbeccb8be157f8266d9e226ac723f6af1272b9b670b49444423ddac733655163eb3b90e8c88393a68ab2d7f326f5775371eaf4b9ca31d7b
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/typescript-estree@npm:7.18.0"
"@typescript-eslint/typescript-estree@npm:8.8.1":
version: 8.8.1
resolution: "@typescript-eslint/typescript-estree@npm:8.8.1"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
"@typescript-eslint/types": "npm:8.8.1"
"@typescript-eslint/visitor-keys": "npm:8.8.1"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
fast-glob: "npm:^3.3.2"
is-glob: "npm:^4.0.3"
minimatch: "npm:^9.0.4"
semver: "npm:^7.6.0"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81
checksum: 10c0/e3b9bc1e925c07833237044271cdc9bd8bdba3e2143dcfc5bf3bf481c89731b666a6fad25333a4b1980ac2f4c6f5e6e42c71206f73f3704e319f6b3b67463a6a
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/utils@npm:7.18.0"
"@typescript-eslint/utils@npm:8.8.1":
version: 8.8.1
resolution: "@typescript-eslint/utils@npm:8.8.1"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
"@typescript-eslint/scope-manager": "npm:8.8.1"
"@typescript-eslint/types": "npm:8.8.1"
"@typescript-eslint/typescript-estree": "npm:8.8.1"
peerDependencies:
eslint: ^8.56.0
checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e
eslint: ^8.57.0 || ^9.0.0
checksum: 10c0/954a2e85ae56a3ebefb6e41fb33c59ffa886963860536e9729a35ecea55eefdc58858c7aa126048c4a61f4fd9997b4f7601e7884ed2b3e4e7a46c9e4617a9f29
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/visitor-keys@npm:7.18.0"
"@typescript-eslint/visitor-keys@npm:8.8.1":
version: 8.8.1
resolution: "@typescript-eslint/visitor-keys@npm:8.8.1"
dependencies:
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/types": "npm:8.8.1"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/538b645f8ff1d9debf264865c69a317074eaff0255e63d7407046176b0f6a6beba34a6c51d511f12444bae12a98c69891eb6f403c9f54c6c2e2849d1c1cb73c0
checksum: 10c0/6f917090b61277bd443aa851c532c4a9cc91ad57aedf185c5dff0c530f158cce84ef815833bd8deffa87f0bbf7a9f1abd1e02e30af2463c4e7f27c0c08f59080
languageName: node
linkType: hard

Expand Down Expand Up @@ -13898,19 +13896,17 @@ __metadata:
languageName: node
linkType: hard

"typescript-eslint@npm:^7.5.0":
version: 7.18.0
resolution: "typescript-eslint@npm:7.18.0"
"typescript-eslint@npm:^8.0.0":
version: 8.8.1
resolution: "typescript-eslint@npm:8.8.1"
dependencies:
"@typescript-eslint/eslint-plugin": "npm:7.18.0"
"@typescript-eslint/parser": "npm:7.18.0"
"@typescript-eslint/utils": "npm:7.18.0"
peerDependencies:
eslint: ^8.56.0
"@typescript-eslint/eslint-plugin": "npm:8.8.1"
"@typescript-eslint/parser": "npm:8.8.1"
"@typescript-eslint/utils": "npm:8.8.1"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/610c0faa70b9be89255086378c7ef69e979115c89be69851fb4d69e76907b3520450b162a8adee56b32dbf368f8c14c1fac88065539012140c1319851f2676da
checksum: 10c0/d6793697fce239ef8838ced6e1e59940c30579c8f62c49bc605fdeda9f3f7a5c24bfddd997b142f8c411859dc0b9985ecdae569814dd4f8e6775e1899d55e9cc
languageName: node
linkType: hard

Expand Down

0 comments on commit 05c6b97

Please sign in to comment.