diff --git a/.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch b/.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch similarity index 96% rename from .yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch rename to .yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch index f4c3ff9cb1d..fb3879286f1 100644 --- a/.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch +++ b/.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch @@ -1,5 +1,5 @@ diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts -index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d505bb996 100644 +index 5ee1d5258cb019bddb259c7d31b1ae0156a98f0c..fc5f4d2a757a9fef92b2135148c22bb0cc81b2c1 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -4491,8 +4491,8 @@ declare namespace ts { @@ -54,7 +54,7 @@ index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d } interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.ConstructorType; -@@ -8978,7 +8992,13 @@ declare namespace ts { +@@ -8991,7 +9005,13 @@ declare namespace ts { function symbolName(symbol: Symbol): string; function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; @@ -68,7 +68,7 @@ index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; /** * Gets the JSDoc parameter tags for the node if present. -@@ -9508,7 +9528,13 @@ declare namespace ts { +@@ -9521,7 +9541,13 @@ declare namespace ts { function isModuleName(node: Node): node is ModuleName; function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken; function setTextRange(range: T, location: TextRange | undefined): T; diff --git a/package.json b/package.json index 0c4e16293b6..d203768a936 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "pretty-format": "^29", "react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch", "tsx": "^3.12.7", - "typescript": "patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch" + "typescript": "patch:typescript@npm%3A5.3.1-rc#./.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch" }, "packageManager": "yarn@3.6.4" } diff --git a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts index a5c42357ec9..ae646e6ad7b 100644 --- a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts +++ b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts @@ -65,9 +65,7 @@ function createIsolatedProgram( const program = ts.createProgram( [parseSettings.filePath], { - ...(ts.JSDocParsingMode && { - jsDocParsingMode: ts.JSDocParsingMode.ParseForTypeInfo, - }), + jsDocParsingMode: ts.JSDocParsingMode?.ParseForTypeInfo, noResolve: true, target: ts.ScriptTarget.Latest, jsx: parseSettings.jsx ? ts.JsxEmit.Preserve : undefined, diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 896facb9b3d..f78ba52fb17 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -77,7 +77,11 @@ export interface EstreeToTsNodeTypes { | ts.Token; [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier; [AST_NODE_TYPES.IfStatement]: ts.IfStatement; - [AST_NODE_TYPES.ImportAttribute]: ts.ImportAttribute; + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum + [AST_NODE_TYPES.ImportAttribute]: 'ImportAttribute' extends keyof typeof ts + ? ts.ImportAttribute + : // eslint-disable-next-line deprecation/deprecation + ts.AssertEntry; [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration; [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause; [AST_NODE_TYPES.ImportExpression]: ts.CallExpression; diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 135f7042536..51a990b3e81 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -12,6 +12,9 @@ declare module 'typescript' { export interface SatisfiesExpression extends ts.Node {} // added in TS 5.1 export interface JsxNamespacedName extends ts.Node {} + // added in TS 5.3 + export interface ImportAttribute extends ts.Node {} + export interface ImportAttributes extends ts.Node {} } /* eslint-enable @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/no-empty-interface */ diff --git a/yarn.lock b/yarn.lock index 86aec19a8f9..1c5490d36b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6109,7 +6109,7 @@ __metadata: ts-node: 10.7.0 tslint: ^6.1.3 tsx: ^3.12.7 - typescript: ">=4.3.5 <5.4.0" + typescript: rc languageName: unknown linkType: soft @@ -20233,33 +20233,33 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.3.0-beta": - version: 5.3.0-beta - resolution: "typescript@npm:5.3.0-beta" +"typescript@npm:5.3.1-rc": + version: 5.3.1-rc + resolution: "typescript@npm:5.3.1-rc" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 12c5b05df8be536c3f5789323ca2e2f21ab6b7571bd21407b152c080be1dc8628c3cd9fb5fa342a304a266f5ad22827f3a27b7961da1600d27890be93f3e2d73 + checksum: a144fdc3edea2230f947716f9983d5d1c4d0d2a3a4007121d69b70e92b28aef65f7974fe11a10ad91b836e9c6522888e204952904b804cd85af6bf5689f36705 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch::locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A.": - version: 5.3.0-beta - resolution: "typescript@patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch::version=5.3.0-beta&hash=aba397&locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A." +"typescript@patch:typescript@npm%3A5.3.1-rc#./.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch::locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A.": + version: 5.3.1-rc + resolution: "typescript@patch:typescript@npm%3A5.3.1-rc#./.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch::version=5.3.1-rc&hash=7df256&locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A." bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 85a8cc0ce7b9d4243db899dbf77632d63cf32818cfc076f27e929f1b89c062c2a94f5fa2f0a72e9fc315164532aac1580c9cad5b453f4a4aed464557593c8168 + checksum: 2ed8bccd7f16441a04e25d252315b0280b4ba4de8ad7b2a9a8f0c8ad0eb01c4238628ba27e1f83f927b8ee56c447fc80286f9e5c30395c5ba5708ffb069f1f2f languageName: node linkType: hard -"typescript@patch:typescript@patch%3Atypescript@npm%253A5.3.0-beta%23./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch%3A%3Alocator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin": - version: 5.3.0-beta - resolution: "typescript@patch:typescript@patch%3Atypescript@npm%253A5.3.0-beta%23./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch%3A%3Aversion=5.3.0-beta&hash=aba397&locator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin::version=5.3.0-beta&hash=29ae49" +"typescript@patch:typescript@patch%3Atypescript@npm%253A5.3.1-rc%23./.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch%3A%3Alocator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin": + version: 5.3.1-rc + resolution: "typescript@patch:typescript@patch%3Atypescript@npm%253A5.3.1-rc%23./.yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch%3A%3Aversion=5.3.1-rc&hash=7df256&locator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin::version=5.3.1-rc&hash=29ae49" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: d1ed47d2a7f35e4692c439bca41f0622be732f33927e59afe4af9c6640219a2f1cc7c4622852787a96c5300f2b88fb06bb46b5125ae8db2c080b0fad2f12ae98 + checksum: 2ed8bccd7f16441a04e25d252315b0280b4ba4de8ad7b2a9a8f0c8ad0eb01c4238628ba27e1f83f927b8ee56c447fc80286f9e5c30395c5ba5708ffb069f1f2f languageName: node linkType: hard