Skip to content

Commit 09cfb0d

Browse files
committed
feat(kit): add JsxRuntime module
1 parent bdd3756 commit 09cfb0d

File tree

34 files changed

+1994
-92
lines changed

34 files changed

+1994
-92
lines changed

packages/plugins/eslint-plugin-react-hooks-extra/src/utils/is-from-hook-call.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1-
import type { REACT_BUILD_IN_HOOKS, RuleContext } from "@eslint-react/kit";
1+
import type { RuleContext } from "@eslint-react/kit";
22
import type { ESLintReactSettingsNormalized } from "@eslint-react/shared";
33
import type { TSESTree } from "@typescript-eslint/types";
44
import * as ER from "@eslint-react/core";
55
import { constTrue } from "@eslint-react/eff";
66
import * as VAR from "@eslint-react/var";
77
import { AST_NODE_TYPES as T } from "@typescript-eslint/types";
88

9+
export const REACT_BUILD_IN_HOOKS = [
10+
"use",
11+
"useActionState",
12+
"useCallback",
13+
"useContext",
14+
"useDebugValue",
15+
"useDeferredValue",
16+
"useEffect",
17+
"useFormStatus",
18+
"useId",
19+
"useImperativeHandle",
20+
"useInsertionEffect",
21+
"useLayoutEffect",
22+
"useMemo",
23+
"useOptimistic",
24+
"useReducer",
25+
"useRef",
26+
"useState",
27+
"useSyncExternalStore",
28+
"useTransition",
29+
] as const;
30+
931
export function isFromHookCall(
1032
context: RuleContext,
1133
name: (typeof REACT_BUILD_IN_HOOKS)[number],

packages/utilities/kit/docs/-internal-/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
## Namespaces
1010

11+
- [CompilerOptions](namespaces/CompilerOptions/README.md)
1112
- [SourceCode](namespaces/SourceCode/README.md)
1213

1314
## Enumerations
@@ -1719,6 +1720,7 @@
17191720
- [ClassLikeDeclaration](type-aliases/ClassLikeDeclaration.md)
17201721
- [ColonToken](type-aliases/ColonToken.md)
17211722
- [Comment](type-aliases/Comment.md)
1723+
- [CompilerOptions](type-aliases/CompilerOptions.md)
17221724
- [CompilerOptionsValue](type-aliases/CompilerOptionsValue.md)
17231725
- [CompoundAssignmentOperator](type-aliases/CompoundAssignmentOperator.md)
17241726
- [ConciseBody](type-aliases/ConciseBody.md)
@@ -1776,6 +1778,7 @@
17761778
- [JSDocNamespaceBody](type-aliases/JSDocNamespaceBody.md)
17771779
- [JSDocParsingMode](type-aliases/JSDocParsingMode.md)
17781780
- [JsonObjectExpression](type-aliases/JsonObjectExpression.md)
1781+
- [JSX](type-aliases/JSX.md)
17791782
- [JsxAttributeLike](type-aliases/JsxAttributeLike.md)
17801783
- [JsxAttributeName](type-aliases/JsxAttributeName.md)
17811784
- [JsxAttributeValue](type-aliases/JsxAttributeValue.md)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[**@eslint-react/kit**](../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../README.md) / [\<internal\>](../../README.md) / CompilerOptions
6+
7+
# CompilerOptions
8+
9+
## Type Aliases
10+
11+
- [FallbackPolling](type-aliases/FallbackPolling.md)
12+
- [IgnoreDeprecations](type-aliases/IgnoreDeprecations.md)
13+
- [ImportsNotUsedAsValues](type-aliases/ImportsNotUsedAsValues.md)
14+
- [Lib](type-aliases/Lib.md)
15+
- [Module](type-aliases/Module.md)
16+
- [ModuleDetection](type-aliases/ModuleDetection.md)
17+
- [ModuleResolution](type-aliases/ModuleResolution.md)
18+
- [NewLine](type-aliases/NewLine.md)
19+
- [Plugin](type-aliases/Plugin.md)
20+
- [Target](type-aliases/Target.md)
21+
- [WatchDirectory](type-aliases/WatchDirectory.md)
22+
- [WatchFile](type-aliases/WatchFile.md)
23+
24+
## References
25+
26+
### JSX
27+
28+
Re-exports [JSX](../../type-aliases/JSX.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / FallbackPolling
6+
7+
# Type Alias: FallbackPolling
8+
9+
> **FallbackPolling** = `"fixedPollingInterval"` \| `"priorityPollingInterval"` \| `"dynamicPriorityPolling"` \| `"fixedInterval"` \| `"priorityInterval"` \| `"dynamicPriority"` \| `"fixedChunkSize"`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / IgnoreDeprecations
6+
7+
# Type Alias: IgnoreDeprecations
8+
9+
> **IgnoreDeprecations** = `"5.0"`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / ImportsNotUsedAsValues
6+
7+
# Type Alias: ImportsNotUsedAsValues
8+
9+
> **ImportsNotUsedAsValues** = `"remove"` \| `"preserve"` \| `"error"`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / Lib
6+
7+
# Type Alias: Lib
8+
9+
> **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"`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / Module
6+
7+
# Type Alias: Module
8+
9+
> **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"`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / ModuleDetection
6+
7+
# Type Alias: ModuleDetection
8+
9+
> **ModuleDetection** = `"auto"` \| `"legacy"` \| `"force"`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[**@eslint-react/kit**](../../../../README.md)
2+
3+
***
4+
5+
[@eslint-react/kit](../../../../README.md) / [\<internal\>](../../../README.md) / [CompilerOptions](../README.md) / ModuleResolution
6+
7+
# Type Alias: ModuleResolution
8+
9+
> **ModuleResolution** = `"classic"` \| `"node"` \| `"node10"` \| `"node16"` \| `"nodenext"` \| `"bundler"` \| `"Classic"` \| `"Node"` \| `"Node10"` \| `"Node16"` \| `"NodeNext"` \| `"Bundler"`

0 commit comments

Comments
 (0)