0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

feat: bumped typescript-eslint to v6 stable 🥳 (#7626)

This commit is contained in:
Josh Goldberg ✨ 2023-07-12 03:11:46 -04:00 committed by GitHub
parent 2ddf342626
commit df49bbe7f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 43 deletions

View file

@ -26,7 +26,6 @@ module.exports = {
'@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/dot-notation': 'off', '@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-base-to-string': 'off', '@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': 'off', '@typescript-eslint/no-misused-promises': 'off',
@ -38,12 +37,14 @@ module.exports = {
'@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off', '@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/require-await': 'off', '@typescript-eslint/require-await': 'off',
'@typescript-eslint/restrict-plus-operands': 'off', '@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off', '@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/sort-type-constituents': 'off', '@typescript-eslint/sort-type-constituents': 'off',
'@typescript-eslint/unbound-method': 'off', '@typescript-eslint/unbound-method': 'off',
"@typescript-eslint/no-explicit-any": 'off',
// These rules enabled by the preset configs don't work well for us // These rules enabled by the preset configs don't work well for us
'@typescript-eslint/await-thenable': 'off', '@typescript-eslint/await-thenable': 'off',

View file

@ -78,8 +78,8 @@
"@changesets/changelog-github": "^0.4.8", "@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1", "@changesets/cli": "^2.26.1",
"@types/node": "^18.16.18", "@types/node": "^18.16.18",
"@typescript-eslint/eslint-plugin": "6.0.0-alpha.158", "@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0-alpha.158", "@typescript-eslint/parser": "6.0.0",
"esbuild": "^0.17.19", "esbuild": "^0.17.19",
"eslint": "^8.43.0", "eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",

View file

@ -72,8 +72,6 @@ export function eventError({
cliCommand: cmd, cliCommand: cmd,
isFatal: isFatal, isFatal: isFatal,
anonymousMessageHint: anonymousMessageHint:
// https://github.com/typescript-eslint/typescript-eslint/issues/4820
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- errorData may be false
errorData && errorData.message errorData && errorData.message
? getSafeErrorMessage(errorData.message) ? getSafeErrorMessage(errorData.message)
: anonymizeErrorMessage(err.message), : anonymizeErrorMessage(err.message),

View file

@ -30,11 +30,11 @@ importers:
specifier: ^18.16.18 specifier: ^18.16.18
version: 18.16.18 version: 18.16.18
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: 6.0.0-alpha.158 specifier: 6.0.0
version: 6.0.0-alpha.158(@typescript-eslint/parser@6.0.0-alpha.158)(eslint@8.43.0)(typescript@5.0.2) version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.43.0)(typescript@5.0.2)
'@typescript-eslint/parser': '@typescript-eslint/parser':
specifier: 6.0.0-alpha.158 specifier: 6.0.0
version: 6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2) version: 6.0.0(eslint@8.43.0)(typescript@5.0.2)
esbuild: esbuild:
specifier: ^0.17.19 specifier: ^0.17.19
version: 0.17.19 version: 0.17.19
@ -8872,8 +8872,8 @@ packages:
/@types/yargs-parser@21.0.0: /@types/yargs-parser@21.0.0:
resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==}
/@typescript-eslint/eslint-plugin@6.0.0-alpha.158(@typescript-eslint/parser@6.0.0-alpha.158)(eslint@8.43.0)(typescript@5.0.2): /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.43.0)(typescript@5.0.2):
resolution: {integrity: sha512-fzcdANIIKtQxen+IdXue1u4EHY8h84M8L+eSSYgQQUxJy7tTN4EfBK4jlAAVxGCE+TkmTzBMe52hMAV0PwNLiQ==} resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
@ -8884,15 +8884,18 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@eslint-community/regexpp': 4.5.1 '@eslint-community/regexpp': 4.5.1
'@typescript-eslint/parser': 6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2) '@typescript-eslint/parser': 6.0.0(eslint@8.43.0)(typescript@5.0.2)
'@typescript-eslint/scope-manager': 6.0.0-alpha.158 '@typescript-eslint/scope-manager': 6.0.0
'@typescript-eslint/type-utils': 6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2) '@typescript-eslint/type-utils': 6.0.0(eslint@8.43.0)(typescript@5.0.2)
'@typescript-eslint/utils': 6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2) '@typescript-eslint/utils': 6.0.0(eslint@8.43.0)(typescript@5.0.2)
'@typescript-eslint/visitor-keys': 6.0.0
debug: 4.3.4 debug: 4.3.4
eslint: 8.43.0 eslint: 8.43.0
grapheme-splitter: 1.0.4 grapheme-splitter: 1.0.4
graphemer: 1.4.0
ignore: 5.2.4 ignore: 5.2.4
natural-compare: 1.4.0 natural-compare: 1.4.0
natural-compare-lite: 1.4.0
semver: 7.5.3 semver: 7.5.3
ts-api-utils: 1.0.1(typescript@5.0.2) ts-api-utils: 1.0.1(typescript@5.0.2)
typescript: 5.0.2 typescript: 5.0.2
@ -8900,8 +8903,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/parser@6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2): /@typescript-eslint/parser@6.0.0(eslint@8.43.0)(typescript@5.0.2):
resolution: {integrity: sha512-LJ7qo0yfk4bxYw2A2OCwUeiGumsU4YCebu29dIxC2lK/aT398KazALqMzPC4z6544OS6zYVM2WI9uyCZ8wgj+Q==} resolution: {integrity: sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
eslint: ^7.0.0 || ^8.0.0 eslint: ^7.0.0 || ^8.0.0
@ -8910,10 +8913,10 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/scope-manager': 6.0.0-alpha.158 '@typescript-eslint/scope-manager': 6.0.0
'@typescript-eslint/types': 6.0.0-alpha.158 '@typescript-eslint/types': 6.0.0
'@typescript-eslint/typescript-estree': 6.0.0-alpha.158(typescript@5.0.2) '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.0.2)
'@typescript-eslint/visitor-keys': 6.0.0-alpha.158 '@typescript-eslint/visitor-keys': 6.0.0
debug: 4.3.4 debug: 4.3.4
eslint: 8.43.0 eslint: 8.43.0
typescript: 5.0.2 typescript: 5.0.2
@ -8921,16 +8924,16 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/scope-manager@6.0.0-alpha.158: /@typescript-eslint/scope-manager@6.0.0:
resolution: {integrity: sha512-59HcplMM9ZcdtfVe6pgFzereN49OKeVc/FZsymAaxe9QqGXby665pr2/IHcmFh3cnpgNdRQu+DaD5N538AprjA==} resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
dependencies: dependencies:
'@typescript-eslint/types': 6.0.0-alpha.158 '@typescript-eslint/types': 6.0.0
'@typescript-eslint/visitor-keys': 6.0.0-alpha.158 '@typescript-eslint/visitor-keys': 6.0.0
dev: true dev: true
/@typescript-eslint/type-utils@6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2): /@typescript-eslint/type-utils@6.0.0(eslint@8.43.0)(typescript@5.0.2):
resolution: {integrity: sha512-fjUFPY92+0RzyRKs185Rpoaw4z4vt5qoxd6kHLLHjqKxO7xNsOF4nPPjRXlKfbVAUHecPqbFBRmElWCuaEjMdg==} resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
eslint: ^7.0.0 || ^8.0.0 eslint: ^7.0.0 || ^8.0.0
@ -8939,8 +8942,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 6.0.0-alpha.158(typescript@5.0.2) '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.0.2)
'@typescript-eslint/utils': 6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2) '@typescript-eslint/utils': 6.0.0(eslint@8.43.0)(typescript@5.0.2)
debug: 4.3.4 debug: 4.3.4
eslint: 8.43.0 eslint: 8.43.0
ts-api-utils: 1.0.1(typescript@5.0.2) ts-api-utils: 1.0.1(typescript@5.0.2)
@ -8949,13 +8952,13 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/types@6.0.0-alpha.158: /@typescript-eslint/types@6.0.0:
resolution: {integrity: sha512-xfJnAaGKN1b/cz37T4FtQfCBKwA7fn1qxa/5UZmKT1FwI/J+lybk+dHdhU2KvNGJ/53/vGf0OObUzejf7oByLg==} resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
dev: true dev: true
/@typescript-eslint/typescript-estree@6.0.0-alpha.158(typescript@5.0.2): /@typescript-eslint/typescript-estree@6.0.0(typescript@5.0.2):
resolution: {integrity: sha512-1hskAlZ2pliy1DQ1VM3Tu+JUQMtaWaLmMGOOmmI9H7yfudsopV7AOCk+NO1FWIATWIeUvPI33T09WKRdZGO4yg==} resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
@ -8963,8 +8966,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/types': 6.0.0-alpha.158 '@typescript-eslint/types': 6.0.0
'@typescript-eslint/visitor-keys': 6.0.0-alpha.158 '@typescript-eslint/visitor-keys': 6.0.0
debug: 4.3.4 debug: 4.3.4
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
@ -8975,8 +8978,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/utils@6.0.0-alpha.158(eslint@8.43.0)(typescript@5.0.2): /@typescript-eslint/utils@6.0.0(eslint@8.43.0)(typescript@5.0.2):
resolution: {integrity: sha512-HDpGNQnbE09Kun4+IjnaWoARmhAdSbR6MTeaA0K12vzCg9M3rL2z72jzP0z4n7bGRJsNAoH+0SKSgcJ9NL8Bhw==} resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
eslint: ^7.0.0 || ^8.0.0 eslint: ^7.0.0 || ^8.0.0
@ -8984,9 +8987,9 @@ packages:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.43.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.43.0)
'@types/json-schema': 7.0.11 '@types/json-schema': 7.0.11
'@types/semver': 7.5.0 '@types/semver': 7.5.0
'@typescript-eslint/scope-manager': 6.0.0-alpha.158 '@typescript-eslint/scope-manager': 6.0.0
'@typescript-eslint/types': 6.0.0-alpha.158 '@typescript-eslint/types': 6.0.0
'@typescript-eslint/typescript-estree': 6.0.0-alpha.158(typescript@5.0.2) '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.0.2)
eslint: 8.43.0 eslint: 8.43.0
eslint-scope: 5.1.1 eslint-scope: 5.1.1
semver: 7.5.3 semver: 7.5.3
@ -8995,11 +8998,11 @@ packages:
- typescript - typescript
dev: true dev: true
/@typescript-eslint/visitor-keys@6.0.0-alpha.158: /@typescript-eslint/visitor-keys@6.0.0:
resolution: {integrity: sha512-/1xiY3B2Du3a8YaKpF3MtNZRlzDRChJAb8kbt4mQ6h3XGLd8ZGRN8l971nbX632p78kETaJ+JgCGtrgJpQZO+g==} resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
dependencies: dependencies:
'@typescript-eslint/types': 6.0.0-alpha.158 '@typescript-eslint/types': 6.0.0
eslint-visitor-keys: 3.4.1 eslint-visitor-keys: 3.4.1
dev: true dev: true
@ -14208,6 +14211,10 @@ packages:
/napi-build-utils@1.0.2: /napi-build-utils@1.0.2:
resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==}
/natural-compare-lite@1.4.0:
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
dev: true
/natural-compare@1.4.0: /natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true dev: true