Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update typescript-eslint monorepo to v8 (major) #11235

Merged
merged 10 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ module.exports = {
],
plugins: ['unused-imports'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
curly: 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'unused-imports/no-unused-imports': 'error',
},
env: {
Expand All @@ -44,6 +42,13 @@ module.exports = {
es2022: true,
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
},
},
Comment on lines +45 to +51
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these from the generic "rules" above because otherwise there was errors related to passing config through the babel parser to the ts-eslint parser

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care about .mts? No biggie either way

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good spot! I noticed that in some of the tinkering I did earlier today outside this PR. I'll make sure to add this in some follow up work.

{
files: ['packages/structure/src/**'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/codemods/src/codemods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import yargs from 'yargs'

// eslint-disable-next-line no-unused-expressions
// eslint-disable-next-line no-unused-expressions, @typescript-eslint/no-unused-expressions
yargs
.scriptName('codemods')
.example([['$0 add-directives', 'Run the add-directives codemod']])
Expand Down
166 changes: 83 additions & 83 deletions packages/create-redwood-rsc-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -878,15 +878,15 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:7.17.0":
version: 7.17.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.17.0"
"@typescript-eslint/eslint-plugin@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.18.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:7.17.0"
"@typescript-eslint/type-utils": "npm:7.17.0"
"@typescript-eslint/utils": "npm:7.17.0"
"@typescript-eslint/visitor-keys": "npm:7.17.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"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
Expand All @@ -897,85 +897,85 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/654d589531ae45b8ca8f3969e785926b2544100a985968d86c828e2a1ff50331250e19c8b4af83a4ba17847a0047479662eb317e4ad94f6279cac03acd5cda5a
checksum: 10c0/2b37948fa1b0dab77138909dabef242a4d49ab93e4019d4ef930626f0a7d96b03e696cd027fa0087881c20e73be7be77c942606b4a76fa599e6b37f6985304c3
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:7.17.0":
version: 7.17.0
resolution: "@typescript-eslint/parser@npm:7.17.0"
"@typescript-eslint/parser@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/parser@npm:7.18.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:7.17.0"
"@typescript-eslint/types": "npm:7.17.0"
"@typescript-eslint/typescript-estree": "npm:7.17.0"
"@typescript-eslint/visitor-keys": "npm:7.17.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/visitor-keys": "npm:7.18.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/0cf6922412517b4c005609b035119ddd2798e1b6e74e1bccd487aa53119d27067cfd89311f00b8e96b2b044a0fb7373418a16552be86079879158b260c397418
checksum: 10c0/370e73fca4278091bc1b657f85e7d74cd52b24257ea20c927a8e17546107ce04fbf313fec99aed0cc2a145ddbae1d3b12e9cc2c1320117636dc1281bcfd08059
languageName: node
linkType: hard

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

"@typescript-eslint/scope-manager@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/scope-manager@npm:8.0.1"
"@typescript-eslint/scope-manager@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/scope-manager@npm:8.1.0"
dependencies:
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/visitor-keys": "npm:8.0.1"
checksum: 10c0/79c00bc726c0c14b800bbbc1c1b88978c2cbeb29d2b06b94a5773f959aafac5cfb37bdb8c3bb80b9fb07fd10440413fce9098f338dce100696a4d3dc1ea6b187
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/visitor-keys": "npm:8.1.0"
checksum: 10c0/2bcf8cd176a1819bddcae16c572e7da8fba821b995a91cd53d64d8d6b85a17f5a895522f281ba57e34929574bddd4d6684ee3e545ec4e8096be4c3198e253a9a
languageName: node
linkType: hard

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

"@typescript-eslint/types@npm:7.17.0":
version: 7.17.0
resolution: "@typescript-eslint/types@npm:7.17.0"
checksum: 10c0/8f734294d432b37c534f17eb2befdfe43b76874d09118d6adf7e308e5a586e9e11b7021abe4f6692a6e6226de58a15b3cfe1300939556ce1c908d9af627b7400
"@typescript-eslint/types@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/types@npm:7.18.0"
checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054
languageName: node
linkType: hard

"@typescript-eslint/types@npm:8.0.1, @typescript-eslint/types@npm:^8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/types@npm:8.0.1"
checksum: 10c0/e7c02d4e153a935c04bfddc0c8fc1618b1c8e9767583cff05a0e063bbacb7f3c8fac2257879c41162fe19094a0de3a567b57969177b2a0c32f39accd4c5601d5
"@typescript-eslint/types@npm:8.1.0, @typescript-eslint/types@npm:^8.0.1":
version: 8.1.0
resolution: "@typescript-eslint/types@npm:8.1.0"
checksum: 10c0/ceade44455f45974e68956016c4d1c6626580732f7f9675e14ffa63db80b551752b0df596b20473dae9f0dc6ed966e17417dc2cf36e1a82b6ab0edc97c5eaa50
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:7.17.0":
version: 7.17.0
resolution: "@typescript-eslint/typescript-estree@npm:7.17.0"
"@typescript-eslint/typescript-estree@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/typescript-estree@npm:7.18.0"
dependencies:
"@typescript-eslint/types": "npm:7.17.0"
"@typescript-eslint/visitor-keys": "npm:7.17.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/visitor-keys": "npm:7.18.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
Expand All @@ -985,16 +985,16 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/10967823ce00c9f8cd4a8b56bed3524c098e38cc0e27aaa49ffd8fad4e671c00226bf0330ba858948750b88dc55527ebeb62c74be8a30bac18a106d6c033ab59
checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/typescript-estree@npm:8.0.1"
"@typescript-eslint/typescript-estree@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/typescript-estree@npm:8.1.0"
dependencies:
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/visitor-keys": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/visitor-keys": "npm:8.1.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
Expand All @@ -1004,55 +1004,55 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/12507995dc634a1746b581635e0df9f986ad01e7f0b4482f1f240986e7277ebd301dfe3b59c07da6d1f3d465f9110dc2a61ce50b67a8f31188cad13f7cc3632e
checksum: 10c0/a7bc8275df1c79c4cb14ef086c56674316dd4907efec53eddca35d0b5220428b69c82178ce2d95138da2e398269c8bd0764cae8020a36417e411e35c3c47bc4b
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:7.17.0":
version: 7.17.0
resolution: "@typescript-eslint/utils@npm:7.17.0"
"@typescript-eslint/utils@npm:7.18.0":
version: 7.18.0
resolution: "@typescript-eslint/utils@npm:7.18.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:7.17.0"
"@typescript-eslint/types": "npm:7.17.0"
"@typescript-eslint/typescript-estree": "npm:7.17.0"
"@typescript-eslint/scope-manager": "npm:7.18.0"
"@typescript-eslint/types": "npm:7.18.0"
"@typescript-eslint/typescript-estree": "npm:7.18.0"
peerDependencies:
eslint: ^8.56.0
checksum: 10c0/1f3e22820b3ab3e47809c45e576614ad4a965f5c8634856eca5c70981386b9351a77fb172ba32345e7c5667479cf9526c673699dd38dccd0616ad6db21704e72
checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:^8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/utils@npm:8.0.1"
version: 8.1.0
resolution: "@typescript-eslint/utils@npm:8.1.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/typescript-estree": "npm:8.0.1"
"@typescript-eslint/scope-manager": "npm:8.1.0"
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/typescript-estree": "npm:8.1.0"
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
checksum: 10c0/9ab4baee82ac74caee18fb687697698043385aea5d0ec4bb34d874a6969eaa3e48f9319ab023cbcb6114f86de17f7360a43460fb4159c61760a2d2984004dd21
checksum: 10c0/c95503a6bdcd98b1ff04d1adbf46377b2036b1c510d90a4a056401f996f775f06c3108c95fb81cd6babc9c97b73b91b8e848f0337bc508de8a49c993582f0e75
languageName: node
linkType: hard

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

"@typescript-eslint/visitor-keys@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/visitor-keys@npm:8.0.1"
"@typescript-eslint/visitor-keys@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/visitor-keys@npm:8.1.0"
dependencies:
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.1.0"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/64c12095a97808bb1e1f5709192b274cac58d6b8fbbf9ec8fafead30f7effef7f0232244ec759298d046e1cd43521b9f3ba37b80618d5184c8b22fae665a7068
checksum: 10c0/b7544dbb0eec1ddbfcd95c04b51b9a739c2e768c16d1c88508f976a2b0d1bc02fefb7491930e06e48073a5c07c6f488cd8403bba3a8b918888b93a88d5ac3869
languageName: node
linkType: hard

Expand Down Expand Up @@ -4098,18 +4098,18 @@ __metadata:
linkType: hard

"typescript-eslint@npm:^7.16.1":
version: 7.17.0
resolution: "typescript-eslint@npm:7.17.0"
version: 7.18.0
resolution: "typescript-eslint@npm:7.18.0"
dependencies:
"@typescript-eslint/eslint-plugin": "npm:7.17.0"
"@typescript-eslint/parser": "npm:7.17.0"
"@typescript-eslint/utils": "npm:7.17.0"
"@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
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/5d9a5430b139129474cd65655ef05efeddfbd890a3ff28c1dd3b747cf48c938cf18e95b3cbbb4a7f8bf991c6c2de5e82f685768c2e7d691629a404a178672a13
checksum: 10c0/610c0faa70b9be89255086378c7ef69e979115c89be69851fb4d69e76907b3520450b162a8adee56b32dbf368f8c14c1fac88065539012140c1319851f2676da
languageName: node
linkType: hard

Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"@redwoodjs/eslint-plugin": "workspace:*",
"@redwoodjs/internal": "workspace:*",
"@redwoodjs/project-config": "workspace:*",
"@typescript-eslint/eslint-plugin": "7.3.1",
"@typescript-eslint/parser": "7.3.1",
"@typescript-eslint/eslint-plugin": "8.1.0",
"@typescript-eslint/parser": "8.1.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-babel-module": "5.3.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ module.exports = {
// 'recommended' rules we alter
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-require-imports': 'off',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The no-var-requires above is now deprecated in favour of this rule. I have left the original in for the moment and matched it's level.

'@typescript-eslint/no-empty-object-type': 'off',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have turned this off just for the moment. It will be turned back on once I follow up with a PR to update the framework side config.

'@typescript-eslint/no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"test:watch": "vitest watch"
},
"dependencies": {
"@typescript-eslint/utils": "7.3.1",
"@typescript-eslint/utils": "8.1.0",
"eslint": "8.57.0"
},
"devDependencies": {
"@redwoodjs/framework-tools": "workspace:*",
"@types/eslint": "8.56.11",
"@types/estree": "1.0.5",
"@typescript-eslint/parser": "7.3.1",
"@typescript-eslint/rule-tester": "7.3.1",
"@typescript-eslint/parser": "8.1.0",
"@typescript-eslint/rule-tester": "8.1.0",
"tsx": "4.17.0",
"typescript": "5.5.4",
"vitest": "2.0.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import tsEslintParser from '@typescript-eslint/parser'
import { RuleTester } from '@typescript-eslint/rule-tester'

import { serviceTypeAnnotations } from '../service-type-annotations.js'

const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
languageOptions: {
parser: tsEslintParser,
parserOptions: {
projectServices: {
allowDefaultProject: ['*.ts*'],
defaultProject: 'tsconfig.json',
},
tsconfigRootDir: '/',
},
},
})

ruleTester.run('service-type-annotations', serviceTypeAnnotations, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import tsEslintParser from '@typescript-eslint/parser'
import { RuleTester } from '@typescript-eslint/rule-tester'

import { unsupportedRouteComponents } from '../unsupported-route-components.js'

const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true,
languageOptions: {
parser: tsEslintParser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true,
},
},
},
})
Expand Down
Loading
Loading