From 0ec7bc9d04e846580dd7fa2c189e91fb0ac30009 Mon Sep 17 00:00:00 2001 From: Rel1cx Date: Tue, 1 Apr 2025 03:33:53 +0800 Subject: [PATCH] refactor(kit): read JsxRuntimeOptions from 'parserServices.program' --- .../utilities/kit/docs/-internal-/README.md | 19 +- .../-internal-/enumerations/ModuleKind.md | 24 +- .../-internal-/enumerations/SyntaxKind.md | 12 +- .../interfaces/ExpressionStatement-1.md | 2 +- .../-internal-/interfaces/FlowContainer.md | 2 +- .../JsonObjectExpressionStatement.md | 2 +- .../kit/docs/-internal-/interfaces/Node.md | 4 +- .../docs/-internal-/interfaces/Statement.md | 2 +- .../namespaces/CompilerOptions/README.md | 28 - .../type-aliases/FallbackPolling.md | 9 - .../type-aliases/IgnoreDeprecations.md | 9 - .../type-aliases/ImportsNotUsedAsValues.md | 9 - .../CompilerOptions/type-aliases/Lib.md | 9 - .../CompilerOptions/type-aliases/Module.md | 9 - .../type-aliases/ModuleDetection.md | 9 - .../type-aliases/ModuleResolution.md | 9 - .../CompilerOptions/type-aliases/NewLine.md | 9 - .../CompilerOptions/type-aliases/Plugin.md | 17 - .../CompilerOptions/type-aliases/Target.md | 9 - .../type-aliases/WatchDirectory.md | 9 - .../CompilerOptions/type-aliases/WatchFile.md | 9 - .../type-aliases/CompilerOptions.md | 1593 ----------------- .../kit/docs/-internal-/type-aliases/JSX.md | 9 - .../-internal-/type-aliases/ResolutionMode.md | 2 +- .../namespaces/JsxRuntime/README.md | 4 - .../getJsxRuntimeOptionsFromContext.md | 30 +- .../type-aliases/JsxRuntimeOptions.md | 2 +- .../variables/defaultJsxRuntimeOptions.md | 31 - packages/utilities/kit/package.json | 1 - .../kit/src/JsxRuntime/JsxRuntimeOptions.ts | 34 +- pnpm-lock.yaml | 3 - 31 files changed, 72 insertions(+), 1848 deletions(-) delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/README.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/FallbackPolling.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/IgnoreDeprecations.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ImportsNotUsedAsValues.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Lib.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Module.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleDetection.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleResolution.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/NewLine.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Plugin.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Target.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchDirectory.md delete mode 100644 packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchFile.md delete mode 100644 packages/utilities/kit/docs/-internal-/type-aliases/CompilerOptions.md delete mode 100644 packages/utilities/kit/docs/-internal-/type-aliases/JSX.md delete mode 100644 packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/variables/defaultJsxRuntimeOptions.md diff --git a/packages/utilities/kit/docs/-internal-/README.md b/packages/utilities/kit/docs/-internal-/README.md index d4703a6e8a..49ff885e86 100644 --- a/packages/utilities/kit/docs/-internal-/README.md +++ b/packages/utilities/kit/docs/-internal-/README.md @@ -8,7 +8,6 @@ ## Namespaces -- [CompilerOptions](namespaces/CompilerOptions/README.md) - [SourceCode](namespaces/SourceCode/README.md) ## Enumerations @@ -196,12 +195,6 @@ *** -### CommonJS - -> **CommonJS**: `1` - -*** - ### ConditionalExpression > **ConditionalExpression**: `"ConditionalExpression"` @@ -250,21 +243,21 @@ *** -### ESNext +### ExportAllDeclaration -> **ESNext**: `99` +> **ExportAllDeclaration**: `"ExportAllDeclaration"` *** -### ExportAllDeclaration +### ExpressionStatement -> **ExportAllDeclaration**: `"ExportAllDeclaration"` +> **ExpressionStatement**: `"ExpressionStatement"` *** ### ExpressionStatement -> **ExpressionStatement**: `"ExpressionStatement"` +> **ExpressionStatement**: `244` *** @@ -1720,7 +1713,6 @@ - [ClassLikeDeclaration](type-aliases/ClassLikeDeclaration.md) - [ColonToken](type-aliases/ColonToken.md) - [Comment](type-aliases/Comment.md) -- [CompilerOptions](type-aliases/CompilerOptions.md) - [CompilerOptionsValue](type-aliases/CompilerOptionsValue.md) - [CompoundAssignmentOperator](type-aliases/CompoundAssignmentOperator.md) - [ConciseBody](type-aliases/ConciseBody.md) @@ -1778,7 +1770,6 @@ - [JSDocNamespaceBody](type-aliases/JSDocNamespaceBody.md) - [JSDocParsingMode](type-aliases/JSDocParsingMode.md) - [JsonObjectExpression](type-aliases/JsonObjectExpression.md) -- [JSX](type-aliases/JSX.md) - [JsxAttributeLike](type-aliases/JsxAttributeLike.md) - [JsxAttributeName](type-aliases/JsxAttributeName.md) - [JsxAttributeValue](type-aliases/JsxAttributeValue.md) diff --git a/packages/utilities/kit/docs/-internal-/enumerations/ModuleKind.md b/packages/utilities/kit/docs/-internal-/enumerations/ModuleKind.md index d0e862fff9..d2d206e726 100644 --- a/packages/utilities/kit/docs/-internal-/enumerations/ModuleKind.md +++ b/packages/utilities/kit/docs/-internal-/enumerations/ModuleKind.md @@ -14,6 +14,12 @@ *** +### CommonJS + +> **CommonJS**: `1` + +*** + ### ES2015 > **ES2015**: `5` @@ -32,6 +38,12 @@ *** +### ESNext + +> **ESNext**: `99` + +*** + ### Node16 > **Node16**: `100` @@ -71,15 +83,3 @@ ### UMD > **UMD**: `3` - -## References - -### CommonJS - -Re-exports [CommonJS](../README.md#commonjs) - -*** - -### ESNext - -Re-exports [ESNext](../README.md#esnext) diff --git a/packages/utilities/kit/docs/-internal-/enumerations/SyntaxKind.md b/packages/utilities/kit/docs/-internal-/enumerations/SyntaxKind.md index 3e45d18a97..1a05cfc494 100644 --- a/packages/utilities/kit/docs/-internal-/enumerations/SyntaxKind.md +++ b/packages/utilities/kit/docs/-internal-/enumerations/SyntaxKind.md @@ -608,12 +608,6 @@ Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSub *** -### ExpressionStatement - -> **ExpressionStatement**: `244` - -*** - ### ExpressionWithTypeArguments > **ExpressionWithTypeArguments**: `233` @@ -2368,6 +2362,12 @@ Re-exports [EndOfFileToken](../README.md#endoffiletoken) *** +### ExpressionStatement + +Re-exports [ExpressionStatement](../README.md#expressionstatement-1) + +*** + ### SourceFile Re-exports [SourceFile](../README.md#sourcefile) diff --git a/packages/utilities/kit/docs/-internal-/interfaces/ExpressionStatement-1.md b/packages/utilities/kit/docs/-internal-/interfaces/ExpressionStatement-1.md index 18fa8a99e6..4aeb5d4b55 100644 --- a/packages/utilities/kit/docs/-internal-/interfaces/ExpressionStatement-1.md +++ b/packages/utilities/kit/docs/-internal-/interfaces/ExpressionStatement-1.md @@ -74,7 +74,7 @@ ### kind -> `readonly` **kind**: [`ExpressionStatement`](../enumerations/SyntaxKind.md#expressionstatement) +> `readonly` **kind**: [`ExpressionStatement`](../README.md#expressionstatement-1) #### Overrides diff --git a/packages/utilities/kit/docs/-internal-/interfaces/FlowContainer.md b/packages/utilities/kit/docs/-internal-/interfaces/FlowContainer.md index 29af0714fe..33c655e3b6 100644 --- a/packages/utilities/kit/docs/-internal-/interfaces/FlowContainer.md +++ b/packages/utilities/kit/docs/-internal-/interfaces/FlowContainer.md @@ -12,6 +12,7 @@ ## Extended by +- [`ExpressionStatement`](ExpressionStatement-1.md) - [`Identifier`](Identifier-1.md) - [`ElementAccessExpression`](ElementAccessExpression.md) - [`PropertyAccessExpression`](PropertyAccessExpression.md) @@ -22,7 +23,6 @@ - [`ContinueStatement`](ContinueStatement-1.md) - [`DebuggerStatement`](DebuggerStatement-1.md) - [`DoStatement`](DoStatement.md) -- [`ExpressionStatement`](ExpressionStatement-1.md) - [`ForInStatement`](ForInStatement-1.md) - [`ForOfStatement`](ForOfStatement-1.md) - [`ForStatement`](ForStatement-1.md) diff --git a/packages/utilities/kit/docs/-internal-/interfaces/JsonObjectExpressionStatement.md b/packages/utilities/kit/docs/-internal-/interfaces/JsonObjectExpressionStatement.md index c27309e21c..3b1822abda 100644 --- a/packages/utilities/kit/docs/-internal-/interfaces/JsonObjectExpressionStatement.md +++ b/packages/utilities/kit/docs/-internal-/interfaces/JsonObjectExpressionStatement.md @@ -74,7 +74,7 @@ ### kind -> `readonly` **kind**: [`ExpressionStatement`](../enumerations/SyntaxKind.md#expressionstatement) +> `readonly` **kind**: [`ExpressionStatement`](../README.md#expressionstatement-1) #### Inherited from diff --git a/packages/utilities/kit/docs/-internal-/interfaces/Node.md b/packages/utilities/kit/docs/-internal-/interfaces/Node.md index 2d6c780005..e91f10b367 100644 --- a/packages/utilities/kit/docs/-internal-/interfaces/Node.md +++ b/packages/utilities/kit/docs/-internal-/interfaces/Node.md @@ -12,10 +12,10 @@ ## Extended by +- [`Token`](Token.md) - [`Declaration`](Declaration.md) - [`LocalsContainer`](LocalsContainer.md) - [`Statement`](Statement.md) -- [`Token`](Token.md) - [`Bundle`](Bundle.md) - [`TypeNode`](TypeNode.md) - [`Expression`](Expression.md) @@ -37,8 +37,8 @@ - [`ObjectBindingPattern`](ObjectBindingPattern.md) - [`TemplateSpan`](TemplateSpan.md) - [`VariableDeclarationList`](VariableDeclarationList.md) -- [`JSDocContainer`](JSDocContainer.md) - [`FlowContainer`](FlowContainer.md) +- [`JSDocContainer`](JSDocContainer.md) - [`ImportTypeAssertionContainer`](ImportTypeAssertionContainer.md) - [`JSDocTag`](JSDocTag.md) - [`LiteralLikeNode`](LiteralLikeNode.md) diff --git a/packages/utilities/kit/docs/-internal-/interfaces/Statement.md b/packages/utilities/kit/docs/-internal-/interfaces/Statement.md index 6ae0278b31..b674e5da30 100644 --- a/packages/utilities/kit/docs/-internal-/interfaces/Statement.md +++ b/packages/utilities/kit/docs/-internal-/interfaces/Statement.md @@ -12,12 +12,12 @@ ## Extended by +- [`ExpressionStatement`](ExpressionStatement-1.md) - [`Block`](Block.md) - [`BreakStatement`](BreakStatement-1.md) - [`ContinueStatement`](ContinueStatement-1.md) - [`DebuggerStatement`](DebuggerStatement-1.md) - [`EmptyStatement`](EmptyStatement-1.md) -- [`ExpressionStatement`](ExpressionStatement-1.md) - [`IfStatement`](IfStatement-1.md) - [`ImportDeclaration`](ImportDeclaration-1.md) - [`LabeledStatement`](LabeledStatement-1.md) diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/README.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/README.md deleted file mode 100644 index 54b7b34fe9..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/README.md +++ /dev/null @@ -1,28 +0,0 @@ -[**@eslint-react/kit**](../../../README.md) - -*** - -[@eslint-react/kit](../../../README.md) / [\](../../README.md) / CompilerOptions - -# CompilerOptions - -## Type Aliases - -- [FallbackPolling](type-aliases/FallbackPolling.md) -- [IgnoreDeprecations](type-aliases/IgnoreDeprecations.md) -- [ImportsNotUsedAsValues](type-aliases/ImportsNotUsedAsValues.md) -- [Lib](type-aliases/Lib.md) -- [Module](type-aliases/Module.md) -- [ModuleDetection](type-aliases/ModuleDetection.md) -- [ModuleResolution](type-aliases/ModuleResolution.md) -- [NewLine](type-aliases/NewLine.md) -- [Plugin](type-aliases/Plugin.md) -- [Target](type-aliases/Target.md) -- [WatchDirectory](type-aliases/WatchDirectory.md) -- [WatchFile](type-aliases/WatchFile.md) - -## References - -### JSX - -Re-exports [JSX](../../type-aliases/JSX.md) diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/FallbackPolling.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/FallbackPolling.md deleted file mode 100644 index beaa362410..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/FallbackPolling.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / FallbackPolling - -# Type Alias: FallbackPolling - -> **FallbackPolling** = `"fixedPollingInterval"` \| `"priorityPollingInterval"` \| `"dynamicPriorityPolling"` \| `"fixedInterval"` \| `"priorityInterval"` \| `"dynamicPriority"` \| `"fixedChunkSize"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/IgnoreDeprecations.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/IgnoreDeprecations.md deleted file mode 100644 index 8d0238af90..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/IgnoreDeprecations.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / IgnoreDeprecations - -# Type Alias: IgnoreDeprecations - -> **IgnoreDeprecations** = `"5.0"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ImportsNotUsedAsValues.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ImportsNotUsedAsValues.md deleted file mode 100644 index 6b2bf20838..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ImportsNotUsedAsValues.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / ImportsNotUsedAsValues - -# Type Alias: ImportsNotUsedAsValues - -> **ImportsNotUsedAsValues** = `"remove"` \| `"preserve"` \| `"error"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Lib.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Lib.md deleted file mode 100644 index e989f5d12f..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Lib.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / Lib - -# Type Alias: Lib - -> **Lib** = `"ES5"` \| `"ES6"` \| `"ES7"` \| `"ES2015"` \| `"ES2015.Collection"` \| `"ES2015.Core"` \| `"ES2015.Generator"` \| `"ES2015.Iterable"` \| `"ES2015.Promise"` \| `"ES2015.Proxy"` \| `"ES2015.Reflect"` \| `"ES2015.Symbol.WellKnown"` \| `"ES2015.Symbol"` \| `"ES2016"` \| `"ES2016.Array.Include"` \| `"ES2017"` \| `"ES2017.ArrayBuffer"` \| `"ES2017.Date"` \| `"ES2017.Intl"` \| `"ES2017.Object"` \| `"ES2017.SharedMemory"` \| `"ES2017.String"` \| `"ES2017.TypedArrays"` \| `"ES2018"` \| `"ES2018.AsyncGenerator"` \| `"ES2018.AsyncIterable"` \| `"ES2018.Intl"` \| `"ES2018.Promise"` \| `"ES2018.Regexp"` \| `"ES2019"` \| `"ES2019.Array"` \| `"ES2019.Object"` \| `"ES2019.String"` \| `"ES2019.Symbol"` \| `"ES2020"` \| `"ES2020.BigInt"` \| `"ES2020.Promise"` \| `"ES2020.String"` \| `"ES2020.Symbol.WellKnown"` \| `"ES2020.SharedMemory"` \| `"ES2020.Intl"` \| `"ES2021"` \| `"ES2021.Intl"` \| `"ES2021.Promise"` \| `"ES2021.String"` \| `"ES2021.WeakRef"` \| `"ES2022"` \| `"ES2022.Array"` \| `"ES2022.Error"` \| `"ES2022.Intl"` \| `"ES2022.Object"` \| `"ES2022.RegExp"` \| `"ES2022.String"` \| `"ES2023"` \| `"ES2023.Array"` \| `"ES2023.Collection"` \| `"ES2023.Intl"` \| `"ES2024"` \| `"ES2024.ArrayBuffer"` \| `"ES2024.Collection"` \| `"ES2024.Object"` \| `"ES2024.Promise"` \| `"ES2024.Regexp"` \| `"ES2024.SharedMemory"` \| `"ES2024.String"` \| `"ESNext"` \| `"ESNext.Array"` \| `"ESNext.AsyncIterable"` \| `"ESNext.BigInt"` \| `"ESNext.Collection"` \| `"ESNext.Decorators"` \| `"ESNext.Disposable"` \| `"ESNext.Intl"` \| `"ESNext.Iterator"` \| `"ESNext.Promise"` \| `"ESNext.String"` \| `"ESNext.Symbol"` \| `"ESNext.WeakRef"` \| `"DOM"` \| `"DOM.Iterable"` \| `"ScriptHost"` \| `"WebWorker"` \| `"WebWorker.AsyncIterable"` \| `"WebWorker.ImportScripts"` \| `"WebWorker.Iterable"` \| `"es5"` \| `"es6"` \| `"es7"` \| `"es2015"` \| `"es2015.collection"` \| `"es2015.core"` \| `"es2015.generator"` \| `"es2015.iterable"` \| `"es2015.promise"` \| `"es2015.proxy"` \| `"es2015.reflect"` \| `"es2015.symbol.wellknown"` \| `"es2015.symbol"` \| `"es2016"` \| `"es2016.array.include"` \| `"es2017"` \| `"es2017.arraybuffer"` \| `"es2017.date"` \| `"es2017.intl"` \| `"es2017.object"` \| `"es2017.sharedmemory"` \| `"es2017.string"` \| `"es2017.typedarrays"` \| `"es2018"` \| `"es2018.asyncgenerator"` \| `"es2018.asynciterable"` \| `"es2018.intl"` \| `"es2018.promise"` \| `"es2018.regexp"` \| `"es2019"` \| `"es2019.array"` \| `"es2019.object"` \| `"es2019.string"` \| `"es2019.symbol"` \| `"es2020"` \| `"es2020.bigint"` \| `"es2020.promise"` \| `"es2020.string"` \| `"es2020.symbol.wellknown"` \| `"es2020.sharedmemory"` \| `"es2020.intl"` \| `"es2021"` \| `"es2021.intl"` \| `"es2021.promise"` \| `"es2021.string"` \| `"es2021.weakref"` \| `"es2022"` \| `"es2022.array"` \| `"es2022.error"` \| `"es2022.intl"` \| `"es2022.object"` \| `"es2022.regexp"` \| `"es2022.string"` \| `"es2023"` \| `"es2023.array"` \| `"es2023.collection"` \| `"es2023.intl"` \| `"es2024"` \| `"es2024.arraybuffer"` \| `"es2024.collection"` \| `"es2024.object"` \| `"es2024.promise"` \| `"es2024.regexp"` \| `"es2024.sharedmemory"` \| `"es2024.string"` \| `"esnext"` \| `"esnext.array"` \| `"esnext.asynciterable"` \| `"esnext.bigint"` \| `"esnext.collection"` \| `"esnext.decorators"` \| `"esnext.disposable"` \| `"esnext.intl"` \| `"esnext.iterator"` \| `"esnext.promise"` \| `"esnext.string"` \| `"esnext.symbol"` \| `"esnext.weakref"` \| `"dom"` \| `"dom.iterable"` \| `"scripthost"` \| `"webworker"` \| `"webworker.asynciterable"` \| `"webworker.importscripts"` \| `"webworker.iterable"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Module.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Module.md deleted file mode 100644 index ab57faa755..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Module.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / Module - -# Type Alias: Module - -> **Module** = `"CommonJS"` \| `"AMD"` \| `"System"` \| `"UMD"` \| `"ES6"` \| `"ES2015"` \| `"ES2020"` \| `"ES2022"` \| `"ESNext"` \| `"Node16"` \| `"NodeNext"` \| `"Preserve"` \| `"None"` \| `"commonjs"` \| `"amd"` \| `"system"` \| `"umd"` \| `"es6"` \| `"es2015"` \| `"es2020"` \| `"es2022"` \| `"esnext"` \| `"node16"` \| `"nodenext"` \| `"preserve"` \| `"none"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleDetection.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleDetection.md deleted file mode 100644 index d79be88496..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleDetection.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / ModuleDetection - -# Type Alias: ModuleDetection - -> **ModuleDetection** = `"auto"` \| `"legacy"` \| `"force"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleResolution.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleResolution.md deleted file mode 100644 index e9a25db412..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/ModuleResolution.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / ModuleResolution - -# Type Alias: ModuleResolution - -> **ModuleResolution** = `"classic"` \| `"node"` \| `"node10"` \| `"node16"` \| `"nodenext"` \| `"bundler"` \| `"Classic"` \| `"Node"` \| `"Node10"` \| `"Node16"` \| `"NodeNext"` \| `"Bundler"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/NewLine.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/NewLine.md deleted file mode 100644 index d0b0fc0045..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/NewLine.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / NewLine - -# Type Alias: NewLine - -> **NewLine** = `"CRLF"` \| `"LF"` \| `"crlf"` \| `"lf"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Plugin.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Plugin.md deleted file mode 100644 index cbee0651a2..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Plugin.md +++ /dev/null @@ -1,17 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / Plugin - -# Type Alias: Plugin - -> **Plugin** = `object` - -## Properties - -### name - -> **name**: `string` - -Plugin name. diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Target.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Target.md deleted file mode 100644 index e55403bd81..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/Target.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / Target - -# Type Alias: Target - -> **Target** = `"ES3"` \| `"ES5"` \| `"ES6"` \| `"ES2015"` \| `"ES2016"` \| `"ES2017"` \| `"ES2018"` \| `"ES2019"` \| `"ES2020"` \| `"ES2021"` \| `"ES2022"` \| `"ES2023"` \| `"ES2024"` \| `"ESNext"` \| `"es3"` \| `"es5"` \| `"es6"` \| `"es2015"` \| `"es2016"` \| `"es2017"` \| `"es2018"` \| `"es2019"` \| `"es2020"` \| `"es2021"` \| `"es2022"` \| `"es2023"` \| `"es2024"` \| `"esnext"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchDirectory.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchDirectory.md deleted file mode 100644 index fb25772313..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchDirectory.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / WatchDirectory - -# Type Alias: WatchDirectory - -> **WatchDirectory** = `"useFsEvents"` \| `"fixedPollingInterval"` \| `"dynamicPriorityPolling"` \| `"fixedChunkSizePolling"` diff --git a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchFile.md b/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchFile.md deleted file mode 100644 index 0744d4d475..0000000000 --- a/packages/utilities/kit/docs/-internal-/namespaces/CompilerOptions/type-aliases/WatchFile.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [\](../../../README.md) / [CompilerOptions](../README.md) / WatchFile - -# Type Alias: WatchFile - -> **WatchFile** = `"fixedPollingInterval"` \| `"priorityPollingInterval"` \| `"dynamicPriorityPolling"` \| `"useFsEvents"` \| `"useFsEventsOnParentDirectory"` \| `"fixedChunkSizePolling"` diff --git a/packages/utilities/kit/docs/-internal-/type-aliases/CompilerOptions.md b/packages/utilities/kit/docs/-internal-/type-aliases/CompilerOptions.md deleted file mode 100644 index f18e00c177..0000000000 --- a/packages/utilities/kit/docs/-internal-/type-aliases/CompilerOptions.md +++ /dev/null @@ -1,1593 +0,0 @@ -[**@eslint-react/kit**](../../README.md) - -*** - -[@eslint-react/kit](../../README.md) / [\](../README.md) / CompilerOptions - -# Type Alias: CompilerOptions - -> **CompilerOptions** = `object` - -## Properties - -### allowArbitraryExtensions? - -> `optional` **allowArbitraryExtensions**: `boolean` - -Suppress errors for file formats that TypeScript does not understand. - -#### Default - -```ts -false -``` - -*** - -### allowImportingTsExtensions? - -> `optional` **allowImportingTsExtensions**: `boolean` - -Allows TypeScript files to import each other with a TypeScript-specific extension like .ts, .mts, or .tsx. - -#### Default - -```ts -false -``` - -*** - -### allowJs? - -> `optional` **allowJs**: `boolean` - -Allow javascript files to be compiled. - -#### Default - -```ts -false -``` - -*** - -### allowSyntheticDefaultImports? - -> `optional` **allowSyntheticDefaultImports**: `boolean` - -Allow default imports from modules with no default export. This does not affect code emit, just typechecking. - -#### Default - -```ts -module === 'system' || esModuleInterop -``` - -*** - -### allowUmdGlobalAccess? - -> `optional` **allowUmdGlobalAccess**: `boolean` - -Allow accessing UMD globals from modules. - -#### Default - -```ts -false -``` - -*** - -### allowUnreachableCode? - -> `optional` **allowUnreachableCode**: `boolean` - -Do not report errors on unreachable code. - -#### Default - -```ts -false -``` - -*** - -### allowUnusedLabels? - -> `optional` **allowUnusedLabels**: `boolean` - -Do not report errors on unused labels. - -#### Default - -```ts -false -``` - -*** - -### alwaysStrict? - -> `optional` **alwaysStrict**: `boolean` - -Parse in strict mode and emit `'use strict'` for each source file. - -#### Default - -```ts -false -``` - -*** - -### assumeChangesOnlyAffectDirectDependencies? - -> `optional` **assumeChangesOnlyAffectDirectDependencies**: `boolean` - -Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it. - -#### Default - -```ts -false -``` - -*** - -### baseUrl? - -> `optional` **baseUrl**: `string` - -Base directory to resolve non-relative module names. - -*** - -### ~~charset?~~ - -> `optional` **charset**: `string` - -The character set of the input files. - -#### Default - -```ts -'utf8' -``` - -#### Deprecated - -This option will be removed in TypeScript 5.5. - -*** - -### checkJs? - -> `optional` **checkJs**: `boolean` - -Report errors in `.js` files. - -#### Default - -```ts -false -``` - -*** - -### composite? - -> `optional` **composite**: `boolean` - -Enables building for project references. - -#### Default - -```ts -true -``` - -*** - -### customConditions? - -> `optional` **customConditions**: `string`[] - -List of additional conditions that should succeed when TypeScript resolves from package.json. - -*** - -### declaration? - -> `optional` **declaration**: `boolean` - -Generates corresponding d.ts files. - -#### Default - -```ts -false -``` - -*** - -### declarationDir? - -> `optional` **declarationDir**: `string` - -Specify output directory for generated declaration files. - -*** - -### declarationMap? - -> `optional` **declarationMap**: `boolean` - -Generates a sourcemap for each corresponding `.d.ts` file. - -#### Default - -```ts -false -``` - -*** - -### diagnostics? - -> `optional` **diagnostics**: `boolean` - -Show diagnostic information. - -#### Default - -```ts -false -``` - -*** - -### disableReferencedProjectLoad? - -> `optional` **disableReferencedProjectLoad**: `boolean` - -Reduce the number of projects loaded automatically by TypeScript. - -#### Default - -```ts -false -``` - -*** - -### disableSizeLimit? - -> `optional` **disableSizeLimit**: `boolean` - -Disable size limit for JavaScript project. - -#### Default - -```ts -false -``` - -*** - -### disableSolutionSearching? - -> `optional` **disableSolutionSearching**: `boolean` - -Opt a project out of multi-project reference checking when editing. - -#### Default - -```ts -false -``` - -*** - -### disableSourceOfProjectReferenceRedirect? - -> `optional` **disableSourceOfProjectReferenceRedirect**: `boolean` - -Disable preferring source files instead of declaration files when referencing composite projects. - -#### Default - -```ts -true if composite, false otherwise -``` - -*** - -### downlevelIteration? - -> `optional` **downlevelIteration**: `boolean` - -Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`. - -#### Default - -```ts -false -``` - -*** - -### emitBOM? - -> `optional` **emitBOM**: `boolean` - -Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. - -#### Default - -```ts -false -``` - -*** - -### emitDeclarationOnly? - -> `optional` **emitDeclarationOnly**: `boolean` - -Only emit `.d.ts` declaration files. - -#### Default - -```ts -false -``` - -*** - -### emitDecoratorMetadata? - -> `optional` **emitDecoratorMetadata**: `boolean` - -Emit design-type metadata for decorated declarations in source. - -#### Default - -```ts -false -``` - -*** - -### esModuleInterop? - -> `optional` **esModuleInterop**: `boolean` - -Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility. - -#### Default - -```ts -false -``` - -*** - -### exactOptionalPropertyTypes? - -> `optional` **exactOptionalPropertyTypes**: `boolean` - -Differentiate between undefined and not present when type checking. - -#### Default - -```ts -false -``` - -*** - -### experimentalDecorators? - -> `optional` **experimentalDecorators**: `boolean` - -Enables experimental support for ES7 decorators. - -#### Default - -```ts -false -``` - -*** - -### explainFiles? - -> `optional` **explainFiles**: `boolean` - -Print names of files which TypeScript sees as a part of your project and the reason they are part of the compilation. - -#### Default - -```ts -false -``` - -*** - -### extendedDiagnostics? - -> `optional` **extendedDiagnostics**: `boolean` - -Output more detailed compiler performance information after building. - -#### Default - -```ts -false -``` - -*** - -### ~~fallbackPolling?~~ - -> `optional` **fallbackPolling**: [`FallbackPolling`](../namespaces/CompilerOptions/type-aliases/FallbackPolling.md) - -Specify the polling strategy to use when the system runs out of or doesn't support native file watchers. - -#### Deprecated - -Use watchOptions.fallbackPolling instead. - -*** - -### forceConsistentCasingInFileNames? - -> `optional` **forceConsistentCasingInFileNames**: `boolean` - -Disallow inconsistently-cased references to the same file. - -#### Default - -```ts -true -``` - -*** - -### generateCpuProfile? - -> `optional` **generateCpuProfile**: `string` - -Emit a v8 CPU profile of the compiler run for debugging. - -#### Default - -```ts -'profile.cpuprofile' -``` - -*** - -### generateTrace? - -> `optional` **generateTrace**: `boolean` - -Generates an event trace and a list of types. - -*** - -### ignoreDeprecations? - -> `optional` **ignoreDeprecations**: [`IgnoreDeprecations`](../namespaces/CompilerOptions/type-aliases/IgnoreDeprecations.md) - -Suppress deprecation warnings - -*** - -### importHelpers? - -> `optional` **importHelpers**: `boolean` - -Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib. - -#### Default - -```ts -false -``` - -*** - -### ~~importsNotUsedAsValues?~~ - -> `optional` **importsNotUsedAsValues**: [`ImportsNotUsedAsValues`](../namespaces/CompilerOptions/type-aliases/ImportsNotUsedAsValues.md) - -Specify emit/checking behavior for imports that are only used for types. - -#### Default - -```ts -'remove' -``` - -#### Deprecated - -Use `verbatimModuleSyntax` instead. - -*** - -### incremental? - -> `optional` **incremental**: `boolean` - -Enable incremental compilation. - -#### Default - -`composite` - -*** - -### inlineSourceMap? - -> `optional` **inlineSourceMap**: `boolean` - -Emit a single file with source maps instead of having a separate file. - -#### Default - -```ts -false -``` - -*** - -### inlineSources? - -> `optional` **inlineSources**: `boolean` - -Emit the source alongside the sourcemaps within a single file. - -Requires `--inlineSourceMap` to be set. - -#### Default - -```ts -false -``` - -*** - -### isolatedDeclarations? - -> `optional` **isolatedDeclarations**: `boolean` - -Require sufficient annotation on exports so other tools can trivially generate declaration files. - -#### Default - -```ts -false -``` - -*** - -### isolatedModules? - -> `optional` **isolatedModules**: `boolean` - -Unconditionally emit imports for unresolved files. - -#### Default - -```ts -false -``` - -*** - -### jsx? - -> `optional` **jsx**: [`JSX`](JSX.md) - -Specify what JSX code is generated. - -#### Default - -```ts -'preserve' -``` - -*** - -### jsxFactory? - -> `optional` **jsxFactory**: `string` - -Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`. - -#### Default - -```ts -'React.createElement' -``` - -*** - -### jsxFragmentFactory? - -> `optional` **jsxFragmentFactory**: `string` - -Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. - -#### Default - -```ts -'React.Fragment' -``` - -*** - -### jsxImportSource? - -> `optional` **jsxImportSource**: `string` - -Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`. - -#### Default - -```ts -'react' -``` - -*** - -### ~~keyofStringsOnly?~~ - -> `optional` **keyofStringsOnly**: `boolean` - -Resolve `keyof` to string valued property names only (no numbers or symbols). - -#### Default - -```ts -false -``` - -#### Deprecated - -This option will be removed in TypeScript 5.5. - -*** - -### lib? - -> `optional` **lib**: [`Lib`](../namespaces/CompilerOptions/type-aliases/Lib.md)[] - -List of library files to be included in the compilation. - -*** - -### listEmittedFiles? - -> `optional` **listEmittedFiles**: `boolean` - -Enable to list all emitted files. - -#### Default - -```ts -false -``` - -*** - -### listFiles? - -> `optional` **listFiles**: `boolean` - -Print names of files part of the compilation. - -#### Default - -```ts -false -``` - -*** - -### listFilesOnly? - -> `optional` **listFilesOnly**: `boolean` - -Print names of files that are part of the compilation and then stop processing. - -#### Default - -```ts -false -``` - -*** - -### mapRoot? - -> `optional` **mapRoot**: `string` - -Specifies the location where debugger should locate map files instead of generated locations. - -*** - -### maxNodeModuleJsDepth? - -> `optional` **maxNodeModuleJsDepth**: `number` - -The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`. - -#### Default - -```ts -0 -``` - -*** - -### module? - -> `optional` **module**: [`Module`](../namespaces/CompilerOptions/type-aliases/Module.md) - -Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower. - -#### Default - -```ts -['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6' -``` - -*** - -### moduleDetection? - -> `optional` **moduleDetection**: [`ModuleDetection`](../namespaces/CompilerOptions/type-aliases/ModuleDetection.md) - -Control what method is used to detect module-format JS files. - -#### Default - -```ts -'auto' -``` - -*** - -### moduleResolution? - -> `optional` **moduleResolution**: [`ModuleResolution`](../namespaces/CompilerOptions/type-aliases/ModuleResolution.md) - -Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6). - -#### Default - -```ts -['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node' -``` - -*** - -### moduleSuffixes? - -> `optional` **moduleSuffixes**: `string`[] - -List of file name suffixes to search when resolving a module. - -*** - -### newLine? - -> `optional` **newLine**: [`NewLine`](../namespaces/CompilerOptions/type-aliases/NewLine.md) - -Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix). - -#### Default - -```ts -'LF' -``` - -*** - -### noCheck? - -> `optional` **noCheck**: `boolean` - -Disable full type checking (only critical parse and emit errors will be reported). - -#### Default - -```ts -false -``` - -*** - -### noEmit? - -> `optional` **noEmit**: `boolean` - -Do not emit output. - -#### Default - -```ts -false -``` - -*** - -### noEmitHelpers? - -> `optional` **noEmitHelpers**: `boolean` - -Do not generate custom helper functions like `__extends` in compiled output. - -#### Default - -```ts -false -``` - -*** - -### noEmitOnError? - -> `optional` **noEmitOnError**: `boolean` - -Do not emit outputs if any type checking errors were reported. - -#### Default - -```ts -false -``` - -*** - -### noErrorTruncation? - -> `optional` **noErrorTruncation**: `boolean` - -Do not truncate error messages. - -#### Default - -```ts -false -``` - -*** - -### noFallthroughCasesInSwitch? - -> `optional` **noFallthroughCasesInSwitch**: `boolean` - -Report errors for fallthrough cases in switch statement. - -#### Default - -```ts -false -``` - -*** - -### noImplicitAny? - -> `optional` **noImplicitAny**: `boolean` - -Warn on expressions and declarations with an implied 'any' type. - -#### Default - -```ts -false -``` - -*** - -### noImplicitOverride? - -> `optional` **noImplicitOverride**: `boolean` - -Ensure overriding members in derived classes are marked with an override modifier. - -#### Default - -```ts -false -``` - -*** - -### noImplicitReturns? - -> `optional` **noImplicitReturns**: `boolean` - -Report error when not all code paths in function return a value. - -#### Default - -```ts -false -``` - -*** - -### noImplicitThis? - -> `optional` **noImplicitThis**: `boolean` - -Raise error on 'this' expressions with an implied any type. - -#### Default - -```ts -false -``` - -*** - -### ~~noImplicitUseStrict?~~ - -> `optional` **noImplicitUseStrict**: `boolean` - -Do not emit `'use strict'` directives in module output. - -#### Default - -```ts -false -``` - -#### Deprecated - -This option will be removed in TypeScript 5.5. - -*** - -### noLib? - -> `optional` **noLib**: `boolean` - -Do not include the default library file (lib.d.ts). - -#### Default - -```ts -false -``` - -*** - -### noPropertyAccessFromIndexSignature? - -> `optional` **noPropertyAccessFromIndexSignature**: `boolean` - -Enforces using indexed accessors for keys declared using an indexed type. - -#### Default - -```ts -false -``` - -*** - -### noResolve? - -> `optional` **noResolve**: `boolean` - -Do not add triple-slash references or module import targets to the list of compiled files. - -#### Default - -```ts -false -``` - -*** - -### ~~noStrictGenericChecks?~~ - -> `optional` **noStrictGenericChecks**: `boolean` - -Disable strict checking of generic signatures in function types. - -#### Default - -```ts -false -``` - -#### Deprecated - -This option will be removed in TypeScript 5.5. - -*** - -### noUncheckedIndexedAccess? - -> `optional` **noUncheckedIndexedAccess**: `boolean` - -Add `undefined` to a type when accessed using an index. - -#### Default - -```ts -false -``` - -*** - -### noUncheckedSideEffectImports? - -> `optional` **noUncheckedSideEffectImports**: `boolean` - -Report error if failed to find a source file for a side effect import. - -#### Default - -```ts -false -``` - -*** - -### noUnusedLocals? - -> `optional` **noUnusedLocals**: `boolean` - -Report errors on unused locals. - -#### Default - -```ts -false -``` - -*** - -### noUnusedParameters? - -> `optional` **noUnusedParameters**: `boolean` - -Report errors on unused parameters. - -#### Default - -```ts -false -``` - -*** - -### outDir? - -> `optional` **outDir**: `string` - -Redirect output structure to the directory. - -*** - -### outFile? - -> `optional` **outFile**: `string` - -Concatenate and emit output to single file. - -*** - -### paths? - -> `optional` **paths**: [`Record`](Record.md)\<`string`, `string`[]\> - -Specify path mapping to be computed relative to baseUrl option. - -*** - -### plugins? - -> `optional` **plugins**: [`Plugin`](../namespaces/CompilerOptions/type-aliases/Plugin.md)[] - -List of TypeScript language server plugins to load. - -*** - -### preserveConstEnums? - -> `optional` **preserveConstEnums**: `boolean` - -Do not erase const enum declarations in generated code. - -#### Default - -```ts -false -``` - -*** - -### preserveSymlinks? - -> `optional` **preserveSymlinks**: `boolean` - -Do not resolve symlinks to their real path; treat a symlinked file like a real one. - -#### Default - -```ts -false -``` - -*** - -### ~~preserveValueImports?~~ - -> `optional` **preserveValueImports**: `boolean` - -Preserve unused imported values in the JavaScript output that would otherwise be removed. - -#### Default - -```ts -true -``` - -#### Deprecated - -Use `verbatimModuleSyntax` instead. - -*** - -### preserveWatchOutput? - -> `optional` **preserveWatchOutput**: `boolean` - -Keep outdated console output in watch mode instead of clearing the screen. - -#### Default - -```ts -false -``` - -*** - -### pretty? - -> `optional` **pretty**: `boolean` - -Stylize errors and messages using color and context (experimental). - -#### Default - -```ts -true // Unless piping to another program or redirecting output to a file. -``` - -*** - -### reactNamespace? - -> `optional` **reactNamespace**: `string` - -Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit. - -#### Default - -```ts -'React' -``` - -*** - -### removeComments? - -> `optional` **removeComments**: `boolean` - -Do not emit comments to output. - -#### Default - -```ts -false -``` - -*** - -### resolveJsonModule? - -> `optional` **resolveJsonModule**: `boolean` - -Include modules imported with `.json` extension. - -#### Default - -```ts -false -``` - -*** - -### resolvePackageJsonExports? - -> `optional` **resolvePackageJsonExports**: `boolean` - -Forces TypeScript to consult the exports field of package.json files if it ever reads from a package in node_modules. - -#### Default - -```ts -false -``` - -*** - -### resolvePackageJsonImports? - -> `optional` **resolvePackageJsonImports**: `boolean` - -Forces TypeScript to consult the imports field of package.json files when performing a lookup that starts with # from a file whose ancestor directory contains a package.json. - -#### Default - -```ts -false -``` - -*** - -### rootDir? - -> `optional` **rootDir**: `string` - -Specifies the root directory of input files. - -Use to control the output directory structure with `--outDir`. - -*** - -### rootDirs? - -> `optional` **rootDirs**: `string`[] - -Specify list of root directories to be used when resolving modules. - -*** - -### ~~skipDefaultLibCheck?~~ - -> `optional` **skipDefaultLibCheck**: `boolean` - -#### Deprecated - -use `skipLibCheck` instead. - -*** - -### skipLibCheck? - -> `optional` **skipLibCheck**: `boolean` - -Skip type checking of declaration files. - -#### Default - -```ts -false -``` - -*** - -### sourceMap? - -> `optional` **sourceMap**: `boolean` - -Generates corresponding '.map' file. - -#### Default - -```ts -false -``` - -*** - -### sourceRoot? - -> `optional` **sourceRoot**: `string` - -Specifies the location where debugger should locate TypeScript files instead of source locations. - -*** - -### strict? - -> `optional` **strict**: `boolean` - -Enable all strict type checking options. - -#### Default - -```ts -false -``` - -*** - -### strictBindCallApply? - -> `optional` **strictBindCallApply**: `boolean` - -Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions. - -#### Default - -```ts -false -``` - -*** - -### strictBuiltinIteratorReturn? - -> `optional` **strictBuiltinIteratorReturn**: `boolean` - -Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`. - -#### Default - -```ts -false -``` - -*** - -### strictFunctionTypes? - -> `optional` **strictFunctionTypes**: `boolean` - -Disable bivariant parameter checking for function types. - -#### Default - -```ts -false -``` - -*** - -### strictNullChecks? - -> `optional` **strictNullChecks**: `boolean` - -Enable strict null checks. - -#### Default - -```ts -false -``` - -*** - -### strictPropertyInitialization? - -> `optional` **strictPropertyInitialization**: `boolean` - -Ensure non-undefined class properties are initialized in the constructor. - -#### Default - -```ts -false -``` - -*** - -### stripInternal? - -> `optional` **stripInternal**: `boolean` - -Do not emit declarations for code that has an `@internal` annotation. - -*** - -### ~~suppressExcessPropertyErrors?~~ - -> `optional` **suppressExcessPropertyErrors**: `boolean` - -Suppress excess property checks for object literals. - -#### Default - -```ts -false -``` - -#### Deprecated - -This option will be removed in TypeScript 5.5. - -*** - -### ~~suppressImplicitAnyIndexErrors?~~ - -> `optional` **suppressImplicitAnyIndexErrors**: `boolean` - -Suppress noImplicitAny errors for indexing objects lacking index signatures. - -#### Default - -```ts -false -``` - -#### Deprecated - -This option will be removed in TypeScript 5.5. - -*** - -### target? - -> `optional` **target**: [`Target`](../namespaces/CompilerOptions/type-aliases/Target.md) - -Specify ECMAScript target version. - -#### Default - -```ts -'es3' -``` - -*** - -### traceResolution? - -> `optional` **traceResolution**: `boolean` - -Enable tracing of the name resolution process. - -#### Default - -```ts -false -``` - -*** - -### tsBuildInfoFile? - -> `optional` **tsBuildInfoFile**: `string` - -Specify file to store incremental compilation information. - -#### Default - -```ts -'.tsbuildinfo' -``` - -*** - -### typeRoots? - -> `optional` **typeRoots**: `string`[] - -Specify list of directories for type definition files to be included. - -*** - -### types? - -> `optional` **types**: `string`[] - -Type declaration files to be included in compilation. - -*** - -### useDefineForClassFields? - -> `optional` **useDefineForClassFields**: `boolean` - -Emit ECMAScript standard class fields. - -#### Default - -```ts -false -``` - -*** - -### useUnknownInCatchVariables? - -> `optional` **useUnknownInCatchVariables**: `boolean` - -Default catch clause variables as `unknown` instead of `any`. - -#### Default - -```ts -false -``` - -*** - -### verbatimModuleSyntax? - -> `optional` **verbatimModuleSyntax**: `boolean` - -Anything that uses the type modifier is dropped entirely. - -#### Default - -```ts -false -``` - -*** - -### ~~watch?~~ - -> `optional` **watch**: `boolean` - -Watch input files. - -#### Default - -```ts -false -``` - -#### Deprecated - -Use watchOptions instead. - -*** - -### ~~watchDirectory?~~ - -> `optional` **watchDirectory**: [`WatchDirectory`](../namespaces/CompilerOptions/type-aliases/WatchDirectory.md) - -Specify the strategy for watching directories under systems that lack recursive file-watching functionality. - -#### Default - -```ts -'useFsEvents' -``` - -#### Deprecated - -Use watchOptions.watchDirectory instead. - -*** - -### ~~watchFile?~~ - -> `optional` **watchFile**: [`WatchFile`](../namespaces/CompilerOptions/type-aliases/WatchFile.md) - -Specify the strategy for watching individual files. - -#### Default - -```ts -'useFsEvents' -``` - -#### Deprecated - -Use watchOptions.watchFile instead. diff --git a/packages/utilities/kit/docs/-internal-/type-aliases/JSX.md b/packages/utilities/kit/docs/-internal-/type-aliases/JSX.md deleted file mode 100644 index 1f1ad9d35f..0000000000 --- a/packages/utilities/kit/docs/-internal-/type-aliases/JSX.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@eslint-react/kit**](../../README.md) - -*** - -[@eslint-react/kit](../../README.md) / [\](../README.md) / JSX - -# Type Alias: JSX - -> **JSX** = `"preserve"` \| `"react"` \| `"react-jsx"` \| `"react-jsxdev"` \| `"react-native"` diff --git a/packages/utilities/kit/docs/-internal-/type-aliases/ResolutionMode.md b/packages/utilities/kit/docs/-internal-/type-aliases/ResolutionMode.md index fe6c42a885..6420d4284a 100644 --- a/packages/utilities/kit/docs/-internal-/type-aliases/ResolutionMode.md +++ b/packages/utilities/kit/docs/-internal-/type-aliases/ResolutionMode.md @@ -6,4 +6,4 @@ # Type Alias: ResolutionMode -> **ResolutionMode** = [`ESNext`](../README.md#esnext) \| [`CommonJS`](../README.md#commonjs) \| `undefined` +> **ResolutionMode** = [`ESNext`](../enumerations/ModuleKind.md#esnext) \| [`CommonJS`](../enumerations/ModuleKind.md#commonjs) \| `undefined` diff --git a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/README.md b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/README.md index df84ecba3f..ffc50efcfa 100644 --- a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/README.md +++ b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/README.md @@ -10,10 +10,6 @@ - [JsxRuntimeOptions](type-aliases/JsxRuntimeOptions.md) -## Variables - -- [defaultJsxRuntimeOptions](variables/defaultJsxRuntimeOptions.md) - ## Functions - [getJsxRuntimeOptionsFromContext](functions/getJsxRuntimeOptionsFromContext.md) diff --git a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/functions/getJsxRuntimeOptionsFromContext.md b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/functions/getJsxRuntimeOptionsFromContext.md index 057c82fdbd..a0bdb8d6a9 100644 --- a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/functions/getJsxRuntimeOptionsFromContext.md +++ b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/functions/getJsxRuntimeOptionsFromContext.md @@ -6,7 +6,9 @@ # Function: getJsxRuntimeOptionsFromContext() -> **getJsxRuntimeOptionsFromContext**(`context`): \{ `jsx`: `"react-jsx"`; `jsxFactory`: `"React.createElement"`; `jsxFragmentFactory`: `"React.Fragment"`; `jsxImportSource`: `"react"`; `reactNamespace`: `"React"`; \} \| \{ `jsx`: [`JSX`](../../../../-internal-/type-aliases/JSX.md); `jsxFactory`: `string`; `jsxFragmentFactory`: `string`; `jsxImportSource`: `string`; `reactNamespace`: `string`; \} +> **getJsxRuntimeOptionsFromContext**(`context`): `object` + +Get JsxRuntimeOptions from RuleContext ## Parameters @@ -14,6 +16,30 @@ [`RuleContext`](../../../../type-aliases/RuleContext.md) +The RuleContext + ## Returns -\{ `jsx`: `"react-jsx"`; `jsxFactory`: `"React.createElement"`; `jsxFragmentFactory`: `"React.Fragment"`; `jsxImportSource`: `"react"`; `reactNamespace`: `"React"`; \} \| \{ `jsx`: [`JSX`](../../../../-internal-/type-aliases/JSX.md); `jsxFactory`: `string`; `jsxFragmentFactory`: `string`; `jsxImportSource`: `string`; `reactNamespace`: `string`; \} +`object` + +JsxRuntimeOptions + +### jsx + +> **jsx**: [`JsxEmit`](../../../../-internal-/enumerations/JsxEmit.md) + +### jsxFactory + +> **jsxFactory**: `string` + +### jsxFragmentFactory + +> **jsxFragmentFactory**: `string` + +### jsxImportSource + +> **jsxImportSource**: `string` + +### reactNamespace + +> **reactNamespace**: `string` diff --git a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/type-aliases/JsxRuntimeOptions.md b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/type-aliases/JsxRuntimeOptions.md index 3c5651d736..9f5568a3fc 100644 --- a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/type-aliases/JsxRuntimeOptions.md +++ b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/type-aliases/JsxRuntimeOptions.md @@ -6,4 +6,4 @@ # Type Alias: JsxRuntimeOptions -> **JsxRuntimeOptions** = [`Pick`](../../../../-internal-/type-aliases/Pick.md)\<[`CompilerOptions`](../../../../-internal-/type-aliases/CompilerOptions.md), `"reactNamespace"` \| `"jsx"` \| `"jsxFactory"` \| `"jsxFragmentFactory"` \| `"jsxImportSource"`\> +> **JsxRuntimeOptions** = [`Pick`](../../../../-internal-/type-aliases/Pick.md)\<[`CompilerOptions`](../../../../-internal-/interfaces/CompilerOptions.md), `"reactNamespace"` \| `"jsx"` \| `"jsxFactory"` \| `"jsxFragmentFactory"` \| `"jsxImportSource"`\> diff --git a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/variables/defaultJsxRuntimeOptions.md b/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/variables/defaultJsxRuntimeOptions.md deleted file mode 100644 index a3acf13f2a..0000000000 --- a/packages/utilities/kit/docs/@eslint-react/namespaces/JsxRuntime/variables/defaultJsxRuntimeOptions.md +++ /dev/null @@ -1,31 +0,0 @@ -[**@eslint-react/kit**](../../../../README.md) - -*** - -[@eslint-react/kit](../../../../README.md) / [JsxRuntime](../README.md) / defaultJsxRuntimeOptions - -# Variable: defaultJsxRuntimeOptions - -> `const` **defaultJsxRuntimeOptions**: `object` - -## Type declaration - -### jsx - -> `readonly` **jsx**: `"react-jsx"` = `"react-jsx"` - -### jsxFactory - -> `readonly` **jsxFactory**: `"React.createElement"` = `"React.createElement"` - -### jsxFragmentFactory - -> `readonly` **jsxFragmentFactory**: `"React.Fragment"` = `"React.Fragment"` - -### jsxImportSource - -> `readonly` **jsxImportSource**: `"react"` = `"react"` - -### reactNamespace - -> `readonly` **reactNamespace**: `"React"` = `"React"` diff --git a/packages/utilities/kit/package.json b/packages/utilities/kit/package.json index e34b51e24a..1092c4b760 100644 --- a/packages/utilities/kit/package.json +++ b/packages/utilities/kit/package.json @@ -44,7 +44,6 @@ "dependencies": { "@eslint-react/eff": "workspace:*", "@typescript-eslint/utils": "^8.29.0", - "get-tsconfig": "^4.10.0", "ts-pattern": "^5.7.0" }, "devDependencies": { diff --git a/packages/utilities/kit/src/JsxRuntime/JsxRuntimeOptions.ts b/packages/utilities/kit/src/JsxRuntime/JsxRuntimeOptions.ts index 714bedd3b1..912d8137f3 100644 --- a/packages/utilities/kit/src/JsxRuntime/JsxRuntimeOptions.ts +++ b/packages/utilities/kit/src/JsxRuntime/JsxRuntimeOptions.ts @@ -1,8 +1,8 @@ import type { RuleContext } from "../Rule"; -import { getTsconfig, type TsConfigJson } from "get-tsconfig"; +import { type CompilerOptions, JsxEmit } from "typescript"; export type JsxRuntimeOptions = Pick< - TsConfigJson.CompilerOptions, + CompilerOptions, // Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit. | "reactNamespace" // Specifies what JSX code is generated. @@ -15,26 +15,18 @@ export type JsxRuntimeOptions = Pick< | "jsxImportSource" >; -export const defaultJsxRuntimeOptions = { - jsx: "react-jsx", - jsxFactory: "React.createElement", - jsxFragmentFactory: "React.Fragment", - jsxImportSource: "react", - reactNamespace: "React", -} as const satisfies JsxRuntimeOptions; - -const tsconfigCache = new Map(); - -// TODO: Add `jsconfig.json` support for JavaScript projects. +/** + * Get JsxRuntimeOptions from RuleContext + * @param context The RuleContext + * @returns JsxRuntimeOptions + */ export function getJsxRuntimeOptionsFromContext(context: RuleContext) { - const tsconfigResult = getTsconfig(context.cwd, "tsconfig.json", tsconfigCache); - const compilerOptions = tsconfigResult?.config.compilerOptions; - if (compilerOptions == null) return defaultJsxRuntimeOptions; + const options = context.sourceCode.parserServices?.program?.getCompilerOptions() ?? {}; return { - jsx: compilerOptions.jsx ?? defaultJsxRuntimeOptions.jsx, - jsxFactory: compilerOptions.jsxFactory ?? defaultJsxRuntimeOptions.jsxFactory, - jsxFragmentFactory: compilerOptions.jsxFragmentFactory ?? defaultJsxRuntimeOptions.jsxFragmentFactory, - jsxImportSource: compilerOptions.jsxImportSource ?? defaultJsxRuntimeOptions.jsxImportSource, - reactNamespace: compilerOptions.reactNamespace ?? defaultJsxRuntimeOptions.reactNamespace, + jsx: options.jsx ?? JsxEmit.ReactJSX, + jsxFactory: options.jsxFactory ?? "React.createElement", + jsxFragmentFactory: options.jsxFragmentFactory ?? "React.Fragment", + jsxImportSource: options.jsxImportSource ?? "react", + reactNamespace: options.reactNamespace ?? "React", }; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 81d432c3e2..f665fae8a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1287,9 +1287,6 @@ importers: '@typescript-eslint/utils': specifier: ^8.29.0 version: 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2) - get-tsconfig: - specifier: ^4.10.0 - version: 4.10.0 ts-pattern: specifier: ^5.7.0 version: 5.7.0