@r_masseater/oxlint-typed-rules 0.0.3 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # oxlint-typed-rules
2
+
3
+ 型情報を要る ESLint のルールを、oxlint の JS プラグインとして動かす。
4
+ oxlint の JS プラグインには型情報が渡らないので([oxc#19596](https://github.com/oxc-project/oxc/issues/19596))、
5
+ TypeScript 7 の API で Program と型検査器を作り、ルールが読む `parserServices` を用意する。
6
+ ESLint を入れずに、型情報を使うルールを oxlint だけで回せる。
7
+
8
+ ## 公開先
9
+
10
+ - npm: [@r_masseater/oxlint-typed-rules](https://www.npmjs.com/package/@r_masseater/oxlint-typed-rules)
11
+
12
+ ## 移植したルール
13
+
14
+ - `@r_masseater/oxlint-typed-rules/tanstack-start`
15
+ - [@tanstack/eslint-plugin-start][tanstack] の 2 ルール
16
+
17
+ [tanstack]: https://github.com/TanStack/router/tree/main/packages/eslint-plugin-start
18
+
19
+ 元のリポのテストを手を入れずに移植し、すべて同じ結果になることを確かめている。
20
+ TanStack Start の 2 ルールは、ファイルをまたぐと違反を取りこぼす点を直してある。
21
+
22
+ ## 使い方
23
+
24
+ ```sh
25
+ vp add -D @r_masseater/oxlint-typed-rules
26
+ ```
27
+
28
+ ```ts
29
+ import { defineConfig } from "vite-plus";
30
+
31
+ export default defineConfig({
32
+ lint: {
33
+ jsPlugins: [
34
+ {
35
+ name: "tanstack-start",
36
+ specifier: "@r_masseater/oxlint-typed-rules/tanstack-start",
37
+ },
38
+ ],
39
+ rules: {
40
+ "tanstack-start/no-client-code-in-server-component": "error",
41
+ "tanstack-start/no-async-client-component": "error",
42
+ },
43
+ },
44
+ });
45
+ ```
46
+
47
+ 検査するファイルを含む tsconfig の Program を、TypeScript 7(tsgo)の子プロセスに作らせる。
48
+ エディタの未保存の内容も、その中身で Program を作り直して検査する。
49
+
50
+ ## TypeScript 7 との変換層
51
+
52
+ 同梱したルールは TypeScript 6 の `ts` 名前空間と `Program`・`TypeChecker` を読む。
53
+ TypeScript 7.1 の `typescript/sync` は形が違う。
54
+ そこで、2 ルールが使う分だけを TypeScript 6 の形に見せる層を持つ。
55
+ この層は暫定である。
56
+ typescript-eslint の [#12803][tse-12803] が同じ層を持つので、
57
+ それが公開されたら乗り換える([#13][issue-13])。
58
+
59
+ [tse-12803]: https://github.com/typescript-eslint/typescript-eslint/pull/12803
60
+ [issue-13]: https://github.com/masseater/oxlint-typed-rules/issues/13
61
+
62
+ ## 性能
63
+
64
+ 同じルールを ESLint(typescript-eslint)で動かした場合と比べた。
65
+ 計測は 2026-11-03 に、次の条件で行った。
66
+
67
+ - 対象は [masseater.dev][masseater-dev] の `apps/portfolio/src`(238 ファイル)と、
68
+ personal-space の `apps/slides/src`(1,434 ファイル、5.2 万行)である
69
+ - oxlint の側は oxlint 1.90.0、oxlint-tsgolint 7.0.2005、TypeScript 7.1.0-beta で測った
70
+ - ESLint の側は ESLint 9.39.5、typescript-eslint 8.72.1(`projectService`)で測った
71
+ - `@tanstack/eslint-plugin-start` 0.1.0 が ESLint 10 に対応していないので、ESLint は 9 にした。
72
+ ESLint 側にも同じ patch を当て、両者が同じ違反を出すことを確かめた
73
+ - Node.js 26.13.0、4 コア、メモリ 16 GB の Linux で測った
74
+ - cold は OS のページキャッシュを捨ててからの 3 回の中央値である
75
+ - warm はページキャッシュの載った状態での 5 回の中央値で、ESLint の `--cache` は使っていない
76
+ - メモリは子プロセスの tsgo と tsgolint を含めた RSS の合計の最大値である
77
+
78
+ [masseater-dev]: https://github.com/masseater/masseater.dev
79
+
80
+ masseater.dev の `apps/portfolio/src` の結果は次のとおりである。
81
+
82
+ | ルールとツール | cold | warm | メモリ |
83
+ | ------------------------------------ | ------: | ------: | -------: |
84
+ | ルール無し・oxlint | 0.11 秒 | 0.06 秒 | 99 MB |
85
+ | ルール無し・ESLint | 6.29 秒 | 5.93 秒 | 1,288 MB |
86
+ | TanStack の 2 ルール・このパッケージ | 1.90 秒 | 1.61 秒 | 769 MB |
87
+ | TanStack の 2 ルール・ESLint | 6.76 秒 | 5.75 秒 | 1,324 MB |
88
+ | `no-floating-promises`・tsgolint | 1.22 秒 | 1.03 秒 | 796 MB |
89
+ | `no-floating-promises`・ESLint | 7.15 秒 | 6.35 秒 | 1,395 MB |
90
+ | 3 ルール・このパッケージと tsgolint | 2.84 秒 | 2.59 秒 | 1,449 MB |
91
+ | 3 ルール・ESLint | 7.53 秒 | 6.64 秒 | 1,416 MB |
92
+
93
+ personal-space の `apps/slides/src` の結果は次のとおりである。
94
+
95
+ | ルールとツール | cold | warm | メモリ |
96
+ | ------------------------------------ | -------: | -------: | -------: |
97
+ | ルール無し・oxlint | 0.17 秒 | 0.06 秒 | 107 MB |
98
+ | ルール無し・ESLint | 7.69 秒 | 6.95 秒 | 1,700 MB |
99
+ | TanStack の 2 ルール・このパッケージ | 3.83 秒 | 3.81 秒 | 911 MB |
100
+ | TanStack の 2 ルール・ESLint | 10.56 秒 | 9.70 秒 | 1,799 MB |
101
+ | `no-floating-promises`・tsgolint | 1.04 秒 | 0.91 秒 | 697 MB |
102
+ | `no-floating-promises`・ESLint | 8.96 秒 | 8.29 秒 | 1,737 MB |
103
+ | 3 ルール・このパッケージと tsgolint | 4.79 秒 | 4.57 秒 | 1,500 MB |
104
+ | 3 ルール・ESLint | 11.00 秒 | 10.31 秒 | 1,763 MB |
105
+
106
+ TanStack の 2 ルールは、ESLint の 2.5〜3.6 倍の速さで、メモリは 5〜6 割で済む。
107
+ TypeScript 6 で Program を作っていた 0.0.2 では、
108
+ warm で masseater.dev が 6.37 秒、slides が 8.17 秒だった。
109
+ 時間の大半が TypeScript 6 で Program と型検査器を作る処理だったので、そこを tsgo に任せた。
110
+
111
+ slides の 3.8 秒のうち、tsgo との往復は 1.1 秒で、そのうち tsgo の中の処理は 0.8 秒だった。
112
+ 残りは、tsgo から受け取った構文木を JS の側で組み立て、ルールを動かす時間である。
113
+ oxlint のスレッドの数を 1 から 4 に変えても、時間はほぼ変わらなかった。
114
+
115
+ ESLint の `--cache` が当たると、どの組み合わせも 0.4〜0.5 秒、170〜210 MB で終わる。
116
+ ただし ESLint のキャッシュはファイルの中身だけを見る。
117
+ 型の出どころのファイルが変わっても、型を使うルールを検査し直さない。
118
+
119
+ typescript-eslint のルールで oxlint に同じ名前のものがあれば、tsgolint で動かす。
120
+ tsgolint は Go で書かれた TypeScript 7 で並列に型を調べる。
121
+ ESLint の 6〜9 倍速く、メモリも 4〜6 割で済む。
122
+ このパッケージは、tsgolint に無いルールを ESLint 無しで動かすためのものである。
123
+ tsgolint と併せると、型の情報を tsgo と tsgolint で 2 度作り、メモリはそのぶん増える。
124
+
125
+ ## ライセンス
126
+
127
+ MIT。同梱する元のプラグインのライセンスは `libs/oxlint-typed-rules/LICENSE` にある。
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { t as typedRules, n as withTypeInformation } from "./typed-rule-ClHYwCu8.mjs";
1
+ export { t as typedRules, n as withTypeInformation } from "./typed-rule-BPSyA0px.mjs";
@@ -1,4 +1,8 @@
1
1
  import { Plugin } from "vite-plus/lint/plugins";
2
- declare const plugin: Plugin;
2
+ declare const plugin: Plugin & {
3
+ readonly meta: {
4
+ readonly name: string;
5
+ };
6
+ };
3
7
  export { plugin as default };
4
8
  //# sourceMappingURL=tanstack-start.d.mts.map
@@ -1,4 +1,4 @@
1
- import { t as typedRules } from "./typed-rule-ClHYwCu8.mjs";
1
+ import { t as typedRules } from "./typed-rule-BPSyA0px.mjs";
2
2
  import { Array as Array$1, Function, Option, Predicate } from "effect";
3
3
  import { SyntaxKind, SyntaxKind as SyntaxKind$1 } from "typescript-7/ast";
4
4
  import { SymbolFlags as SymbolFlags$1 } from "typescript-7/sync";
@@ -35,7 +35,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  value: mod,
36
36
  enumerable: true
37
37
  }) : target, mod));
38
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/utils/get-docs-url.js
38
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/utils/get-docs-url.js
39
39
  var getDocsUrl = (ruleName) => `https://tanstack.com/start/latest/docs/eslint/${ruleName}`;
40
40
  // src/ts-compat.ts
41
41
  var ts_compat_exports = /* @__PURE__ */ __exportAll({
@@ -94,7 +94,7 @@ const FUNCTION_LIKE_KINDS = /* @__PURE__ */ new Set([
94
94
  ]);
95
95
  const isFunctionLike = (node) => Option.fromNullishOr(node).pipe(Option.exists(({ kind }) => FUNCTION_LIKE_KINDS.has(kind)));
96
96
  const forEachChild = Function.dual((args) => Array$1.head(Array$1.fromIterable(args)).pipe(Option.exists(Predicate.not(Predicate.isFunction))), (node, visit) => node.forEachChild(visit));
97
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/shared/use-client-resolver.js
97
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/shared/use-client-resolver.js
98
98
  /**
99
99
  * Creates a resolver that checks for 'use client' directive in source files
100
100
  */
@@ -3414,7 +3414,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3414
3414
  }
3415
3415
  };
3416
3416
  }));
3417
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/constants.js
3417
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/constants.js
3418
3418
  var import_globals = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
3419
3419
  module.exports = require_globals$1();
3420
3420
  })))(), 1);
@@ -3614,7 +3614,7 @@ function isClientOnlyHook(name, allowedHooks = DEFAULT_ALLOWED_HOOKS) {
3614
3614
  if (allowedHooks.has(name)) return false;
3615
3615
  return true;
3616
3616
  }
3617
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/violation-detector.js
3617
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/violation-detector.js
3618
3618
  /**
3619
3619
  * Get line and column position for a node
3620
3620
  */
@@ -3765,7 +3765,7 @@ function createViolationDetector(tsLib, options = {}) {
3765
3765
  detectViolationsInNode
3766
3766
  };
3767
3767
  }
3768
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/transitive-analyzer.js
3768
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/transitive-analyzer.js
3769
3769
  /**
3770
3770
  * Creates an analyzer that follows reachable symbol references
3771
3771
  * to find transitive violations, stopping at 'use client' boundaries.
@@ -3876,7 +3876,7 @@ function createTransitiveAnalyzer(tsLib, program, checker, useClientResolver, vi
3876
3876
  }
3877
3877
  return { analyzeEntrySymbol };
3878
3878
  }
3879
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
3879
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
3880
3880
  var require_deepMerge = /* @__PURE__ */ __commonJSMin(((exports) => {
3881
3881
  Object.defineProperty(exports, "__esModule", { value: true });
3882
3882
  exports.isObjectNotArray = isObjectNotArray;
@@ -3912,7 +3912,7 @@ var require_deepMerge = /* @__PURE__ */ __commonJSMin(((exports) => {
3912
3912
  }));
3913
3913
  }
3914
3914
  }));
3915
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
3915
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
3916
3916
  var require_applyDefault = /* @__PURE__ */ __commonJSMin(((exports) => {
3917
3917
  Object.defineProperty(exports, "__esModule", { value: true });
3918
3918
  exports.applyDefault = applyDefault;
@@ -3937,7 +3937,7 @@ var require_applyDefault = /* @__PURE__ */ __commonJSMin(((exports) => {
3937
3937
  return options;
3938
3938
  }
3939
3939
  }));
3940
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
3940
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
3941
3941
  var require_parserSeemsToBeTSESLint = /* @__PURE__ */ __commonJSMin(((exports) => {
3942
3942
  Object.defineProperty(exports, "__esModule", { value: true });
3943
3943
  exports.parserSeemsToBeTSESLint = parserSeemsToBeTSESLint;
@@ -3945,7 +3945,7 @@ var require_parserSeemsToBeTSESLint = /* @__PURE__ */ __commonJSMin(((exports) =
3945
3945
  return !!parser && /(?:typescript-eslint|\.\.)[\w/\\]*parser/.test(parser);
3946
3946
  }
3947
3947
  }));
3948
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
3948
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
3949
3949
  var require_getParserServices = /* @__PURE__ */ __commonJSMin(((exports) => {
3950
3950
  Object.defineProperty(exports, "__esModule", { value: true });
3951
3951
  exports.getParserServices = getParserServices;
@@ -3967,11 +3967,11 @@ var require_getParserServices = /* @__PURE__ */ __commonJSMin(((exports) => {
3967
3967
  throw new Error(messages.join("\n"));
3968
3968
  }
3969
3969
  }));
3970
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
3970
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
3971
3971
  var require_InferTypesFromRule = /* @__PURE__ */ __commonJSMin(((exports) => {
3972
3972
  Object.defineProperty(exports, "__esModule", { value: true });
3973
3973
  }));
3974
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
3974
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
3975
3975
  var require_nullThrows = /* @__PURE__ */ __commonJSMin(((exports) => {
3976
3976
  Object.defineProperty(exports, "__esModule", { value: true });
3977
3977
  exports.NullThrowsReasons = void 0;
@@ -3992,7 +3992,7 @@ var require_nullThrows = /* @__PURE__ */ __commonJSMin(((exports) => {
3992
3992
  return value;
3993
3993
  }
3994
3994
  }));
3995
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
3995
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
3996
3996
  var require_RuleCreator = /* @__PURE__ */ __commonJSMin(((exports) => {
3997
3997
  Object.defineProperty(exports, "__esModule", { value: true });
3998
3998
  exports.RuleCreator = RuleCreator;
@@ -4066,7 +4066,7 @@ var import_eslint_utils = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin
4066
4066
  __exportStar(require_nullThrows(), exports);
4067
4067
  __exportStar(require_RuleCreator(), exports);
4068
4068
  })))(), 1);
4069
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js
4069
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js
4070
4070
  var name$1 = "no-client-code-in-server-component";
4071
4071
  var TRIGGER_HINT = "Triggered by rendering \"{{entry}}\".";
4072
4072
  var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
@@ -4299,7 +4299,7 @@ var rule$1 = import_eslint_utils.RuleCreator(getDocsUrl)({
4299
4299
  }
4300
4300
  }
4301
4301
  });
4302
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/constants.js
4302
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/constants.js
4303
4303
  /**
4304
4304
  * Route option names that accept component references.
4305
4305
  * These make the referenced component a "client root".
@@ -4322,7 +4322,7 @@ var ROUTE_CREATOR_NAMES = [
4322
4322
  * Function names that create server-component roots.
4323
4323
  */
4324
4324
  var SERVER_COMPONENT_ROOTS = ["renderServerComponent", "createCompositeComponent"];
4325
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/render-graph-builder.js
4325
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/render-graph-builder.js
4326
4326
  /**
4327
4327
  * Builds a render graph from the TypeScript program.
4328
4328
  * Indexes components, JSX edges, server roots, and client roots.
@@ -4592,7 +4592,7 @@ function createRenderGraphBuilder(tsLib, program, checker) {
4592
4592
  set.add(key);
4593
4593
  }
4594
4594
  }
4595
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/context-analyzer.js
4595
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/context-analyzer.js
4596
4596
  /**
4597
4597
  * Analyzes the render graph to propagate server/client context.
4598
4598
  *
@@ -4692,7 +4692,7 @@ function propagateClientContext(key, visited, contexts, adjacency, reason) {
4692
4692
  parentFile: ctx.component.fileName
4693
4693
  });
4694
4694
  }
4695
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/no-async-client-component.rule.js
4695
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/no-async-client-component.rule.js
4696
4696
  var name = "no-async-client-component";
4697
4697
  var perProgramCache = /* @__PURE__ */ new WeakMap();
4698
4698
  var onDemandCache = /* @__PURE__ */ new WeakMap();
@@ -4909,7 +4909,7 @@ var rule = import_eslint_utils.RuleCreator(getDocsUrl)({
4909
4909
  }
4910
4910
  }
4911
4911
  });
4912
- // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/index.js
4912
+ // ../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/index.js
4913
4913
  var plugin$1 = {
4914
4914
  meta: { name: "@tanstack/eslint-plugin-start" },
4915
4915
  configs: {},
@@ -1 +1 @@
1
- {"version":3,"file":"tanstack-start.mjs","names":["Arr","ts.isExpressionStatement","ts.isStringLiteral","globals","name","rule","ESLintUtils","ts","ts.isFunctionLike","ts.isIdentifier","ts.isObjectBindingPattern","ts.isArrayBindingPattern","ts.isBindingElement","ts.isParameter","ts.isJsxOpeningElement","ts.isJsxSelfClosingElement","ts.isCallExpression","ESLintUtils","ts","name","rule","name$1","rule$1","plugin","tanstackStart"],"sources":["../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/utils/get-docs-url.js","../src/ts-compat.ts","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/shared/use-client-resolver.js","../../../node_modules/.pnpm/globals@16.4.0/node_modules/globals/globals.json","../../../node_modules/.pnpm/globals@16.4.0/node_modules/globals/index.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/constants.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/violation-detector.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/transitive-analyzer.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.7.0_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js","../src/typescript-eslint-utils.ts","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/constants.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/render-graph-builder.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/context-analyzer.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/no-async-client-component.rule.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_1ecd472b6714c9eeb7d387901cbbf798/node_modules/@tanstack/eslint-plugin-start/dist/esm/index.js","../src/tanstack-start.ts"],"sourcesContent":["//#region src/utils/get-docs-url.ts\nvar getDocsUrl = (ruleName) => `https://tanstack.com/start/latest/docs/eslint/${ruleName}`;\n//#endregion\nexport { getDocsUrl };\n\n//# sourceMappingURL=get-docs-url.js.map","import { Array as Arr, Function, Option, Predicate } from \"effect\";\nimport { SyntaxKind } from \"typescript-7/ast\";\nimport type { Node } from \"typescript-7/ast\";\n\nconst FUNCTION_LIKE_KINDS: ReadonlySet<SyntaxKind> = new Set([\n SyntaxKind.FunctionDeclaration,\n SyntaxKind.MethodDeclaration,\n SyntaxKind.Constructor,\n SyntaxKind.GetAccessor,\n SyntaxKind.SetAccessor,\n SyntaxKind.FunctionExpression,\n SyntaxKind.ArrowFunction,\n SyntaxKind.MethodSignature,\n SyntaxKind.CallSignature,\n SyntaxKind.JSDocSignature,\n SyntaxKind.ConstructSignature,\n SyntaxKind.IndexSignature,\n SyntaxKind.FunctionType,\n SyntaxKind.ConstructorType,\n]);\n\nconst isFunctionLike = (node: Node | null | undefined): boolean =>\n Option.fromNullishOr(node).pipe(Option.exists(({ kind }) => FUNCTION_LIKE_KINDS.has(kind)));\n\nconst forEachChild: {\n <Result>(visit: (child: Node) => Result | undefined): (node: Node) => Result | undefined;\n <Result>(node: Node, visit: (child: Node) => Result | undefined): Result | undefined;\n} = Function.dual(\n (args) =>\n Arr.head(Arr.fromIterable(args)).pipe(Option.exists(Predicate.not(Predicate.isFunction))),\n <Result>(node: Node, visit: (child: Node) => Result | undefined): Result | undefined =>\n node.forEachChild(visit),\n);\n\nexport {\n isArrayBindingPattern,\n isArrowFunction,\n isBindingElement,\n isCallExpression,\n isClassDeclaration,\n isClassExpression,\n isExpressionStatement,\n isFunctionDeclaration,\n isFunctionExpression,\n isIdentifier,\n isImportClause,\n isImportSpecifier,\n isInterfaceDeclaration,\n isJsxAttribute,\n isJsxExpression,\n isJsxOpeningElement,\n isJsxSelfClosingElement,\n isMethodDeclaration,\n isObjectBindingPattern,\n isObjectLiteralExpression,\n isParenthesizedExpression,\n isPropertyAccessExpression,\n isPropertyAssignment,\n isPropertyDeclaration,\n isStringLiteral,\n isTypeAliasDeclaration,\n isTypeParameterDeclaration,\n isTypeQueryNode,\n isTypeReferenceNode,\n isVariableDeclaration,\n isVariableStatement,\n isParameterDeclaration as isParameter,\n} from \"typescript-7/ast/is\";\nexport { SyntaxKind } from \"typescript-7/ast\";\nexport { SymbolFlags } from \"typescript-7/sync\";\nexport { forEachChild, isFunctionLike };\n","import * as ts from \"typescript\";\n//#region src/shared/use-client-resolver.ts\n/**\n* Creates a resolver that checks for 'use client' directive in source files\n*/\nfunction createUseClientResolver(program) {\n\tfunction hasUseClientDirective(fileName) {\n\t\tconst sourceFile = program.getSourceFile(fileName);\n\t\tif (!sourceFile) return false;\n\t\tconst firstStmt = sourceFile.statements[0];\n\t\tif (!firstStmt) return false;\n\t\tif (ts.isExpressionStatement(firstStmt) && ts.isStringLiteral(firstStmt.expression)) return firstStmt.expression.text === \"use client\";\n\t\treturn false;\n\t}\n\treturn { hasUseClientDirective };\n}\n//#endregion\nexport { createUseClientResolver };\n\n//# sourceMappingURL=use-client-resolver.js.map","","'use strict';\nmodule.exports = require('./globals.json');\n","import globals from \"globals\";\n//#region src/rules/no-client-code-in-server-component/constants.ts\n/**\n* Hooks allowed in server components\n*/\nvar DEFAULT_ALLOWED_HOOKS = new Set([\"useId\"]);\n/**\n* Browser-only globals not available in server context\n* Dynamically computed from globals package: browser globals that are NOT in node\n*/\nvar BROWSER_ONLY_GLOBALS = (() => {\n\tconst browserGlobals = Object.keys(globals.browser);\n\tconst nodeGlobals = new Set(Object.keys(globals.node));\n\tconst browserOnly = /* @__PURE__ */ new Set();\n\tfor (const name of browserGlobals) if (!nodeGlobals.has(name)) browserOnly.add(name);\n\treturn browserOnly;\n})();\n/**\n* React event handler props - comprehensive list from React types\n*/\nvar REACT_EVENT_HANDLERS = new Set([\n\t\"onCopy\",\n\t\"onCopyCapture\",\n\t\"onCut\",\n\t\"onCutCapture\",\n\t\"onPaste\",\n\t\"onPasteCapture\",\n\t\"onCompositionEnd\",\n\t\"onCompositionEndCapture\",\n\t\"onCompositionStart\",\n\t\"onCompositionStartCapture\",\n\t\"onCompositionUpdate\",\n\t\"onCompositionUpdateCapture\",\n\t\"onFocus\",\n\t\"onFocusCapture\",\n\t\"onBlur\",\n\t\"onBlurCapture\",\n\t\"onChange\",\n\t\"onChangeCapture\",\n\t\"onBeforeInput\",\n\t\"onBeforeInputCapture\",\n\t\"onInput\",\n\t\"onInputCapture\",\n\t\"onReset\",\n\t\"onResetCapture\",\n\t\"onSubmit\",\n\t\"onSubmitCapture\",\n\t\"onInvalid\",\n\t\"onInvalidCapture\",\n\t\"onLoad\",\n\t\"onLoadCapture\",\n\t\"onError\",\n\t\"onErrorCapture\",\n\t\"onKeyDown\",\n\t\"onKeyDownCapture\",\n\t\"onKeyPress\",\n\t\"onKeyPressCapture\",\n\t\"onKeyUp\",\n\t\"onKeyUpCapture\",\n\t\"onAbort\",\n\t\"onAbortCapture\",\n\t\"onCanPlay\",\n\t\"onCanPlayCapture\",\n\t\"onCanPlayThrough\",\n\t\"onCanPlayThroughCapture\",\n\t\"onDurationChange\",\n\t\"onDurationChangeCapture\",\n\t\"onEmptied\",\n\t\"onEmptiedCapture\",\n\t\"onEncrypted\",\n\t\"onEncryptedCapture\",\n\t\"onEnded\",\n\t\"onEndedCapture\",\n\t\"onLoadedData\",\n\t\"onLoadedDataCapture\",\n\t\"onLoadedMetadata\",\n\t\"onLoadedMetadataCapture\",\n\t\"onLoadStart\",\n\t\"onLoadStartCapture\",\n\t\"onPause\",\n\t\"onPauseCapture\",\n\t\"onPlay\",\n\t\"onPlayCapture\",\n\t\"onPlaying\",\n\t\"onPlayingCapture\",\n\t\"onProgress\",\n\t\"onProgressCapture\",\n\t\"onRateChange\",\n\t\"onRateChangeCapture\",\n\t\"onResize\",\n\t\"onResizeCapture\",\n\t\"onSeeked\",\n\t\"onSeekedCapture\",\n\t\"onSeeking\",\n\t\"onSeekingCapture\",\n\t\"onStalled\",\n\t\"onStalledCapture\",\n\t\"onSuspend\",\n\t\"onSuspendCapture\",\n\t\"onTimeUpdate\",\n\t\"onTimeUpdateCapture\",\n\t\"onVolumeChange\",\n\t\"onVolumeChangeCapture\",\n\t\"onWaiting\",\n\t\"onWaitingCapture\",\n\t\"onAuxClick\",\n\t\"onAuxClickCapture\",\n\t\"onClick\",\n\t\"onClickCapture\",\n\t\"onContextMenu\",\n\t\"onContextMenuCapture\",\n\t\"onDoubleClick\",\n\t\"onDoubleClickCapture\",\n\t\"onDrag\",\n\t\"onDragCapture\",\n\t\"onDragEnd\",\n\t\"onDragEndCapture\",\n\t\"onDragEnter\",\n\t\"onDragEnterCapture\",\n\t\"onDragExit\",\n\t\"onDragExitCapture\",\n\t\"onDragLeave\",\n\t\"onDragLeaveCapture\",\n\t\"onDragOver\",\n\t\"onDragOverCapture\",\n\t\"onDragStart\",\n\t\"onDragStartCapture\",\n\t\"onDrop\",\n\t\"onDropCapture\",\n\t\"onMouseDown\",\n\t\"onMouseDownCapture\",\n\t\"onMouseEnter\",\n\t\"onMouseLeave\",\n\t\"onMouseMove\",\n\t\"onMouseMoveCapture\",\n\t\"onMouseOut\",\n\t\"onMouseOutCapture\",\n\t\"onMouseOver\",\n\t\"onMouseOverCapture\",\n\t\"onMouseUp\",\n\t\"onMouseUpCapture\",\n\t\"onSelect\",\n\t\"onSelectCapture\",\n\t\"onTouchCancel\",\n\t\"onTouchCancelCapture\",\n\t\"onTouchEnd\",\n\t\"onTouchEndCapture\",\n\t\"onTouchMove\",\n\t\"onTouchMoveCapture\",\n\t\"onTouchStart\",\n\t\"onTouchStartCapture\",\n\t\"onPointerDown\",\n\t\"onPointerDownCapture\",\n\t\"onPointerMove\",\n\t\"onPointerMoveCapture\",\n\t\"onPointerUp\",\n\t\"onPointerUpCapture\",\n\t\"onPointerCancel\",\n\t\"onPointerCancelCapture\",\n\t\"onPointerEnter\",\n\t\"onPointerEnterCapture\",\n\t\"onPointerLeave\",\n\t\"onPointerLeaveCapture\",\n\t\"onPointerOver\",\n\t\"onPointerOverCapture\",\n\t\"onPointerOut\",\n\t\"onPointerOutCapture\",\n\t\"onGotPointerCapture\",\n\t\"onGotPointerCaptureCapture\",\n\t\"onLostPointerCapture\",\n\t\"onLostPointerCaptureCapture\",\n\t\"onScroll\",\n\t\"onScrollCapture\",\n\t\"onWheel\",\n\t\"onWheelCapture\",\n\t\"onAnimationStart\",\n\t\"onAnimationStartCapture\",\n\t\"onAnimationEnd\",\n\t\"onAnimationEndCapture\",\n\t\"onAnimationIteration\",\n\t\"onAnimationIterationCapture\",\n\t\"onTransitionEnd\",\n\t\"onTransitionEndCapture\"\n]);\n/**\n* Check if a prop name is a React event handler\n*/\nfunction isReactEventHandler(name) {\n\treturn REACT_EVENT_HANDLERS.has(name);\n}\n/**\n* Check if a hook name is client-only (not allowed in server components)\n*/\nfunction isClientOnlyHook(name, allowedHooks = DEFAULT_ALLOWED_HOOKS) {\n\tif (!/^use[A-Z]/.test(name)) return false;\n\tif (allowedHooks.has(name)) return false;\n\treturn true;\n}\n//#endregion\nexport { BROWSER_ONLY_GLOBALS, DEFAULT_ALLOWED_HOOKS, isClientOnlyHook, isReactEventHandler };\n\n//# sourceMappingURL=constants.js.map","import { BROWSER_ONLY_GLOBALS, DEFAULT_ALLOWED_HOOKS, isClientOnlyHook, isReactEventHandler } from \"./constants.js\";\n//#region src/rules/no-client-code-in-server-component/violation-detector.ts\n/**\n* Get line and column position for a node\n*/\nfunction getPosition(node, sourceFile) {\n\tconst { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n\treturn {\n\t\tline: line + 1,\n\t\tcolumn: character + 1\n\t};\n}\n/**\n* Creates a detector that finds client-only code violations in TypeScript AST\n*/\nfunction createViolationDetector(tsLib, options = {}) {\n\tconst allowedHooks = options.allowedHooks ?? DEFAULT_ALLOWED_HOOKS;\n\tconst checker = options.checker;\n\t/**\n\t* Check if a class declaration extends React.Component or React.PureComponent\n\t*/\n\tfunction isReactClassComponent(node) {\n\t\tif (!node.heritageClauses) return false;\n\t\tfor (const clause of node.heritageClauses) {\n\t\t\tif (clause.token !== tsLib.SyntaxKind.ExtendsKeyword) continue;\n\t\t\tfor (const type of clause.types) {\n\t\t\t\tconst expr = type.expression;\n\t\t\t\tif (tsLib.isPropertyAccessExpression(expr)) {\n\t\t\t\t\tconst propName = expr.name.text;\n\t\t\t\t\tif (propName === \"Component\" || propName === \"PureComponent\") {\n\t\t\t\t\t\tif (tsLib.isIdentifier(expr.expression)) {\n\t\t\t\t\t\t\tif (expr.expression.text === \"React\") return true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tsLib.isIdentifier(expr)) {\n\t\t\t\t\tconst name = expr.text;\n\t\t\t\t\tif (name === \"Component\" || name === \"PureComponent\") return true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Shared visitor logic that collects violations into the provided array\n\t*/\n\tfunction visitNode(node, sourceFile, violations) {\n\t\tif (tsLib.isClassDeclaration(node) && isReactClassComponent(node)) {\n\t\t\tconst name = node.name?.text ?? \"ClassComponent\";\n\t\t\tviolations.push({\n\t\t\t\ttype: \"class-component\",\n\t\t\t\tname,\n\t\t\t\tnode,\n\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t});\n\t\t}\n\t\tif (tsLib.isCallExpression(node)) {\n\t\t\tconst callee = node.expression;\n\t\t\tlet name = \"\";\n\t\t\tif (tsLib.isIdentifier(callee)) name = callee.text;\n\t\t\telse if (tsLib.isPropertyAccessExpression(callee)) name = callee.name.text;\n\t\t\tif (name && isClientOnlyHook(name, allowedHooks)) violations.push({\n\t\t\t\ttype: \"hook\",\n\t\t\t\tname,\n\t\t\t\tnode,\n\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t});\n\t\t}\n\t\tif (tsLib.isIdentifier(node)) {\n\t\t\tconst name = node.text;\n\t\t\tif (BROWSER_ONLY_GLOBALS.has(name)) {\n\t\t\t\tconst parent = node.parent;\n\t\t\t\tif (tsLib.isPropertyAccessExpression(parent) && parent.name === node) {} else if (tsLib.isPropertyAssignment(parent) && parent.name === node) {} else if (tsLib.isTypeReferenceNode(parent) || tsLib.isInterfaceDeclaration(parent) || tsLib.isTypeAliasDeclaration(parent)) {} else if (tsLib.isParameter(parent) && parent.name === node || tsLib.isVariableDeclaration(parent) && parent.name === node) {} else if (tsLib.isImportSpecifier(parent) || tsLib.isImportClause(parent)) {} else if (checker) {\n\t\t\t\t\tconst symbol = checker.getSymbolAtLocation(node);\n\t\t\t\t\tif (symbol) {\n\t\t\t\t\t\tconst declarations = symbol.getDeclarations();\n\t\t\t\t\t\tif (declarations?.length) if (declarations.some((decl) => {\n\t\t\t\t\t\t\tconst fileName = decl.getSourceFile().fileName;\n\t\t\t\t\t\t\treturn !fileName.includes(\"/node_modules/\") && !fileName.includes(\"/typescript/lib/\");\n\t\t\t\t\t\t})) {} else violations.push({\n\t\t\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t\t});\n\t\t\t\t\t\telse violations.push({\n\t\t\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t\t});\n\t\t\t\t\t} else violations.push({\n\t\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t});\n\t\t\t\t} else violations.push({\n\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\tname,\n\t\t\t\t\tnode,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isJsxAttribute(node)) {\n\t\t\tconst attrName = node.name;\n\t\t\tif (tsLib.isIdentifier(attrName)) {\n\t\t\t\tconst name = attrName.text;\n\t\t\t\tconst value = node.initializer;\n\t\t\t\tif (isReactEventHandler(name)) violations.push({\n\t\t\t\t\ttype: \"event-handler\",\n\t\t\t\t\tname,\n\t\t\t\t\tnode,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t});\n\t\t\t\telse if (name !== \"style\" && name !== \"className\" && name !== \"key\" && name !== \"ref\" && name !== \"dangerouslySetInnerHTML\" && value && tsLib.isJsxExpression(value) && value.expression) {\n\t\t\t\t\tconst expr = value.expression;\n\t\t\t\t\tif (tsLib.isArrowFunction(expr) || tsLib.isFunctionExpression(expr)) violations.push({\n\t\t\t\t\t\ttype: \"function-prop\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttsLib.forEachChild(node, (child) => visitNode(child, sourceFile, violations));\n\t}\n\tfunction detectViolations(sourceFile) {\n\t\tconst violations = [];\n\t\ttsLib.forEachChild(sourceFile, (child) => visitNode(child, sourceFile, violations));\n\t\treturn violations;\n\t}\n\tfunction detectViolationsInNode(node, sourceFile) {\n\t\tconst violations = [];\n\t\tvisitNode(node, sourceFile, violations);\n\t\treturn violations;\n\t}\n\treturn {\n\t\tdetectViolations,\n\t\tdetectViolationsInNode\n\t};\n}\n//#endregion\nexport { createViolationDetector };\n\n//# sourceMappingURL=violation-detector.js.map","//#region src/rules/no-client-code-in-server-component/transitive-analyzer.ts\n/**\n* Creates an analyzer that follows reachable symbol references\n* to find transitive violations, stopping at 'use client' boundaries.\n*/\nfunction createTransitiveAnalyzer(tsLib, program, checker, useClientResolver, violationDetector) {\n\tconst visitedSymbols = /* @__PURE__ */ new Set();\n\tconst analysisCache = /* @__PURE__ */ new Map();\n\tfunction symbolKey(symbol) {\n\t\treturn `${(symbol.getDeclarations()?.[0])?.getSourceFile().fileName ?? \"unknown\"}::${symbol.getName()}`;\n\t}\n\tfunction analyzeEntrySymbol(entrySymbol) {\n\t\tvisitedSymbols.clear();\n\t\tconst cached = analysisCache.get(symbolKey(entrySymbol));\n\t\tif (cached) return cached;\n\t\tconst violations = [];\n\t\tfunction visitSymbol(symbol, chain) {\n\t\t\tconst key = symbolKey(symbol);\n\t\t\tif (visitedSymbols.has(key)) return false;\n\t\t\tvisitedSymbols.add(key);\n\t\t\tconst decl = symbol.getDeclarations()?.[0];\n\t\t\tif (!decl) return false;\n\t\t\tconst sourceFile = decl.getSourceFile();\n\t\t\tconst fileName = sourceFile.fileName;\n\t\t\tif (fileName.includes(\"/node_modules/\") || fileName.endsWith(\".d.ts\")) return false;\n\t\t\tif (useClientResolver.hasUseClientDirective(fileName)) return true;\n\t\t\tconst traversalRoots = getTraversalRoots(decl);\n\t\t\tfor (const root of traversalRoots) {\n\t\t\t\tconst rootViolations = violationDetector.detectViolationsInNode(root, sourceFile);\n\t\t\t\tfor (const v of rootViolations) violations.push({\n\t\t\t\t\t...v,\n\t\t\t\t\tchain: [...chain]\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const root of traversalRoots) {\n\t\t\t\tconst identifiers = collectReachableIdentifiers(root, decl);\n\t\t\t\tfor (const ident of identifiers) {\n\t\t\t\t\tconst refSym = checker.getSymbolAtLocation(ident);\n\t\t\t\t\tif (!refSym) continue;\n\t\t\t\t\tconst aliased = tsLib.SymbolFlags.Alias & refSym.flags ? checker.getAliasedSymbol(refSym) : refSym;\n\t\t\t\t\tconst refFile = (aliased.getDeclarations()?.[0])?.getSourceFile().fileName;\n\t\t\t\t\tif (!refFile) continue;\n\t\t\t\t\tif (refFile.includes(\"/node_modules/\") || refFile.endsWith(\".d.ts\")) continue;\n\t\t\t\t\tconst edge = {\n\t\t\t\t\t\tfromFile: fileName,\n\t\t\t\t\t\ttoFile: refFile,\n\t\t\t\t\t\tviaSymbol: aliased.getName()\n\t\t\t\t\t};\n\t\t\t\t\tvisitSymbol(aliased, [...chain, edge]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t/**\n\t\t* Get traversal roots based on declaration kind\n\t\t*/\n\t\tfunction getTraversalRoots(decl) {\n\t\t\tif (tsLib.isFunctionDeclaration(decl) && decl.body) return [decl.body];\n\t\t\tif (tsLib.isFunctionExpression(decl)) return [decl.body];\n\t\t\tif (tsLib.isArrowFunction(decl)) return [decl.body];\n\t\t\tif (tsLib.isVariableDeclaration(decl) && decl.initializer) {\n\t\t\t\tif (tsLib.isFunctionExpression(decl.initializer) || tsLib.isArrowFunction(decl.initializer)) return [decl.initializer.body];\n\t\t\t\treturn [decl.initializer];\n\t\t\t}\n\t\t\tif (tsLib.isClassDeclaration(decl) || tsLib.isClassExpression(decl)) {\n\t\t\t\tconst roots = [];\n\t\t\t\tfor (const member of decl.members) {\n\t\t\t\t\tif (tsLib.isMethodDeclaration(member) && member.body) roots.push(member.body);\n\t\t\t\t\tif (tsLib.isPropertyDeclaration(member) && member.initializer) roots.push(member.initializer);\n\t\t\t\t}\n\t\t\t\treturn roots;\n\t\t\t}\n\t\t\treturn [decl];\n\t\t}\n\t\t/**\n\t\t* Collect identifier nodes from a traversal root, skipping:\n\t\t* - The defining identifier for the symbol (avoid self-loop)\n\t\t* - Type-only positions\n\t\t* - Property names when not computed\n\t\t*/\n\t\tfunction collectReachableIdentifiers(root, originalDecl) {\n\t\t\tconst identifiers = [];\n\t\t\tlet declName;\n\t\t\tif (\"name\" in originalDecl && originalDecl.name) {\n\t\t\t\tconst nameNode = originalDecl.name;\n\t\t\t\tif (tsLib.isIdentifier(nameNode)) declName = nameNode.text;\n\t\t\t}\n\t\t\tfunction visit(node) {\n\t\t\t\tif (tsLib.isTypeReferenceNode(node) || tsLib.isInterfaceDeclaration(node) || tsLib.isTypeAliasDeclaration(node) || tsLib.isTypeQueryNode(node) || tsLib.isTypeParameterDeclaration(node)) return;\n\t\t\t\tif (tsLib.isIdentifier(node)) {\n\t\t\t\t\tif (node.text === declName) return;\n\t\t\t\t\tconst parent = node.parent;\n\t\t\t\t\tif (tsLib.isPropertyAccessExpression(parent) && parent.name === node) return;\n\t\t\t\t\tif (tsLib.isPropertyAssignment(parent) && parent.name === node) return;\n\t\t\t\t\tif (tsLib.isParameter(parent) && parent.name === node || tsLib.isVariableDeclaration(parent) && parent.name === node) return;\n\t\t\t\t\tidentifiers.push(node);\n\t\t\t\t}\n\t\t\t\ttsLib.forEachChild(node, visit);\n\t\t\t}\n\t\t\tvisit(root);\n\t\t\treturn identifiers;\n\t\t}\n\t\tconst result = {\n\t\t\tisClientBoundary: visitSymbol(entrySymbol, []),\n\t\t\tviolations\n\t\t};\n\t\tanalysisCache.set(symbolKey(entrySymbol), result);\n\t\treturn result;\n\t}\n\treturn { analyzeEntrySymbol };\n}\n//#endregion\nexport { createTransitiveAnalyzer };\n\n//# sourceMappingURL=transitive-analyzer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isObjectNotArray = isObjectNotArray;\nexports.deepMerge = deepMerge;\n/**\n * Check if the variable contains an object strictly rejecting arrays\n * @returns `true` if obj is an object\n */\nfunction isObjectNotArray(obj) {\n return typeof obj === 'object' && obj != null && !Array.isArray(obj);\n}\n/**\n * Pure function - doesn't mutate either parameter!\n * Merges two objects together deeply, overwriting the properties in first with the properties in second\n * @param first The first object\n * @param second The second object\n * @returns a new object\n */\nfunction deepMerge(first = {}, second = {}) {\n // get the unique set of keys across both objects\n const keys = new Set([...Object.keys(first), ...Object.keys(second)]);\n return Object.fromEntries([...keys].map(key => {\n const firstHasKey = key in first;\n const secondHasKey = key in second;\n const firstValue = first[key];\n const secondValue = second[key];\n let value;\n if (firstHasKey && secondHasKey) {\n if (isObjectNotArray(firstValue) && isObjectNotArray(secondValue)) {\n // object type\n value = deepMerge(firstValue, secondValue);\n }\n else {\n // value type\n value = secondValue;\n }\n }\n else if (firstHasKey) {\n value = firstValue;\n }\n else {\n value = secondValue;\n }\n return [key, value];\n }));\n}\n//# sourceMappingURL=deepMerge.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.applyDefault = applyDefault;\nconst deepMerge_1 = require(\"./deepMerge\");\n/**\n * Pure function - doesn't mutate either parameter!\n * Uses the default options and overrides with the options provided by the user\n * @param defaultOptions the defaults\n * @param userOptions the user opts\n * @returns the options with defaults\n */\nfunction applyDefault(defaultOptions, userOptions) {\n // clone defaults\n const options = structuredClone(defaultOptions);\n if (userOptions == null) {\n return options;\n }\n // For avoiding the type error\n // `This expression is not callable. Type 'unknown' has no call signatures.ts(2349)`\n options.forEach((opt, i) => {\n // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish\n if (userOptions[i] !== undefined) {\n const userOpt = userOptions[i];\n if ((0, deepMerge_1.isObjectNotArray)(userOpt) && (0, deepMerge_1.isObjectNotArray)(opt)) {\n options[i] = (0, deepMerge_1.deepMerge)(opt, userOpt);\n }\n else {\n options[i] = userOpt;\n }\n }\n });\n return options;\n}\n//# sourceMappingURL=applyDefault.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parserSeemsToBeTSESLint = parserSeemsToBeTSESLint;\nfunction parserSeemsToBeTSESLint(parser) {\n return !!parser && /(?:typescript-eslint|\\.\\.)[\\w/\\\\]*parser/.test(parser);\n}\n//# sourceMappingURL=parserSeemsToBeTSESLint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getParserServices = getParserServices;\nconst parserSeemsToBeTSESLint_1 = require(\"./parserSeemsToBeTSESLint\");\nconst ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = \"You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://tseslint.com/typed-linting for enabling linting with type information.\";\nconst ERROR_MESSAGE_UNKNOWN_PARSER = 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward \"parserOptions.project\" to @typescript-eslint/parser.';\nfunction getParserServices(context, allowWithoutFullTypeInformation = false) {\n const parser = \n // eslint-disable-next-line @typescript-eslint/no-deprecated -- For compatibility with ESLint 8\n context.parserPath || context.languageOptions.parser?.meta?.name;\n // This check is unnecessary if the user is using the latest version of our parser.\n //\n // However the world isn't perfect:\n // - Users often use old parser versions.\n // Old versions of the parser would not return any parserServices unless parserOptions.project was set.\n // - Users sometimes use parsers that aren't @typescript-eslint/parser\n // Other parsers won't return the parser services we expect (if they return any at all).\n //\n // This check allows us to handle bad user setups whilst providing a nice user-facing\n // error message explaining the problem.\n if (context.sourceCode.parserServices?.esTreeNodeToTSNodeMap == null ||\n context.sourceCode.parserServices.tsNodeToESTreeNodeMap == null) {\n throwError(parser);\n }\n // if a rule requires full type information, then hard fail if it doesn't exist\n // this forces the user to supply parserOptions.project\n if (context.sourceCode.parserServices.program == null &&\n !allowWithoutFullTypeInformation) {\n throwError(parser);\n }\n return context.sourceCode.parserServices;\n}\n/* eslint-enable @typescript-eslint/unified-signatures */\nfunction throwError(parser) {\n const messages = [\n ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,\n `Parser: ${parser || '(unknown)'}`,\n !(0, parserSeemsToBeTSESLint_1.parserSeemsToBeTSESLint)(parser) && ERROR_MESSAGE_UNKNOWN_PARSER,\n ].filter(Boolean);\n throw new Error(messages.join('\\n'));\n}\n//# sourceMappingURL=getParserServices.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=InferTypesFromRule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NullThrowsReasons = void 0;\nexports.nullThrows = nullThrows;\n/**\n * A set of common reasons for calling nullThrows\n */\nexports.NullThrowsReasons = {\n MissingParent: 'Expected node to have a parent.',\n MissingToken: (token, thing) => `Expected to find a ${token} for the ${thing}.`,\n};\n/**\n * Assert that a value must not be null or undefined.\n * This is a nice explicit alternative to the non-null assertion operator.\n */\nfunction nullThrows(value, message) {\n if (value == null) {\n throw new Error(`Non-null Assertion Failed: ${message}`);\n }\n return value;\n}\n//# sourceMappingURL=nullThrows.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RuleCreator = RuleCreator;\nconst applyDefault_1 = require(\"./applyDefault\");\n/**\n * Creates reusable function to create rules with default options and docs URLs.\n *\n * @param urlCreator Creates a documentation URL for a given rule name.\n * @returns Function to create a rule with the docs URL format.\n */\nfunction RuleCreator(urlCreator) {\n // This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349\n // TODO - when the above PR lands; add type checking for the context.report `data` property\n return function createNamedRule({ meta, name, ...rule }) {\n const ruleWithDocs = createRule({\n meta: {\n ...meta,\n docs: {\n ...meta.docs,\n url: urlCreator(name),\n },\n },\n name,\n ...rule,\n });\n return ruleWithDocs;\n };\n}\nfunction createRule({ create, \n// Keep accepting deprecated defaultOptions for backward compatibility.\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ndefaultOptions, meta, name, }) {\n const resolvedDefaultOptions = (meta.defaultOptions ??\n defaultOptions ??\n []);\n return {\n create(context) {\n const optionsWithDefault = (0, applyDefault_1.applyDefault)(resolvedDefaultOptions, context.options);\n return create(context, optionsWithDefault);\n },\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- For compatibility with ESLint 8, see #12842\n defaultOptions,\n meta,\n name,\n };\n}\n/**\n * Creates a well-typed TSESLint custom ESLint rule without a docs URL.\n *\n * @returns Well-typed TSESLint custom ESLint rule.\n * @remarks It is generally better to provide a docs URL function to RuleCreator.\n */\nRuleCreator.withoutDocs = function withoutDocs(args) {\n return createRule(args);\n};\n//# sourceMappingURL=RuleCreator.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./applyDefault\"), exports);\n__exportStar(require(\"./deepMerge\"), exports);\n__exportStar(require(\"./getParserServices\"), exports);\n__exportStar(require(\"./InferTypesFromRule\"), exports);\n__exportStar(require(\"./nullThrows\"), exports);\n__exportStar(require(\"./RuleCreator\"), exports);\n//# sourceMappingURL=index.js.map","export * as ESLintUtils from \"@typescript-eslint/utils/eslint-utils\";\n","import { getDocsUrl } from \"../../utils/get-docs-url.js\";\nimport { createUseClientResolver } from \"../../shared/use-client-resolver.js\";\nimport { DEFAULT_ALLOWED_HOOKS } from \"./constants.js\";\nimport { createViolationDetector } from \"./violation-detector.js\";\nimport { createTransitiveAnalyzer } from \"./transitive-analyzer.js\";\nimport path from \"node:path\";\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport * as ts from \"typescript\";\n//#region src/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.ts\nvar name = \"no-client-code-in-server-component\";\nvar TRIGGER_HINT = \"Triggered by rendering \\\"{{entry}}\\\".\";\nvar rule = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Disallow client-only code inside server components\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tschema: [{\n\t\t\ttype: \"object\",\n\t\t\tproperties: { allowedServerHooks: {\n\t\t\t\ttype: \"array\",\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdescription: \"Additional hooks that are allowed in server components (e.g., custom server-safe hooks)\"\n\t\t\t} },\n\t\t\tadditionalProperties: false\n\t\t}],\n\t\tmessages: {\n\t\t\thookInServerComponent: \"\\\"{{name}}\\\" hook {{location}} cannot be used in server components. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\tbrowserGlobalInServerComponent: \"\\\"{{name}}\\\" browser API {{location}} is not available in server components. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\teventHandlerInServerComponent: \"\\\"{{name}}\\\" event handler {{location}} cannot be used in server components. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\tfunctionPropInServerComponent: \"\\\"{{name}}\\\" function prop {{location}} cannot be passed in server components. Functions cannot be serialized from server to client. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\tclassComponentInServerComponent: \"\\\"{{name}}\\\" class component {{location}} cannot be used in server components. Class components require client-side lifecycle methods. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\"\n\t\t}\n\t},\n\tdefaultOptions: [{ allowedServerHooks: [] }],\n\tcreate(context, [options]) {\n\t\tconst services = ESLintUtils.getParserServices(context);\n\t\tconst program = services.program;\n\t\tconst checker = program.getTypeChecker();\n\t\tconst allowedHooks = new Set([...DEFAULT_ALLOWED_HOOKS, ...options.allowedServerHooks]);\n\t\tconst useClientResolver = createUseClientResolver(program);\n\t\tconst violationDetector = createViolationDetector(ts, {\n\t\t\tallowedHooks,\n\t\t\tchecker\n\t\t});\n\t\tconst transitiveAnalyzer = createTransitiveAnalyzer(ts, program, checker, useClientResolver, violationDetector);\n\t\treturn { CallExpression(node) {\n\t\t\tconst sourceFile = services.esTreeNodeToTSNodeMap.get(node).getSourceFile();\n\t\t\tif (useClientResolver.hasUseClientDirective(sourceFile.fileName)) return;\n\t\t\tconst rootKind = getServerRootKind(node);\n\t\t\tif (!rootKind) return;\n\t\t\tif (rootKind === \"createCompositeComponent\") {\n\t\t\t\tconst callback = node.arguments[0];\n\t\t\t\tif (!callback) return;\n\t\t\t\tconst tsNode = services.esTreeNodeToTSNodeMap.get(callback);\n\t\t\t\tif (ts.isFunctionLike(tsNode)) analyzeServerComponentCallback(tsNode, node, rootKind);\n\t\t\t\telse if (ts.isIdentifier(tsNode)) analyzeDirectComponentReference(tsNode, node, rootKind);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst element = node.arguments[0];\n\t\t\tif (!element) return;\n\t\t\tanalyzeServerComponentNode(services.esTreeNodeToTSNodeMap.get(element), node, rootKind);\n\t\t} };\n\t\tfunction getServerRootKind(node) {\n\t\t\tif (node.callee.type === \"Identifier\") {\n\t\t\t\tif (node.callee.name === \"createCompositeComponent\") return \"createCompositeComponent\";\n\t\t\t\tif (node.callee.name === \"renderServerComponent\") return \"renderServerComponent\";\n\t\t\t}\n\t\t\tif (node.callee.type === \"MemberExpression\" && node.callee.property.type === \"Identifier\") {\n\t\t\t\tif (node.callee.property.name === \"createCompositeComponent\") return \"createCompositeComponent\";\n\t\t\t\tif (node.callee.property.name === \"renderServerComponent\") return \"renderServerComponent\";\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\tfunction analyzeServerComponentNode(node, eslintNode, rootKind) {\n\t\t\tconst reportedViolations = /* @__PURE__ */ new Set();\n\t\t\tconst sourceFile = node.getSourceFile();\n\t\t\tconst directViolations = violationDetector.detectViolations(sourceFile);\n\t\t\tconst start = node.getStart();\n\t\t\tconst end = node.getEnd();\n\t\t\tfor (const violation of directViolations) {\n\t\t\t\tconst violationPos = violation.node.getStart();\n\t\t\t\tif (violationPos >= start && violationPos <= end) {\n\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\treportViolation(violation, [], rootKind, eslintNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst componentRefs = findComponentReferences(node);\n\t\t\tfor (const ref of componentRefs) {\n\t\t\t\tconst symbol = checker.getSymbolAtLocation(ref);\n\t\t\t\tif (!symbol) continue;\n\t\t\t\tconst resolvedSymbol = ts.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;\n\t\t\t\tconst result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);\n\t\t\t\tif (result.isClientBoundary) continue;\n\t\t\t\tfor (const violation of result.violations) {\n\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\treportViolation(violation, violation.chain, rootKind, eslintNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfunction analyzeServerComponentCallback(callback, eslintNode, rootKind) {\n\t\t\tconst reportedViolations = /* @__PURE__ */ new Set();\n\t\t\tconst parameterNames = /* @__PURE__ */ new Set();\n\t\t\tfor (const param of callback.parameters) collectParameterBindings(param.name, parameterNames);\n\t\t\tconst body = callback.body;\n\t\t\tif (body) {\n\t\t\t\tconst sourceFile = callback.getSourceFile();\n\t\t\t\tconst directViolations = violationDetector.detectViolations(sourceFile);\n\t\t\t\tconst callbackStart = body.getStart();\n\t\t\t\tconst callbackEnd = body.getEnd();\n\t\t\t\tfor (const violation of directViolations) {\n\t\t\t\t\tconst violationPos = violation.node.getStart();\n\t\t\t\t\tif (violationPos >= callbackStart && violationPos <= callbackEnd) {\n\t\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\t\treportViolation(violation, [], rootKind, eslintNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst componentRefs = findComponentReferences(callback);\n\t\t\tfor (const ref of componentRefs) {\n\t\t\t\tif (parameterNames.has(ref.text)) continue;\n\t\t\t\tconst symbol = checker.getSymbolAtLocation(ref);\n\t\t\t\tif (!symbol) continue;\n\t\t\t\tif (symbol.getDeclarations()?.some((d) => isWithinParameters(d, callback))) continue;\n\t\t\t\tconst resolvedSymbol = ts.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;\n\t\t\t\tconst result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);\n\t\t\t\tif (result.isClientBoundary) continue;\n\t\t\t\tfor (const violation of result.violations) {\n\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\treportViolation(violation, violation.chain, rootKind, eslintNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Analyze a component passed directly to createCompositeComponent(Component)\n\t\t*/\n\t\tfunction analyzeDirectComponentReference(ref, eslintNode, rootKind = \"createCompositeComponent\") {\n\t\t\tconst symbol = checker.getSymbolAtLocation(ref);\n\t\t\tif (!symbol) return;\n\t\t\tconst resolvedSymbol = ts.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;\n\t\t\tconst result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);\n\t\t\tif (result.isClientBoundary) return;\n\t\t\tconst reportedViolations = /* @__PURE__ */ new Set();\n\t\t\tfor (const violation of result.violations) {\n\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\treportViolation(violation, violation.chain, rootKind, eslintNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Collect all binding names from a parameter (handles destructuring)\n\t\t*/\n\t\tfunction collectParameterBindings(bindingName, names) {\n\t\t\tfunction collectFromBinding(node) {\n\t\t\t\tif (ts.isIdentifier(node)) names.add(node.text);\n\t\t\t\telse if (ts.isObjectBindingPattern(node)) for (const element of node.elements) collectFromBinding(element.name);\n\t\t\t\telse if (ts.isArrayBindingPattern(node)) {\n\t\t\t\t\tfor (const element of node.elements) if (ts.isBindingElement(element)) collectFromBinding(element.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcollectFromBinding(bindingName);\n\t\t}\n\t\t/**\n\t\t* Check if a declaration is within the parameters of the callback\n\t\t*/\n\t\tfunction isWithinParameters(decl, callback) {\n\t\t\tlet current = decl;\n\t\t\twhile (current) {\n\t\t\t\tif (ts.isParameter(current)) {\n\t\t\t\t\tconst paramParent = current.parent;\n\t\t\t\t\tif (ts.isFunctionLike(paramParent) && paramParent === callback) return true;\n\t\t\t\t}\n\t\t\t\tcurrent = current.parent;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tfunction findComponentReferences(node) {\n\t\t\tconst refs = [];\n\t\t\tfunction visit(n) {\n\t\t\t\tif (ts.isJsxOpeningElement(n) || ts.isJsxSelfClosingElement(n)) {\n\t\t\t\t\tconst tagName = n.tagName;\n\t\t\t\t\tif (ts.isIdentifier(tagName) && /^[A-Z]/.test(tagName.text)) refs.push(tagName);\n\t\t\t\t}\n\t\t\t\tif (ts.isCallExpression(n)) {\n\t\t\t\t\tconst callee = n.expression;\n\t\t\t\t\tif (ts.isIdentifier(callee) && /^[A-Z]/.test(callee.text)) refs.push(callee);\n\t\t\t\t}\n\t\t\t\tts.forEachChild(n, visit);\n\t\t\t}\n\t\t\tvisit(node);\n\t\t\treturn refs;\n\t\t}\n\t\tfunction reportViolation(violation, chain, entryComponentName, eslintNode) {\n\t\t\tconst location = formatLocation(violation, chain);\n\t\t\tconst messageId = getMessageId(violation.type);\n\t\t\tcontext.report({\n\t\t\t\tnode: eslintNode,\n\t\t\t\tmessageId,\n\t\t\t\tdata: {\n\t\t\t\t\tname: violation.name,\n\t\t\t\t\tlocation,\n\t\t\t\t\tentry: entryComponentName,\n\t\t\t\t\tfileName: getRelativePath(violation.fileName)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tfunction getMessageId(type) {\n\t\t\tswitch (type) {\n\t\t\t\tcase \"hook\": return \"hookInServerComponent\";\n\t\t\t\tcase \"browser-global\": return \"browserGlobalInServerComponent\";\n\t\t\t\tcase \"event-handler\": return \"eventHandlerInServerComponent\";\n\t\t\t\tcase \"function-prop\": return \"functionPropInServerComponent\";\n\t\t\t\tcase \"class-component\": return \"classComponentInServerComponent\";\n\t\t\t}\n\t\t}\n\t\tfunction formatLocation(violation, chain) {\n\t\t\tif (chain.length > 0) return `(via ${chain.map((e) => getRelativePath(e.toFile)).join(\" -> \")}) at ${getRelativePath(violation.fileName)}:${violation.line}`;\n\t\t\treturn `at ${getRelativePath(violation.fileName)}:${violation.line}`;\n\t\t}\n\t\tfunction getRelativePath(fileName) {\n\t\t\tconst cwd = context.cwd;\n\t\t\treturn path.relative(cwd, fileName);\n\t\t}\n\t}\n});\n//#endregion\nexport { name, rule };\n\n//# sourceMappingURL=no-client-code-in-server-component.rule.js.map","//#region src/rules/no-async-client-component/constants.ts\n/**\n* Route option names that accept component references.\n* These make the referenced component a \"client root\".\n*/\nvar ROUTE_COMPONENT_OPTION_NAMES = [\n\t\"component\",\n\t\"pendingComponent\",\n\t\"errorComponent\",\n\t\"notFoundComponent\"\n];\n/**\n* Function names that create routes (client entry points).\n*/\nvar ROUTE_CREATOR_NAMES = [\n\t\"createFileRoute\",\n\t\"createRootRoute\",\n\t\"createRootRouteWithContext\"\n];\n/**\n* Function names that create server-component roots.\n*/\nvar SERVER_COMPONENT_ROOTS = [\"renderServerComponent\", \"createCompositeComponent\"];\n//#endregion\nexport { ROUTE_COMPONENT_OPTION_NAMES, ROUTE_CREATOR_NAMES, SERVER_COMPONENT_ROOTS };\n\n//# sourceMappingURL=constants.js.map","import { ROUTE_COMPONENT_OPTION_NAMES, ROUTE_CREATOR_NAMES, SERVER_COMPONENT_ROOTS } from \"./constants.js\";\n//#region src/rules/no-async-client-component/render-graph-builder.ts\n/**\n* Builds a render graph from the TypeScript program.\n* Indexes components, JSX edges, server roots, and client roots.\n*/\nfunction createRenderGraphBuilder(tsLib, program, checker) {\n\tconst graph = {\n\t\tcomponents: /* @__PURE__ */ new Map(),\n\t\tedges: [],\n\t\tserverRoots: /* @__PURE__ */ new Set(),\n\t\tclientRoots: /* @__PURE__ */ new Set(),\n\t\tuseClientFiles: /* @__PURE__ */ new Set(),\n\t\trouteOptionUsages: /* @__PURE__ */ new Map(),\n\t\trouteOptionRootsByFile: /* @__PURE__ */ new Map()\n\t};\n\treturn {\n\t\tbuild() {\n\t\t\tfor (const sourceFile of program.getSourceFiles()) {\n\t\t\t\tif (sourceFile.isDeclarationFile) continue;\n\t\t\t\tif (sourceFile.fileName.includes(\"node_modules\")) continue;\n\t\t\t\tif (!fileCanContribute(sourceFile)) continue;\n\t\t\t\tprocessSourceFile(sourceFile);\n\t\t\t}\n\t\t\treturn graph;\n\t\t},\n\t\tgetGraph() {\n\t\t\treturn graph;\n\t\t}\n\t};\n\t/**\n\t* Quick text-based check to skip files that can't contribute edges or roots.\n\t* A file can contribute if it might have:\n\t* - JSX (components, edges)\n\t* - 'use client' directive (client roots)\n\t* - createFileRoute/createRootRoute (route-option roots)\n\t* - renderServerComponent/createCompositeComponent (server roots)\n\t\n\t*/\n\tfunction fileCanContribute(sourceFile) {\n\t\tconst text = sourceFile.text;\n\t\tconst hasJsx = text.includes(\"<\") && (text.includes(\"/>\") || text.includes(\"</\"));\n\t\tconst hasUseClient = text.includes(\"use client\");\n\t\tconst hasRouteCreator = text.includes(\"createFileRoute\") || text.includes(\"createRootRoute\") || text.includes(\"createRootRouteWithContext\");\n\t\tconst hasServerComponentRoot = SERVER_COMPONENT_ROOTS.some((name) => text.includes(name));\n\t\treturn hasJsx || hasUseClient || hasRouteCreator || hasServerComponentRoot;\n\t}\n\tfunction processSourceFile(sourceFile) {\n\t\tif (hasUseClientDirective(sourceFile)) graph.useClientFiles.add(sourceFile.fileName);\n\t\tvisitNode(sourceFile, sourceFile, null);\n\t}\n\tfunction hasUseClientDirective(sourceFile) {\n\t\tconst firstStatement = sourceFile.statements[0];\n\t\tif (!firstStatement) return false;\n\t\tif (tsLib.isExpressionStatement(firstStatement) && tsLib.isStringLiteral(firstStatement.expression) && firstStatement.expression.text === \"use client\") return true;\n\t\treturn false;\n\t}\n\tfunction visitNode(node, sourceFile, currentComponent) {\n\t\tif (tsLib.isFunctionDeclaration(node) && node.name) {\n\t\t\tif (isPascalCase(node.name.text)) {\n\t\t\t\tconst key = makeKey(sourceFile.fileName, node.name.text);\n\t\t\t\tgraph.components.set(key, {\n\t\t\t\t\tname: node.name.text,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\tnode,\n\t\t\t\t\tisAsync: hasAsyncModifier(node),\n\t\t\t\t\tline: getLine(sourceFile, node)\n\t\t\t\t});\n\t\t\t\tif (graph.useClientFiles.has(sourceFile.fileName)) graph.clientRoots.add(key);\n\t\t\t\tif (node.body) tsLib.forEachChild(node.body, (child) => visitNode(child, sourceFile, key));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isVariableStatement(node)) {\n\t\t\tfor (const decl of node.declarationList.declarations) if (tsLib.isIdentifier(decl.name) && isPascalCase(decl.name.text) && decl.initializer && isFunctionLike(decl.initializer)) {\n\t\t\t\tconst key = makeKey(sourceFile.fileName, decl.name.text);\n\t\t\t\tgraph.components.set(key, {\n\t\t\t\t\tname: decl.name.text,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\tnode: decl,\n\t\t\t\t\tisAsync: isAsyncFunctionLike(decl.initializer),\n\t\t\t\t\tline: getLine(sourceFile, decl)\n\t\t\t\t});\n\t\t\t\tif (graph.useClientFiles.has(sourceFile.fileName)) graph.clientRoots.add(key);\n\t\t\t\tconst funcNode = decl.initializer;\n\t\t\t\ttsLib.forEachChild(funcNode.body, (child) => visitNode(child, sourceFile, key));\n\t\t\t} else if (decl.initializer) visitNode(decl.initializer, sourceFile, currentComponent);\n\t\t\treturn;\n\t\t}\n\t\tif (tsLib.isCallExpression(node)) {\n\t\t\tconst serverRootKind = getServerRootKind(node, checker);\n\t\t\tif (serverRootKind === \"createCompositeComponent\") {\n\t\t\t\tconst callback = node.arguments[0];\n\t\t\t\tif (callback && isFunctionLike(callback)) collectJsxComponentRefs(callback, sourceFile, currentComponent, true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (serverRootKind === \"renderServerComponent\") {\n\t\t\t\tconst element = node.arguments[0];\n\t\t\t\tif (element) collectJsxComponentRefs(element, sourceFile, currentComponent, true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isCallExpression(node)) {\n\t\t\tconst routeOptions = getRouteOptionsObject(node);\n\t\t\tif (routeOptions) {\n\t\t\t\tfor (const prop of routeOptions.properties) if (tsLib.isPropertyAssignment(prop) && tsLib.isIdentifier(prop.name) && ROUTE_COMPONENT_OPTION_NAMES.includes(prop.name.text)) markAsClientRoot(prop.initializer, sourceFile, currentComponent, prop);\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isJsxOpeningElement(node) || tsLib.isJsxSelfClosingElement(node)) {\n\t\t\tconst tagName = node.tagName;\n\t\t\tif (tsLib.isIdentifier(tagName) && isPascalCase(tagName.text)) {\n\t\t\t\tconst symbol = checker.getSymbolAtLocation(tagName);\n\t\t\t\tif (symbol) {\n\t\t\t\t\tconst resolved = resolveSymbol(symbol);\n\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\tconst decls = resolved.getDeclarations();\n\t\t\t\t\t\tif (decls && decls.length > 0) {\n\t\t\t\t\t\t\tconst declFile = decls[0].getSourceFile().fileName;\n\t\t\t\t\t\t\tconst toKey = makeKey(declFile, tagName.text);\n\t\t\t\t\t\t\tif (currentComponent) graph.edges.push({\n\t\t\t\t\t\t\t\tfromFile: sourceFile.fileName,\n\t\t\t\t\t\t\t\tfromComponent: currentComponent.split(\":\")[1],\n\t\t\t\t\t\t\t\ttoFile: declFile,\n\t\t\t\t\t\t\t\ttoComponent: tagName.text,\n\t\t\t\t\t\t\t\ttoComponentKey: toKey,\n\t\t\t\t\t\t\t\tjsxNode: node,\n\t\t\t\t\t\t\t\tjsxLine: getLine(sourceFile, node)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttsLib.forEachChild(node, (child) => visitNode(child, sourceFile, currentComponent));\n\t}\n\tfunction getServerRootKind(node, _checker) {\n\t\tif (tsLib.isIdentifier(node.expression)) {\n\t\t\tconst name = node.expression.text;\n\t\t\treturn SERVER_COMPONENT_ROOTS.includes(name) ? name : null;\n\t\t}\n\t\tif (tsLib.isPropertyAccessExpression(node.expression) && tsLib.isIdentifier(node.expression.name)) {\n\t\t\tconst name = node.expression.name.text;\n\t\t\treturn SERVER_COMPONENT_ROOTS.includes(name) ? name : null;\n\t\t}\n\t\treturn null;\n\t}\n\tfunction getRouteOptionsObject(node) {\n\t\tconst optionsArg = node.arguments[0];\n\t\tif (!optionsArg || !tsLib.isObjectLiteralExpression(optionsArg)) return;\n\t\tconst routeCreator = findRouteCreatorFromCallee(node.expression);\n\t\tif (!routeCreator) return;\n\t\tconst routeCreatorName = tsLib.isIdentifier(routeCreator) ? routeCreator.text : routeCreator.name.text;\n\t\tif (ROUTE_CREATOR_NAMES.includes(routeCreatorName)) return optionsArg;\n\t}\n\tfunction findRouteCreatorFromCallee(expr) {\n\t\tif (tsLib.isParenthesizedExpression(expr)) return findRouteCreatorFromCallee(expr.expression);\n\t\tif (tsLib.isCallExpression(expr)) return findRouteCreatorFromCallee(expr.expression);\n\t\tif (tsLib.isPropertyAccessExpression(expr)) {\n\t\t\tif (tsLib.isIdentifier(expr.name)) {\n\t\t\t\tif (ROUTE_CREATOR_NAMES.includes(expr.name.text)) return expr;\n\t\t\t}\n\t\t\treturn findRouteCreatorFromCallee(expr.expression);\n\t\t}\n\t\tif (tsLib.isIdentifier(expr)) return expr;\n\t}\n\tfunction markAsClientRoot(node, sourceFile, _currentComponent, usageNode) {\n\t\tif (tsLib.isIdentifier(node)) {\n\t\t\tconst componentName = node.text;\n\t\t\tconst symbol = checker.getSymbolAtLocation(node);\n\t\t\tif (symbol) {\n\t\t\t\tconst resolved = resolveSymbol(symbol);\n\t\t\t\tif (resolved) {\n\t\t\t\t\tconst decls = resolved.getDeclarations();\n\t\t\t\t\tif (decls && decls.length > 0) {\n\t\t\t\t\t\tconst declFile = decls[0].getSourceFile().fileName;\n\t\t\t\t\t\tconst key = makeKey(declFile, componentName);\n\t\t\t\t\t\tgraph.clientRoots.add(key);\n\t\t\t\t\t\tif (usageNode) {\n\t\t\t\t\t\t\tgraph.routeOptionUsages.set(key, {\n\t\t\t\t\t\t\t\tcomponentKey: key,\n\t\t\t\t\t\t\t\tusageNode,\n\t\t\t\t\t\t\t\tusageLine: getLine(sourceFile, usageNode),\n\t\t\t\t\t\t\t\tfileName: sourceFile.fileName\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\taddToRouteOptionRootsByFile(sourceFile.fileName, key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst fallbackKey = makeKey(sourceFile.fileName, componentName);\n\t\t\tgraph.clientRoots.add(fallbackKey);\n\t\t\tif (usageNode) {\n\t\t\t\tgraph.routeOptionUsages.set(fallbackKey, {\n\t\t\t\t\tcomponentKey: fallbackKey,\n\t\t\t\t\tusageNode,\n\t\t\t\t\tusageLine: getLine(sourceFile, usageNode),\n\t\t\t\t\tfileName: sourceFile.fileName\n\t\t\t\t});\n\t\t\t\taddToRouteOptionRootsByFile(sourceFile.fileName, fallbackKey);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (isFunctionLike(node)) collectJsxComponentRefs(node, sourceFile, null, false, usageNode);\n\t}\n\tfunction collectJsxComponentRefs(node, sourceFile, _currentComponent, isServerContext, usageNode) {\n\t\tfunction walk(n) {\n\t\t\tif (tsLib.isJsxOpeningElement(n) || tsLib.isJsxSelfClosingElement(n)) {\n\t\t\t\tconst tagName = n.tagName;\n\t\t\t\tif (tsLib.isIdentifier(tagName) && isPascalCase(tagName.text)) {\n\t\t\t\t\tconst symbol = checker.getSymbolAtLocation(tagName);\n\t\t\t\t\tif (symbol) {\n\t\t\t\t\t\tconst resolved = resolveSymbol(symbol);\n\t\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\t\tconst decls = resolved.getDeclarations();\n\t\t\t\t\t\t\tif (decls && decls.length > 0) {\n\t\t\t\t\t\t\t\tconst declFile = decls[0].getSourceFile().fileName;\n\t\t\t\t\t\t\t\tconst key = makeKey(declFile, tagName.text);\n\t\t\t\t\t\t\t\tif (isServerContext) graph.serverRoots.add(key);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.clientRoots.add(key);\n\t\t\t\t\t\t\t\t\tconst effectiveUsageNode = usageNode ?? n;\n\t\t\t\t\t\t\t\t\tgraph.routeOptionUsages.set(key, {\n\t\t\t\t\t\t\t\t\t\tcomponentKey: key,\n\t\t\t\t\t\t\t\t\t\tusageNode: effectiveUsageNode,\n\t\t\t\t\t\t\t\t\t\tusageLine: getLine(sourceFile, effectiveUsageNode),\n\t\t\t\t\t\t\t\t\t\tfileName: sourceFile.fileName\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\taddToRouteOptionRootsByFile(sourceFile.fileName, key);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttsLib.forEachChild(n, walk);\n\t\t}\n\t\twalk(node);\n\t}\n\tfunction resolveSymbol(symbol) {\n\t\tif (symbol.flags & tsLib.SymbolFlags.Alias) return checker.getAliasedSymbol(symbol);\n\t\treturn symbol;\n\t}\n\tfunction isPascalCase(name) {\n\t\treturn /^[A-Z]/.test(name);\n\t}\n\tfunction hasAsyncModifier(node) {\n\t\treturn node.modifiers?.some((mod) => mod.kind === tsLib.SyntaxKind.AsyncKeyword) ?? false;\n\t}\n\tfunction isFunctionLike(node) {\n\t\treturn tsLib.isArrowFunction(node) || tsLib.isFunctionExpression(node) || tsLib.isFunctionDeclaration(node);\n\t}\n\tfunction isAsyncFunctionLike(node) {\n\t\tif (tsLib.isArrowFunction(node) || tsLib.isFunctionExpression(node)) return hasAsyncModifier(node);\n\t\treturn false;\n\t}\n\tfunction makeKey(fileName, componentName) {\n\t\treturn `${fileName}:${componentName}`;\n\t}\n\tfunction getLine(sourceFile, node) {\n\t\treturn sourceFile.getLineAndCharacterOfPosition(node.getStart()).line + 1;\n\t}\n\tfunction addToRouteOptionRootsByFile(fileName, key) {\n\t\tlet set = graph.routeOptionRootsByFile.get(fileName);\n\t\tif (!set) {\n\t\t\tset = /* @__PURE__ */ new Set();\n\t\t\tgraph.routeOptionRootsByFile.set(fileName, set);\n\t\t}\n\t\tset.add(key);\n\t}\n}\n//#endregion\nexport { createRenderGraphBuilder };\n\n//# sourceMappingURL=render-graph-builder.js.map","//#region src/rules/no-async-client-component/context-analyzer.ts\n/**\n* Analyzes the render graph to propagate server/client context.\n*\n* Algorithm:\n* 1. Mark server roots as server context, propagate to descendants\n* 2. Stop propagation at 'use client' boundaries\n* 3. Mark client roots as client context, propagate to descendants\n* 4. Components reachable from both => client wins (tainted)\n\n*/\nfunction analyzeContext(graph) {\n\tconst contexts = /* @__PURE__ */ new Map();\n\tfor (const [key, component] of graph.components) contexts.set(key, {\n\t\tkey,\n\t\tcomponent,\n\t\tisServerContext: false,\n\t\tisClientContext: false\n\t});\n\tconst adjacency = buildAdjacencyList(graph.edges);\n\tconst serverVisited = /* @__PURE__ */ new Set();\n\tfor (const serverRoot of graph.serverRoots) propagateServerContext(serverRoot, serverVisited, graph, contexts, adjacency);\n\tconst clientVisited = /* @__PURE__ */ new Set();\n\tfor (const clientRoot of graph.clientRoots) {\n\t\tconst ctx = contexts.get(clientRoot);\n\t\tif (!ctx) continue;\n\t\tlet reason;\n\t\tif (graph.useClientFiles.has(ctx.component.fileName)) reason = {\n\t\t\ttype: \"use-client\",\n\t\t\tfileName: ctx.component.fileName\n\t\t};\n\t\telse {\n\t\t\tconst routeUsage = graph.routeOptionUsages.get(clientRoot);\n\t\t\treason = {\n\t\t\t\ttype: \"route-option\",\n\t\t\t\tfileName: ctx.component.fileName,\n\t\t\t\tusageFile: routeUsage?.fileName,\n\t\t\t\tusageNode: routeUsage?.usageNode,\n\t\t\t\tusageLine: routeUsage?.usageLine\n\t\t\t};\n\t\t}\n\t\tpropagateClientContext(clientRoot, clientVisited, contexts, adjacency, reason);\n\t}\n\tfor (const [_key, ctx] of contexts) if (graph.useClientFiles.has(ctx.component.fileName) && !ctx.isClientContext) {\n\t\tctx.isClientContext = true;\n\t\tctx.clientReason = {\n\t\t\ttype: \"use-client\",\n\t\t\tfileName: ctx.component.fileName\n\t\t};\n\t}\n\tconst clientEdges = [];\n\tfor (const edge of graph.edges) {\n\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\tif (contexts.get(fromKey)?.isClientContext) clientEdges.push(edge);\n\t}\n\treturn {\n\t\tcontexts,\n\t\tclientEdges\n\t};\n}\nfunction buildAdjacencyList(edges) {\n\tconst adj = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\tif (!adj.has(fromKey)) adj.set(fromKey, []);\n\t\tadj.get(fromKey).push(edge);\n\t}\n\treturn adj;\n}\nfunction propagateServerContext(key, visited, graph, contexts, adjacency) {\n\tif (visited.has(key)) return;\n\tvisited.add(key);\n\tconst ctx = contexts.get(key);\n\tif (!ctx) return;\n\tif (graph.useClientFiles.has(ctx.component.fileName)) {\n\t\tctx.isClientContext = true;\n\t\tctx.clientReason = {\n\t\t\ttype: \"use-client\",\n\t\t\tfileName: ctx.component.fileName\n\t\t};\n\t\treturn;\n\t}\n\tctx.isServerContext = true;\n\tconst edges = adjacency.get(key) ?? [];\n\tfor (const edge of edges) propagateServerContext(edge.toComponentKey, visited, graph, contexts, adjacency);\n}\nfunction propagateClientContext(key, visited, contexts, adjacency, reason) {\n\tif (visited.has(key)) return;\n\tvisited.add(key);\n\tconst ctx = contexts.get(key);\n\tif (!ctx) return;\n\tctx.isClientContext = true;\n\tif (!ctx.clientReason) ctx.clientReason = reason;\n\tconst edges = adjacency.get(key) ?? [];\n\tfor (const edge of edges) propagateClientContext(edge.toComponentKey, visited, contexts, adjacency, {\n\t\ttype: \"rendered-by-client\",\n\t\tparentComponent: ctx.component.name,\n\t\tparentFile: ctx.component.fileName\n\t});\n}\n//#endregion\nexport { analyzeContext };\n\n//# sourceMappingURL=context-analyzer.js.map","import { getDocsUrl } from \"../../utils/get-docs-url.js\";\nimport { createRenderGraphBuilder } from \"./render-graph-builder.js\";\nimport { analyzeContext } from \"./context-analyzer.js\";\nimport path from \"node:path\";\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport * as ts from \"typescript\";\n//#region src/rules/no-async-client-component/no-async-client-component.rule.ts\nvar name = \"no-async-client-component\";\nvar perProgramCache = /* @__PURE__ */ new WeakMap();\nvar onDemandCache = /* @__PURE__ */ new WeakMap();\nvar adjacencyCache = /* @__PURE__ */ new WeakMap();\nvar rule = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Disallow async components in client context. Async components are only valid inside server components.\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tschema: [{\n\t\t\ttype: \"object\",\n\t\t\tproperties: { ignorePatterns: {\n\t\t\t\ttype: \"array\",\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdescription: \"File patterns to ignore\"\n\t\t\t} },\n\t\t\tadditionalProperties: false\n\t\t}],\n\t\tmessages: {\n\t\t\tasyncClientComponentDefinition: \"Async component \\\"{{name}}\\\" cannot be used in client context. Async components are only valid inside server components. Either remove \\\"async\\\" or ensure this component is only rendered within server components. {{reason}}\",\n\t\t\tasyncClientComponentUsage: \"Async component \\\"{{name}}\\\" is rendered in client context here. Async components are only valid inside server components. Move this to a server component or use a non-async version.\"\n\t\t}\n\t},\n\tdefaultOptions: [{ ignorePatterns: [] }],\n\tcreate(context, [options]) {\n\t\tconst services = ESLintUtils.getParserServices(context);\n\t\tconst program = services.program;\n\t\tconst checker = program.getTypeChecker();\n\t\tconst currentFile = path.isAbsolute(context.filename) ? context.filename : path.resolve(context.cwd, context.filename);\n\t\tif (shouldIgnore(currentFile, [...options.ignorePatterns])) return {};\n\t\tlet cached = perProgramCache.get(program);\n\t\tif (!cached) {\n\t\t\tcached = {\n\t\t\t\tbuilder: createRenderGraphBuilder(ts, program, checker),\n\t\t\t\tgraphBuilt: false\n\t\t\t};\n\t\t\tperProgramCache.set(program, cached);\n\t\t}\n\t\tconst reported = /* @__PURE__ */ new Set();\n\t\treturn { Program() {\n\t\t\tconst sourceFile = program.getSourceFile(currentFile);\n\t\t\tif (!sourceFile) return;\n\t\t\tif (fileContainsRouteOptions(sourceFile)) {}\n\t\t\tconst analysis = getOnDemandAnalysis(currentFile);\n\t\t\tfor (const [key, ctx] of analysis.contexts) {\n\t\t\t\tif (!ctx.component.isAsync || !ctx.isClientContext) continue;\n\t\t\t\tconst reportKey = `def:${key}`;\n\t\t\t\tif (reported.has(reportKey)) continue;\n\t\t\t\tif (ctx.clientReason?.type === \"route-option\") {\n\t\t\t\t\tconst usageFile = ctx.clientReason.usageFile;\n\t\t\t\t\tif (usageFile && usageFile === currentFile) {\n\t\t\t\t\t\tconst usageTsNode = ctx.clientReason.usageNode;\n\t\t\t\t\t\tconst usageEslintNode = services.tsNodeToESTreeNodeMap.get(usageTsNode);\n\t\t\t\t\t\tif (usageEslintNode) {\n\t\t\t\t\t\t\treported.add(reportKey);\n\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\tnode: usageEslintNode,\n\t\t\t\t\t\t\t\tmessageId: \"asyncClientComponentDefinition\",\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tname: ctx.component.name,\n\t\t\t\t\t\t\t\t\treason: formatReason(ctx.clientReason, context.cwd)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\treported.add(reportKey);\n\t\t\t\tconst tsNode = ctx.component.node;\n\t\t\t\tconst eslintNode = services.tsNodeToESTreeNodeMap.get(tsNode);\n\t\t\t\tif (eslintNode) context.report({\n\t\t\t\t\tnode: eslintNode,\n\t\t\t\t\tmessageId: \"asyncClientComponentDefinition\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tname: ctx.component.name,\n\t\t\t\t\t\treason: ctx.clientReason ? formatReason(ctx.clientReason, context.cwd) : \"\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const edge of analysis.clientEdges) {\n\t\t\t\tif (!analysis.contexts.get(edge.toComponentKey)?.component.isAsync) continue;\n\t\t\t\tif (edge.fromFile !== currentFile) continue;\n\t\t\t\tconst reportKey = `usage:${edge.fromFile}:${edge.jsxLine}:${edge.toComponent}`;\n\t\t\t\tif (reported.has(reportKey)) continue;\n\t\t\t\treported.add(reportKey);\n\t\t\t\tconst eslintNode = services.tsNodeToESTreeNodeMap.get(edge.jsxNode);\n\t\t\t\tif (eslintNode) context.report({\n\t\t\t\t\tnode: eslintNode,\n\t\t\t\t\tmessageId: \"asyncClientComponentUsage\",\n\t\t\t\t\tdata: { name: edge.toComponent }\n\t\t\t\t});\n\t\t\t}\n\t\t} };\n\t\tfunction shouldIgnore(filePath, patterns) {\n\t\t\tfor (const pattern of patterns) if (filePath.includes(pattern)) return true;\n\t\t\treturn false;\n\t\t}\n\t\tfunction formatReason(reason, cwd) {\n\t\t\tswitch (reason.type) {\n\t\t\t\tcase \"use-client\": return `File has \"use client\" directive.`;\n\t\t\t\tcase \"route-option\": return `Component is referenced by a route option (createFileRoute/createRootRoute).`;\n\t\t\t\tcase \"rendered-by-client\": return `Rendered by client component \"${reason.parentComponent}\" in ${path.relative(cwd, reason.parentFile)}.`;\n\t\t\t}\n\t\t}\n\t\tfunction getOnDemandAnalysis(entryFile) {\n\t\t\tlet programCache = onDemandCache.get(program);\n\t\t\tif (!programCache) {\n\t\t\t\tprogramCache = /* @__PURE__ */ new Map();\n\t\t\t\tonDemandCache.set(program, programCache);\n\t\t\t}\n\t\t\tconst cachedResult = programCache.get(entryFile);\n\t\t\tif (cachedResult) return cachedResult.analysis;\n\t\t\tif (!cached.graphBuilt) {\n\t\t\t\tcached.builder.build();\n\t\t\t\tcached.graphBuilt = true;\n\t\t\t}\n\t\t\tconst full = cached.builder.getGraph();\n\t\t\tconst subgraph = sliceGraphForEntryFile(full, entryFile);\n\t\t\tconst entrySourceFile = program.getSourceFile(entryFile);\n\t\t\tconst analysis = !!entrySourceFile && subgraph.clientRoots.size === 0 && subgraph.serverRoots.size === 0 ? analyzeContext(full) : analyzeContext(subgraph);\n\t\t\tprogramCache.set(entryFile, {\n\t\t\t\tgraph: subgraph,\n\t\t\t\tanalysis\n\t\t\t});\n\t\t\treturn analysis;\n\t\t}\n\t\tfunction sliceGraphForEntryFile(full, entryFile) {\n\t\t\tconst components = full.components;\n\t\t\tconst edges = full.edges;\n\t\t\tconst serverRoots = full.serverRoots;\n\t\t\tconst clientRoots = full.clientRoots;\n\t\t\tconst useClientFiles = full.useClientFiles;\n\t\t\tconst routeOptionUsages = full.routeOptionUsages;\n\t\t\tconst entryClientRoots = /* @__PURE__ */ new Set();\n\t\t\tconst entryServerRoots = /* @__PURE__ */ new Set();\n\t\t\tconst routeRootsInFile = routeOptionUsages.size > 0 ? full.routeOptionRootsByFile.get(entryFile) : void 0;\n\t\t\tif (routeRootsInFile) {\n\t\t\t\tfor (const key of routeRootsInFile) if (clientRoots.has(key)) entryClientRoots.add(key);\n\t\t\t}\n\t\t\tfor (const key of serverRoots) if (components.get(key)?.fileName === entryFile) entryServerRoots.add(key);\n\t\t\tif (useClientFiles.has(entryFile)) {\n\t\t\t\tfor (const [key, component] of components) if (component.fileName === entryFile) entryClientRoots.add(key);\n\t\t\t}\n\t\t\tconst reachable = /* @__PURE__ */ new Set();\n\t\t\tconst queue = [];\n\t\t\tfor (const r of entryClientRoots) queue.push(r);\n\t\t\tfor (const r of entryServerRoots) queue.push(r);\n\t\t\tconst adjacency = getAdjacency(full);\n\t\t\twhile (queue.length) {\n\t\t\t\tconst key = queue.pop();\n\t\t\t\tif (reachable.has(key)) continue;\n\t\t\t\treachable.add(key);\n\t\t\t\tconst children = adjacency.get(key);\n\t\t\t\tif (!children) continue;\n\t\t\t\tfor (const toKey of children) if (!reachable.has(toKey)) queue.push(toKey);\n\t\t\t}\n\t\t\tconst subComponents = /* @__PURE__ */ new Map();\n\t\t\tfor (const key of reachable) {\n\t\t\t\tconst comp = components.get(key);\n\t\t\t\tif (comp) subComponents.set(key, comp);\n\t\t\t}\n\t\t\tconst subEdges = edges.filter((edge) => {\n\t\t\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\t\t\treturn reachable.has(fromKey) && reachable.has(edge.toComponentKey);\n\t\t\t});\n\t\t\tconst subServerRoots = new Set([...entryServerRoots].filter((k) => reachable.has(k)));\n\t\t\tconst subClientRoots = new Set([...entryClientRoots].filter((k) => reachable.has(k)));\n\t\t\tconst subRouteOptionUsages = /* @__PURE__ */ new Map();\n\t\t\tconst subRouteOptionRootsByFile = /* @__PURE__ */ new Map();\n\t\t\tfor (const key of subClientRoots) {\n\t\t\t\tconst usage = routeOptionUsages.get(key);\n\t\t\t\tif (usage) {\n\t\t\t\t\tsubRouteOptionUsages.set(key, usage);\n\t\t\t\t\tlet set = subRouteOptionRootsByFile.get(usage.fileName);\n\t\t\t\t\tif (!set) {\n\t\t\t\t\t\tset = /* @__PURE__ */ new Set();\n\t\t\t\t\t\tsubRouteOptionRootsByFile.set(usage.fileName, set);\n\t\t\t\t\t}\n\t\t\t\t\tset.add(key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcomponents: subComponents,\n\t\t\t\tedges: subEdges,\n\t\t\t\tserverRoots: subServerRoots,\n\t\t\t\tclientRoots: subClientRoots,\n\t\t\t\tuseClientFiles,\n\t\t\t\trouteOptionUsages: subRouteOptionUsages,\n\t\t\t\trouteOptionRootsByFile: subRouteOptionRootsByFile\n\t\t\t};\n\t\t}\n\t\tfunction getAdjacency(full) {\n\t\t\tlet cachedAdjacency = adjacencyCache.get(program);\n\t\t\tif (cachedAdjacency) return cachedAdjacency;\n\t\t\tcachedAdjacency = /* @__PURE__ */ new Map();\n\t\t\tfor (const edge of full.edges) {\n\t\t\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\t\t\tlet set = cachedAdjacency.get(fromKey);\n\t\t\t\tif (!set) {\n\t\t\t\t\tset = /* @__PURE__ */ new Set();\n\t\t\t\t\tcachedAdjacency.set(fromKey, set);\n\t\t\t\t}\n\t\t\t\tset.add(edge.toComponentKey);\n\t\t\t}\n\t\t\tadjacencyCache.set(program, cachedAdjacency);\n\t\t\treturn cachedAdjacency;\n\t\t}\n\t\tfunction fileHasUseClientDirective(sourceFile) {\n\t\t\tconst firstStmt = sourceFile.statements[0];\n\t\t\tif (!firstStmt) return false;\n\t\t\treturn ts.isExpressionStatement(firstStmt) && ts.isStringLiteral(firstStmt.expression) && firstStmt.expression.text === \"use client\";\n\t\t}\n\t\tfunction fileContainsServerComponentRoots(sourceFile) {\n\t\t\tconst text = sourceFile.text;\n\t\t\treturn text.includes(\"renderServerComponent\") || text.includes(\"createCompositeComponent\");\n\t\t}\n\t\tfunction fileContainsRouteOptions(sourceFile) {\n\t\t\tconst text = sourceFile.text;\n\t\t\tif (!text.includes(\"createFileRoute\") && !text.includes(\"createRootRoute\") && !text.includes(\"createRootRouteWithContext\")) return false;\n\t\t\treturn text.includes(\"component\") || text.includes(\"pendingComponent\") || text.includes(\"errorComponent\") || text.includes(\"notFoundComponent\");\n\t\t}\n\t}\n});\n//#endregion\nexport { name, rule };\n\n//# sourceMappingURL=no-async-client-component.rule.js.map","import { name, rule } from \"./rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js\";\nimport { name as name$1, rule as rule$1 } from \"./rules/no-async-client-component/no-async-client-component.rule.js\";\n//#region src/rules.ts\nvar rules = {\n\t[name]: rule,\n\t[name$1]: rule$1\n};\n//#endregion\nexport { rules };\n\n//# sourceMappingURL=rules.js.map","import { rules } from \"./rules.js\";\n//#region src/index.ts\nvar plugin = {\n\tmeta: { name: \"@tanstack/eslint-plugin-start\" },\n\tconfigs: {},\n\trules\n};\nObject.assign(plugin.configs, {\n\trecommended: {\n\t\tplugins: [\"@tanstack/eslint-plugin-start\"],\n\t\trules: {\n\t\t\t\"@tanstack/start/no-client-code-in-server-component\": \"error\",\n\t\t\t\"@tanstack/start/no-async-client-component\": \"error\"\n\t\t}\n\t},\n\t\"flat/recommended\": [{\n\t\tplugins: { \"@tanstack/start\": plugin },\n\t\trules: {\n\t\t\t\"@tanstack/start/no-client-code-in-server-component\": \"error\",\n\t\t\t\"@tanstack/start/no-async-client-component\": \"error\"\n\t\t}\n\t}]\n});\n//#endregion\nexport { plugin as default };\n\n//# sourceMappingURL=index.js.map","import tanstackStart from \"@tanstack/eslint-plugin-start\";\nimport type { Plugin } from \"vite-plus/lint/plugins\";\n\nimport { typedRules } from \"./typed-rule.ts\";\n\nconst plugin: Plugin = {\n meta: { name: \"tanstack-start\" },\n rules: typedRules(tanstackStart.rules),\n};\n\nexport default plugin;\n"],"ignoreList":[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,cAAc,aAAa,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACGhF,MAAM,sCAA+C,IAAI,IAAI;CAC3D,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW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AAC;CACrD,MAAM,8BAA8B,IAAI,IAAI;CAC5C,KAAK,MAAM,QAAQ,gBAAgB,IAAI,CAAC,YAAY,IAAI,IAAI,GAAG,YAAY,IAAI,IAAI;CACnF,OAAO;AACR,EAAA,CAAG;;;;AAIH,IAAI,uCAAuB,IAAI,IAAI;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;;;AAID,SAAS,oBAAoB,MAAM;CAClC,OAAO,qBAAqB,IAAI,IAAI;AACrC;;;;AAIA,SAAS,iBAAiB,MAAM,eAAe,uBAAuB;CACrE,IAAI,CAAC,YAAY,KAAK,IAAI,GAAG,OAAO;CACpC,IAAI,aAAa,IAAI,IAAI,GAAG,OAAO;CACnC,OAAO;AACR;;;;;AChMA,SAAS,YAAY,MAAM,Y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AAK,SAAS,mBAAmB;EAC/I;CACD;AACD,CAAC;;AEtOD,IAAIK,WAAS;CACZ,MAAM,EAAE,MAAM,gCAAgC;CAC9C,SAAS,CAAC;CACV;GDDCJ,SAAOC;GACPC,OAASC;CCAV;AACD;AACA,OAAO,OAAOC,SAAO,SAAS;CAC7B,aAAa;EACZ,SAAS,CAAC,+BAA+B;EACzC,OAAO;GACN,sDAAsD;GACtD,6CAA6C;EAC9C;CACD;CACA,oBAAoB,CAAC;EACpB,SAAS,EAAE,mBAAmBA,SAAO;EACrC,OAAO;GACN,sDAAsD;GACtD,6CAA6C;EAC9C;CACD,CAAC;AACF,CAAC;;ACjBD,MAAM,SAAiB;CACrB,MAAM,EAAE,MAAM,iBAAiB;CAC/B,OAAO,WAAWC,SAAc,KAAK;AACvC"}
1
+ {"version":3,"file":"tanstack-start.mjs","names":["Arr","ts.isExpressionStatement","ts.isStringLiteral","globals","name","rule","ESLintUtils","ts","ts.isFunctionLike","ts.isIdentifier","ts.isObjectBindingPattern","ts.isArrayBindingPattern","ts.isBindingElement","ts.isParameter","ts.isJsxOpeningElement","ts.isJsxSelfClosingElement","ts.isCallExpression","ESLintUtils","ts","name","rule","name$1","rule$1","plugin","tanstackStart"],"sources":["../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/utils/get-docs-url.js","../src/ts-compat.ts","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/shared/use-client-resolver.js","../../../node_modules/.pnpm/globals@16.4.0/node_modules/globals/globals.json","../../../node_modules/.pnpm/globals@16.4.0/node_modules/globals/index.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/constants.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/violation-detector.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/transitive-analyzer.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js","../../../node_modules/.pnpm/@typescript-eslint+utils@8.72.1_eslint@9.39.5_jiti@2.6.1_supports-color@7.2.0__supports-color@7.2.0_typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js","../src/typescript-eslint-utils.ts","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/constants.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/render-graph-builder.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/context-analyzer.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules/no-async-client-component/no-async-client-component.rule.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/rules.js","../../../node_modules/.pnpm/@tanstack+eslint-plugin-start@0.1.0_patch_hash=364cc40b73326fe59c5d685ac247690de2302e3e_6fe772255ffd0fd176acbd64769f9ccb/node_modules/@tanstack/eslint-plugin-start/dist/esm/index.js","../src/tanstack-start.ts"],"sourcesContent":["//#region src/utils/get-docs-url.ts\nvar getDocsUrl = (ruleName) => `https://tanstack.com/start/latest/docs/eslint/${ruleName}`;\n//#endregion\nexport { getDocsUrl };\n\n//# sourceMappingURL=get-docs-url.js.map","import { Array as Arr, Function, Option, Predicate } from \"effect\";\nimport { SyntaxKind } from \"typescript-7/ast\";\nimport type { Node } from \"typescript-7/ast\";\n\nconst FUNCTION_LIKE_KINDS: ReadonlySet<SyntaxKind> = new Set([\n SyntaxKind.FunctionDeclaration,\n SyntaxKind.MethodDeclaration,\n SyntaxKind.Constructor,\n SyntaxKind.GetAccessor,\n SyntaxKind.SetAccessor,\n SyntaxKind.FunctionExpression,\n SyntaxKind.ArrowFunction,\n SyntaxKind.MethodSignature,\n SyntaxKind.CallSignature,\n SyntaxKind.JSDocSignature,\n SyntaxKind.ConstructSignature,\n SyntaxKind.IndexSignature,\n SyntaxKind.FunctionType,\n SyntaxKind.ConstructorType,\n]);\n\nconst isFunctionLike = (node: Node | null | undefined): boolean =>\n Option.fromNullishOr(node).pipe(Option.exists(({ kind }) => FUNCTION_LIKE_KINDS.has(kind)));\n\nconst forEachChild: {\n <Result>(visit: (child: Node) => Result | undefined): (node: Node) => Result | undefined;\n <Result>(node: Node, visit: (child: Node) => Result | undefined): Result | undefined;\n} = Function.dual(\n (args) =>\n Arr.head(Arr.fromIterable(args)).pipe(Option.exists(Predicate.not(Predicate.isFunction))),\n <Result>(node: Node, visit: (child: Node) => Result | undefined): Result | undefined =>\n node.forEachChild(visit),\n);\n\nexport {\n isArrayBindingPattern,\n isArrowFunction,\n isBindingElement,\n isCallExpression,\n isClassDeclaration,\n isClassExpression,\n isExpressionStatement,\n isFunctionDeclaration,\n isFunctionExpression,\n isIdentifier,\n isImportClause,\n isImportSpecifier,\n isInterfaceDeclaration,\n isJsxAttribute,\n isJsxExpression,\n isJsxOpeningElement,\n isJsxSelfClosingElement,\n isMethodDeclaration,\n isObjectBindingPattern,\n isObjectLiteralExpression,\n isParenthesizedExpression,\n isPropertyAccessExpression,\n isPropertyAssignment,\n isPropertyDeclaration,\n isStringLiteral,\n isTypeAliasDeclaration,\n isTypeParameterDeclaration,\n isTypeQueryNode,\n isTypeReferenceNode,\n isVariableDeclaration,\n isVariableStatement,\n isParameterDeclaration as isParameter,\n} from \"typescript-7/ast/is\";\nexport { SyntaxKind } from \"typescript-7/ast\";\nexport { SymbolFlags } from \"typescript-7/sync\";\nexport { forEachChild, isFunctionLike };\n","import * as ts from \"typescript\";\n//#region src/shared/use-client-resolver.ts\n/**\n* Creates a resolver that checks for 'use client' directive in source files\n*/\nfunction createUseClientResolver(program) {\n\tfunction hasUseClientDirective(fileName) {\n\t\tconst sourceFile = program.getSourceFile(fileName);\n\t\tif (!sourceFile) return false;\n\t\tconst firstStmt = sourceFile.statements[0];\n\t\tif (!firstStmt) return false;\n\t\tif (ts.isExpressionStatement(firstStmt) && ts.isStringLiteral(firstStmt.expression)) return firstStmt.expression.text === \"use client\";\n\t\treturn false;\n\t}\n\treturn { hasUseClientDirective };\n}\n//#endregion\nexport { createUseClientResolver };\n\n//# sourceMappingURL=use-client-resolver.js.map","","'use strict';\nmodule.exports = require('./globals.json');\n","import globals from \"globals\";\n//#region src/rules/no-client-code-in-server-component/constants.ts\n/**\n* Hooks allowed in server components\n*/\nvar DEFAULT_ALLOWED_HOOKS = new Set([\"useId\"]);\n/**\n* Browser-only globals not available in server context\n* Dynamically computed from globals package: browser globals that are NOT in node\n*/\nvar BROWSER_ONLY_GLOBALS = (() => {\n\tconst browserGlobals = Object.keys(globals.browser);\n\tconst nodeGlobals = new Set(Object.keys(globals.node));\n\tconst browserOnly = /* @__PURE__ */ new Set();\n\tfor (const name of browserGlobals) if (!nodeGlobals.has(name)) browserOnly.add(name);\n\treturn browserOnly;\n})();\n/**\n* React event handler props - comprehensive list from React types\n*/\nvar REACT_EVENT_HANDLERS = new Set([\n\t\"onCopy\",\n\t\"onCopyCapture\",\n\t\"onCut\",\n\t\"onCutCapture\",\n\t\"onPaste\",\n\t\"onPasteCapture\",\n\t\"onCompositionEnd\",\n\t\"onCompositionEndCapture\",\n\t\"onCompositionStart\",\n\t\"onCompositionStartCapture\",\n\t\"onCompositionUpdate\",\n\t\"onCompositionUpdateCapture\",\n\t\"onFocus\",\n\t\"onFocusCapture\",\n\t\"onBlur\",\n\t\"onBlurCapture\",\n\t\"onChange\",\n\t\"onChangeCapture\",\n\t\"onBeforeInput\",\n\t\"onBeforeInputCapture\",\n\t\"onInput\",\n\t\"onInputCapture\",\n\t\"onReset\",\n\t\"onResetCapture\",\n\t\"onSubmit\",\n\t\"onSubmitCapture\",\n\t\"onInvalid\",\n\t\"onInvalidCapture\",\n\t\"onLoad\",\n\t\"onLoadCapture\",\n\t\"onError\",\n\t\"onErrorCapture\",\n\t\"onKeyDown\",\n\t\"onKeyDownCapture\",\n\t\"onKeyPress\",\n\t\"onKeyPressCapture\",\n\t\"onKeyUp\",\n\t\"onKeyUpCapture\",\n\t\"onAbort\",\n\t\"onAbortCapture\",\n\t\"onCanPlay\",\n\t\"onCanPlayCapture\",\n\t\"onCanPlayThrough\",\n\t\"onCanPlayThroughCapture\",\n\t\"onDurationChange\",\n\t\"onDurationChangeCapture\",\n\t\"onEmptied\",\n\t\"onEmptiedCapture\",\n\t\"onEncrypted\",\n\t\"onEncryptedCapture\",\n\t\"onEnded\",\n\t\"onEndedCapture\",\n\t\"onLoadedData\",\n\t\"onLoadedDataCapture\",\n\t\"onLoadedMetadata\",\n\t\"onLoadedMetadataCapture\",\n\t\"onLoadStart\",\n\t\"onLoadStartCapture\",\n\t\"onPause\",\n\t\"onPauseCapture\",\n\t\"onPlay\",\n\t\"onPlayCapture\",\n\t\"onPlaying\",\n\t\"onPlayingCapture\",\n\t\"onProgress\",\n\t\"onProgressCapture\",\n\t\"onRateChange\",\n\t\"onRateChangeCapture\",\n\t\"onResize\",\n\t\"onResizeCapture\",\n\t\"onSeeked\",\n\t\"onSeekedCapture\",\n\t\"onSeeking\",\n\t\"onSeekingCapture\",\n\t\"onStalled\",\n\t\"onStalledCapture\",\n\t\"onSuspend\",\n\t\"onSuspendCapture\",\n\t\"onTimeUpdate\",\n\t\"onTimeUpdateCapture\",\n\t\"onVolumeChange\",\n\t\"onVolumeChangeCapture\",\n\t\"onWaiting\",\n\t\"onWaitingCapture\",\n\t\"onAuxClick\",\n\t\"onAuxClickCapture\",\n\t\"onClick\",\n\t\"onClickCapture\",\n\t\"onContextMenu\",\n\t\"onContextMenuCapture\",\n\t\"onDoubleClick\",\n\t\"onDoubleClickCapture\",\n\t\"onDrag\",\n\t\"onDragCapture\",\n\t\"onDragEnd\",\n\t\"onDragEndCapture\",\n\t\"onDragEnter\",\n\t\"onDragEnterCapture\",\n\t\"onDragExit\",\n\t\"onDragExitCapture\",\n\t\"onDragLeave\",\n\t\"onDragLeaveCapture\",\n\t\"onDragOver\",\n\t\"onDragOverCapture\",\n\t\"onDragStart\",\n\t\"onDragStartCapture\",\n\t\"onDrop\",\n\t\"onDropCapture\",\n\t\"onMouseDown\",\n\t\"onMouseDownCapture\",\n\t\"onMouseEnter\",\n\t\"onMouseLeave\",\n\t\"onMouseMove\",\n\t\"onMouseMoveCapture\",\n\t\"onMouseOut\",\n\t\"onMouseOutCapture\",\n\t\"onMouseOver\",\n\t\"onMouseOverCapture\",\n\t\"onMouseUp\",\n\t\"onMouseUpCapture\",\n\t\"onSelect\",\n\t\"onSelectCapture\",\n\t\"onTouchCancel\",\n\t\"onTouchCancelCapture\",\n\t\"onTouchEnd\",\n\t\"onTouchEndCapture\",\n\t\"onTouchMove\",\n\t\"onTouchMoveCapture\",\n\t\"onTouchStart\",\n\t\"onTouchStartCapture\",\n\t\"onPointerDown\",\n\t\"onPointerDownCapture\",\n\t\"onPointerMove\",\n\t\"onPointerMoveCapture\",\n\t\"onPointerUp\",\n\t\"onPointerUpCapture\",\n\t\"onPointerCancel\",\n\t\"onPointerCancelCapture\",\n\t\"onPointerEnter\",\n\t\"onPointerEnterCapture\",\n\t\"onPointerLeave\",\n\t\"onPointerLeaveCapture\",\n\t\"onPointerOver\",\n\t\"onPointerOverCapture\",\n\t\"onPointerOut\",\n\t\"onPointerOutCapture\",\n\t\"onGotPointerCapture\",\n\t\"onGotPointerCaptureCapture\",\n\t\"onLostPointerCapture\",\n\t\"onLostPointerCaptureCapture\",\n\t\"onScroll\",\n\t\"onScrollCapture\",\n\t\"onWheel\",\n\t\"onWheelCapture\",\n\t\"onAnimationStart\",\n\t\"onAnimationStartCapture\",\n\t\"onAnimationEnd\",\n\t\"onAnimationEndCapture\",\n\t\"onAnimationIteration\",\n\t\"onAnimationIterationCapture\",\n\t\"onTransitionEnd\",\n\t\"onTransitionEndCapture\"\n]);\n/**\n* Check if a prop name is a React event handler\n*/\nfunction isReactEventHandler(name) {\n\treturn REACT_EVENT_HANDLERS.has(name);\n}\n/**\n* Check if a hook name is client-only (not allowed in server components)\n*/\nfunction isClientOnlyHook(name, allowedHooks = DEFAULT_ALLOWED_HOOKS) {\n\tif (!/^use[A-Z]/.test(name)) return false;\n\tif (allowedHooks.has(name)) return false;\n\treturn true;\n}\n//#endregion\nexport { BROWSER_ONLY_GLOBALS, DEFAULT_ALLOWED_HOOKS, isClientOnlyHook, isReactEventHandler };\n\n//# sourceMappingURL=constants.js.map","import { BROWSER_ONLY_GLOBALS, DEFAULT_ALLOWED_HOOKS, isClientOnlyHook, isReactEventHandler } from \"./constants.js\";\n//#region src/rules/no-client-code-in-server-component/violation-detector.ts\n/**\n* Get line and column position for a node\n*/\nfunction getPosition(node, sourceFile) {\n\tconst { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart());\n\treturn {\n\t\tline: line + 1,\n\t\tcolumn: character + 1\n\t};\n}\n/**\n* Creates a detector that finds client-only code violations in TypeScript AST\n*/\nfunction createViolationDetector(tsLib, options = {}) {\n\tconst allowedHooks = options.allowedHooks ?? DEFAULT_ALLOWED_HOOKS;\n\tconst checker = options.checker;\n\t/**\n\t* Check if a class declaration extends React.Component or React.PureComponent\n\t*/\n\tfunction isReactClassComponent(node) {\n\t\tif (!node.heritageClauses) return false;\n\t\tfor (const clause of node.heritageClauses) {\n\t\t\tif (clause.token !== tsLib.SyntaxKind.ExtendsKeyword) continue;\n\t\t\tfor (const type of clause.types) {\n\t\t\t\tconst expr = type.expression;\n\t\t\t\tif (tsLib.isPropertyAccessExpression(expr)) {\n\t\t\t\t\tconst propName = expr.name.text;\n\t\t\t\t\tif (propName === \"Component\" || propName === \"PureComponent\") {\n\t\t\t\t\t\tif (tsLib.isIdentifier(expr.expression)) {\n\t\t\t\t\t\t\tif (expr.expression.text === \"React\") return true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tsLib.isIdentifier(expr)) {\n\t\t\t\t\tconst name = expr.text;\n\t\t\t\t\tif (name === \"Component\" || name === \"PureComponent\") return true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Shared visitor logic that collects violations into the provided array\n\t*/\n\tfunction visitNode(node, sourceFile, violations) {\n\t\tif (tsLib.isClassDeclaration(node) && isReactClassComponent(node)) {\n\t\t\tconst name = node.name?.text ?? \"ClassComponent\";\n\t\t\tviolations.push({\n\t\t\t\ttype: \"class-component\",\n\t\t\t\tname,\n\t\t\t\tnode,\n\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t});\n\t\t}\n\t\tif (tsLib.isCallExpression(node)) {\n\t\t\tconst callee = node.expression;\n\t\t\tlet name = \"\";\n\t\t\tif (tsLib.isIdentifier(callee)) name = callee.text;\n\t\t\telse if (tsLib.isPropertyAccessExpression(callee)) name = callee.name.text;\n\t\t\tif (name && isClientOnlyHook(name, allowedHooks)) violations.push({\n\t\t\t\ttype: \"hook\",\n\t\t\t\tname,\n\t\t\t\tnode,\n\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t});\n\t\t}\n\t\tif (tsLib.isIdentifier(node)) {\n\t\t\tconst name = node.text;\n\t\t\tif (BROWSER_ONLY_GLOBALS.has(name)) {\n\t\t\t\tconst parent = node.parent;\n\t\t\t\tif (tsLib.isPropertyAccessExpression(parent) && parent.name === node) {} else if (tsLib.isPropertyAssignment(parent) && parent.name === node) {} else if (tsLib.isTypeReferenceNode(parent) || tsLib.isInterfaceDeclaration(parent) || tsLib.isTypeAliasDeclaration(parent)) {} else if (tsLib.isParameter(parent) && parent.name === node || tsLib.isVariableDeclaration(parent) && parent.name === node) {} else if (tsLib.isImportSpecifier(parent) || tsLib.isImportClause(parent)) {} else if (checker) {\n\t\t\t\t\tconst symbol = checker.getSymbolAtLocation(node);\n\t\t\t\t\tif (symbol) {\n\t\t\t\t\t\tconst declarations = symbol.getDeclarations();\n\t\t\t\t\t\tif (declarations?.length) if (declarations.some((decl) => {\n\t\t\t\t\t\t\tconst fileName = decl.getSourceFile().fileName;\n\t\t\t\t\t\t\treturn !fileName.includes(\"/node_modules/\") && !fileName.includes(\"/typescript/lib/\");\n\t\t\t\t\t\t})) {} else violations.push({\n\t\t\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t\t});\n\t\t\t\t\t\telse violations.push({\n\t\t\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t\t});\n\t\t\t\t\t} else violations.push({\n\t\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t});\n\t\t\t\t} else violations.push({\n\t\t\t\t\ttype: \"browser-global\",\n\t\t\t\t\tname,\n\t\t\t\t\tnode,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isJsxAttribute(node)) {\n\t\t\tconst attrName = node.name;\n\t\t\tif (tsLib.isIdentifier(attrName)) {\n\t\t\t\tconst name = attrName.text;\n\t\t\t\tconst value = node.initializer;\n\t\t\t\tif (isReactEventHandler(name)) violations.push({\n\t\t\t\t\ttype: \"event-handler\",\n\t\t\t\t\tname,\n\t\t\t\t\tnode,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t});\n\t\t\t\telse if (name !== \"style\" && name !== \"className\" && name !== \"key\" && name !== \"ref\" && name !== \"dangerouslySetInnerHTML\" && value && tsLib.isJsxExpression(value) && value.expression) {\n\t\t\t\t\tconst expr = value.expression;\n\t\t\t\t\tif (tsLib.isArrowFunction(expr) || tsLib.isFunctionExpression(expr)) violations.push({\n\t\t\t\t\t\ttype: \"function-prop\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\t\t...getPosition(node, sourceFile)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttsLib.forEachChild(node, (child) => visitNode(child, sourceFile, violations));\n\t}\n\tfunction detectViolations(sourceFile) {\n\t\tconst violations = [];\n\t\ttsLib.forEachChild(sourceFile, (child) => visitNode(child, sourceFile, violations));\n\t\treturn violations;\n\t}\n\tfunction detectViolationsInNode(node, sourceFile) {\n\t\tconst violations = [];\n\t\tvisitNode(node, sourceFile, violations);\n\t\treturn violations;\n\t}\n\treturn {\n\t\tdetectViolations,\n\t\tdetectViolationsInNode\n\t};\n}\n//#endregion\nexport { createViolationDetector };\n\n//# sourceMappingURL=violation-detector.js.map","//#region src/rules/no-client-code-in-server-component/transitive-analyzer.ts\n/**\n* Creates an analyzer that follows reachable symbol references\n* to find transitive violations, stopping at 'use client' boundaries.\n*/\nfunction createTransitiveAnalyzer(tsLib, program, checker, useClientResolver, violationDetector) {\n\tconst visitedSymbols = /* @__PURE__ */ new Set();\n\tconst analysisCache = /* @__PURE__ */ new Map();\n\tfunction symbolKey(symbol) {\n\t\treturn `${(symbol.getDeclarations()?.[0])?.getSourceFile().fileName ?? \"unknown\"}::${symbol.getName()}`;\n\t}\n\tfunction analyzeEntrySymbol(entrySymbol) {\n\t\tvisitedSymbols.clear();\n\t\tconst cached = analysisCache.get(symbolKey(entrySymbol));\n\t\tif (cached) return cached;\n\t\tconst violations = [];\n\t\tfunction visitSymbol(symbol, chain) {\n\t\t\tconst key = symbolKey(symbol);\n\t\t\tif (visitedSymbols.has(key)) return false;\n\t\t\tvisitedSymbols.add(key);\n\t\t\tconst decl = symbol.getDeclarations()?.[0];\n\t\t\tif (!decl) return false;\n\t\t\tconst sourceFile = decl.getSourceFile();\n\t\t\tconst fileName = sourceFile.fileName;\n\t\t\tif (fileName.includes(\"/node_modules/\") || fileName.endsWith(\".d.ts\")) return false;\n\t\t\tif (useClientResolver.hasUseClientDirective(fileName)) return true;\n\t\t\tconst traversalRoots = getTraversalRoots(decl);\n\t\t\tfor (const root of traversalRoots) {\n\t\t\t\tconst rootViolations = violationDetector.detectViolationsInNode(root, sourceFile);\n\t\t\t\tfor (const v of rootViolations) violations.push({\n\t\t\t\t\t...v,\n\t\t\t\t\tchain: [...chain]\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const root of traversalRoots) {\n\t\t\t\tconst identifiers = collectReachableIdentifiers(root, decl);\n\t\t\t\tfor (const ident of identifiers) {\n\t\t\t\t\tconst refSym = checker.getSymbolAtLocation(ident);\n\t\t\t\t\tif (!refSym) continue;\n\t\t\t\t\tconst aliased = tsLib.SymbolFlags.Alias & refSym.flags ? checker.getAliasedSymbol(refSym) : refSym;\n\t\t\t\t\tconst refFile = (aliased.getDeclarations()?.[0])?.getSourceFile().fileName;\n\t\t\t\t\tif (!refFile) continue;\n\t\t\t\t\tif (refFile.includes(\"/node_modules/\") || refFile.endsWith(\".d.ts\")) continue;\n\t\t\t\t\tconst edge = {\n\t\t\t\t\t\tfromFile: fileName,\n\t\t\t\t\t\ttoFile: refFile,\n\t\t\t\t\t\tviaSymbol: aliased.getName()\n\t\t\t\t\t};\n\t\t\t\t\tvisitSymbol(aliased, [...chain, edge]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t/**\n\t\t* Get traversal roots based on declaration kind\n\t\t*/\n\t\tfunction getTraversalRoots(decl) {\n\t\t\tif (tsLib.isFunctionDeclaration(decl) && decl.body) return [decl.body];\n\t\t\tif (tsLib.isFunctionExpression(decl)) return [decl.body];\n\t\t\tif (tsLib.isArrowFunction(decl)) return [decl.body];\n\t\t\tif (tsLib.isVariableDeclaration(decl) && decl.initializer) {\n\t\t\t\tif (tsLib.isFunctionExpression(decl.initializer) || tsLib.isArrowFunction(decl.initializer)) return [decl.initializer.body];\n\t\t\t\treturn [decl.initializer];\n\t\t\t}\n\t\t\tif (tsLib.isClassDeclaration(decl) || tsLib.isClassExpression(decl)) {\n\t\t\t\tconst roots = [];\n\t\t\t\tfor (const member of decl.members) {\n\t\t\t\t\tif (tsLib.isMethodDeclaration(member) && member.body) roots.push(member.body);\n\t\t\t\t\tif (tsLib.isPropertyDeclaration(member) && member.initializer) roots.push(member.initializer);\n\t\t\t\t}\n\t\t\t\treturn roots;\n\t\t\t}\n\t\t\treturn [decl];\n\t\t}\n\t\t/**\n\t\t* Collect identifier nodes from a traversal root, skipping:\n\t\t* - The defining identifier for the symbol (avoid self-loop)\n\t\t* - Type-only positions\n\t\t* - Property names when not computed\n\t\t*/\n\t\tfunction collectReachableIdentifiers(root, originalDecl) {\n\t\t\tconst identifiers = [];\n\t\t\tlet declName;\n\t\t\tif (\"name\" in originalDecl && originalDecl.name) {\n\t\t\t\tconst nameNode = originalDecl.name;\n\t\t\t\tif (tsLib.isIdentifier(nameNode)) declName = nameNode.text;\n\t\t\t}\n\t\t\tfunction visit(node) {\n\t\t\t\tif (tsLib.isTypeReferenceNode(node) || tsLib.isInterfaceDeclaration(node) || tsLib.isTypeAliasDeclaration(node) || tsLib.isTypeQueryNode(node) || tsLib.isTypeParameterDeclaration(node)) return;\n\t\t\t\tif (tsLib.isIdentifier(node)) {\n\t\t\t\t\tif (node.text === declName) return;\n\t\t\t\t\tconst parent = node.parent;\n\t\t\t\t\tif (tsLib.isPropertyAccessExpression(parent) && parent.name === node) return;\n\t\t\t\t\tif (tsLib.isPropertyAssignment(parent) && parent.name === node) return;\n\t\t\t\t\tif (tsLib.isParameter(parent) && parent.name === node || tsLib.isVariableDeclaration(parent) && parent.name === node) return;\n\t\t\t\t\tidentifiers.push(node);\n\t\t\t\t}\n\t\t\t\ttsLib.forEachChild(node, visit);\n\t\t\t}\n\t\t\tvisit(root);\n\t\t\treturn identifiers;\n\t\t}\n\t\tconst result = {\n\t\t\tisClientBoundary: visitSymbol(entrySymbol, []),\n\t\t\tviolations\n\t\t};\n\t\tanalysisCache.set(symbolKey(entrySymbol), result);\n\t\treturn result;\n\t}\n\treturn { analyzeEntrySymbol };\n}\n//#endregion\nexport { createTransitiveAnalyzer };\n\n//# sourceMappingURL=transitive-analyzer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isObjectNotArray = isObjectNotArray;\nexports.deepMerge = deepMerge;\n/**\n * Check if the variable contains an object strictly rejecting arrays\n * @returns `true` if obj is an object\n */\nfunction isObjectNotArray(obj) {\n return typeof obj === 'object' && obj != null && !Array.isArray(obj);\n}\n/**\n * Pure function - doesn't mutate either parameter!\n * Merges two objects together deeply, overwriting the properties in first with the properties in second\n * @param first The first object\n * @param second The second object\n * @returns a new object\n */\nfunction deepMerge(first = {}, second = {}) {\n // get the unique set of keys across both objects\n const keys = new Set([...Object.keys(first), ...Object.keys(second)]);\n return Object.fromEntries([...keys].map(key => {\n const firstHasKey = key in first;\n const secondHasKey = key in second;\n const firstValue = first[key];\n const secondValue = second[key];\n let value;\n if (firstHasKey && secondHasKey) {\n if (isObjectNotArray(firstValue) && isObjectNotArray(secondValue)) {\n // object type\n value = deepMerge(firstValue, secondValue);\n }\n else {\n // value type\n value = secondValue;\n }\n }\n else if (firstHasKey) {\n value = firstValue;\n }\n else {\n value = secondValue;\n }\n return [key, value];\n }));\n}\n//# sourceMappingURL=deepMerge.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.applyDefault = applyDefault;\nconst deepMerge_1 = require(\"./deepMerge\");\n/**\n * Pure function - doesn't mutate either parameter!\n * Uses the default options and overrides with the options provided by the user\n * @param defaultOptions the defaults\n * @param userOptions the user opts\n * @returns the options with defaults\n */\nfunction applyDefault(defaultOptions, userOptions) {\n // clone defaults\n const options = structuredClone(defaultOptions);\n if (userOptions == null) {\n return options;\n }\n // For avoiding the type error\n // `This expression is not callable. Type 'unknown' has no call signatures.ts(2349)`\n options.forEach((opt, i) => {\n // eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish\n if (userOptions[i] !== undefined) {\n const userOpt = userOptions[i];\n if ((0, deepMerge_1.isObjectNotArray)(userOpt) && (0, deepMerge_1.isObjectNotArray)(opt)) {\n options[i] = (0, deepMerge_1.deepMerge)(opt, userOpt);\n }\n else {\n options[i] = userOpt;\n }\n }\n });\n return options;\n}\n//# sourceMappingURL=applyDefault.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parserSeemsToBeTSESLint = parserSeemsToBeTSESLint;\nfunction parserSeemsToBeTSESLint(parser) {\n return !!parser && /(?:typescript-eslint|\\.\\.)[\\w/\\\\]*parser/.test(parser);\n}\n//# sourceMappingURL=parserSeemsToBeTSESLint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getParserServices = getParserServices;\nconst parserSeemsToBeTSESLint_1 = require(\"./parserSeemsToBeTSESLint\");\nconst ERROR_MESSAGE_REQUIRES_PARSER_SERVICES = \"You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://tseslint.com/typed-linting for enabling linting with type information.\";\nconst ERROR_MESSAGE_UNKNOWN_PARSER = 'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward \"parserOptions.project\" to @typescript-eslint/parser.';\nfunction getParserServices(context, allowWithoutFullTypeInformation = false) {\n const parser = \n // eslint-disable-next-line @typescript-eslint/no-deprecated -- For compatibility with ESLint 8\n context.parserPath || context.languageOptions.parser?.meta?.name;\n // This check is unnecessary if the user is using the latest version of our parser.\n //\n // However the world isn't perfect:\n // - Users often use old parser versions.\n // Old versions of the parser would not return any parserServices unless parserOptions.project was set.\n // - Users sometimes use parsers that aren't @typescript-eslint/parser\n // Other parsers won't return the parser services we expect (if they return any at all).\n //\n // This check allows us to handle bad user setups whilst providing a nice user-facing\n // error message explaining the problem.\n if (context.sourceCode.parserServices?.esTreeNodeToTSNodeMap == null ||\n context.sourceCode.parserServices.tsNodeToESTreeNodeMap == null) {\n throwError(parser);\n }\n // if a rule requires full type information, then hard fail if it doesn't exist\n // this forces the user to supply parserOptions.project\n if (context.sourceCode.parserServices.program == null &&\n !allowWithoutFullTypeInformation) {\n throwError(parser);\n }\n return context.sourceCode.parserServices;\n}\n/* eslint-enable @typescript-eslint/unified-signatures */\nfunction throwError(parser) {\n const messages = [\n ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,\n `Parser: ${parser || '(unknown)'}`,\n !(0, parserSeemsToBeTSESLint_1.parserSeemsToBeTSESLint)(parser) && ERROR_MESSAGE_UNKNOWN_PARSER,\n ].filter(Boolean);\n throw new Error(messages.join('\\n'));\n}\n//# sourceMappingURL=getParserServices.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=InferTypesFromRule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NullThrowsReasons = void 0;\nexports.nullThrows = nullThrows;\n/**\n * A set of common reasons for calling nullThrows\n */\nexports.NullThrowsReasons = {\n MissingParent: 'Expected node to have a parent.',\n MissingToken: (token, thing) => `Expected to find a ${token} for the ${thing}.`,\n};\n/**\n * Assert that a value must not be null or undefined.\n * This is a nice explicit alternative to the non-null assertion operator.\n */\nfunction nullThrows(value, message) {\n if (value == null) {\n throw new Error(`Non-null Assertion Failed: ${message}`);\n }\n return value;\n}\n//# sourceMappingURL=nullThrows.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RuleCreator = RuleCreator;\nconst applyDefault_1 = require(\"./applyDefault\");\n/**\n * Creates reusable function to create rules with default options and docs URLs.\n *\n * @param urlCreator Creates a documentation URL for a given rule name.\n * @returns Function to create a rule with the docs URL format.\n */\nfunction RuleCreator(urlCreator) {\n // This function will get much easier to call when this is merged https://github.com/Microsoft/TypeScript/pull/26349\n // TODO - when the above PR lands; add type checking for the context.report `data` property\n return function createNamedRule({ meta, name, ...rule }) {\n const ruleWithDocs = createRule({\n meta: {\n ...meta,\n docs: {\n ...meta.docs,\n url: urlCreator(name),\n },\n },\n name,\n ...rule,\n });\n return ruleWithDocs;\n };\n}\nfunction createRule({ create, \n// Keep accepting deprecated defaultOptions for backward compatibility.\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ndefaultOptions, meta, name, }) {\n const resolvedDefaultOptions = (meta.defaultOptions ??\n defaultOptions ??\n []);\n return {\n create(context) {\n const optionsWithDefault = (0, applyDefault_1.applyDefault)(resolvedDefaultOptions, context.options);\n return create(context, optionsWithDefault);\n },\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- For compatibility with ESLint 8, see #12842\n defaultOptions,\n meta,\n name,\n };\n}\n/**\n * Creates a well-typed TSESLint custom ESLint rule without a docs URL.\n *\n * @returns Well-typed TSESLint custom ESLint rule.\n * @remarks It is generally better to provide a docs URL function to RuleCreator.\n */\nRuleCreator.withoutDocs = function withoutDocs(args) {\n return createRule(args);\n};\n//# sourceMappingURL=RuleCreator.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./applyDefault\"), exports);\n__exportStar(require(\"./deepMerge\"), exports);\n__exportStar(require(\"./getParserServices\"), exports);\n__exportStar(require(\"./InferTypesFromRule\"), exports);\n__exportStar(require(\"./nullThrows\"), exports);\n__exportStar(require(\"./RuleCreator\"), exports);\n//# sourceMappingURL=index.js.map","export * as ESLintUtils from \"@typescript-eslint/utils/eslint-utils\";\n","import { getDocsUrl } from \"../../utils/get-docs-url.js\";\nimport { createUseClientResolver } from \"../../shared/use-client-resolver.js\";\nimport { DEFAULT_ALLOWED_HOOKS } from \"./constants.js\";\nimport { createViolationDetector } from \"./violation-detector.js\";\nimport { createTransitiveAnalyzer } from \"./transitive-analyzer.js\";\nimport path from \"node:path\";\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport * as ts from \"typescript\";\n//#region src/rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.ts\nvar name = \"no-client-code-in-server-component\";\nvar TRIGGER_HINT = \"Triggered by rendering \\\"{{entry}}\\\".\";\nvar rule = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Disallow client-only code inside server components\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tschema: [{\n\t\t\ttype: \"object\",\n\t\t\tproperties: { allowedServerHooks: {\n\t\t\t\ttype: \"array\",\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdescription: \"Additional hooks that are allowed in server components (e.g., custom server-safe hooks)\"\n\t\t\t} },\n\t\t\tadditionalProperties: false\n\t\t}],\n\t\tmessages: {\n\t\t\thookInServerComponent: \"\\\"{{name}}\\\" hook {{location}} cannot be used in server components. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\tbrowserGlobalInServerComponent: \"\\\"{{name}}\\\" browser API {{location}} is not available in server components. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\teventHandlerInServerComponent: \"\\\"{{name}}\\\" event handler {{location}} cannot be used in server components. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\tfunctionPropInServerComponent: \"\\\"{{name}}\\\" function prop {{location}} cannot be passed in server components. Functions cannot be serialized from server to client. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\",\n\t\t\tclassComponentInServerComponent: \"\\\"{{name}}\\\" class component {{location}} cannot be used in server components. Class components require client-side lifecycle methods. \" + TRIGGER_HINT + \" To use client functionality, either: (1) pass the client component as a prop/slot to the server component, or (2) move this code to a separate file and add \\\"use client\\\" directive.\"\n\t\t}\n\t},\n\tdefaultOptions: [{ allowedServerHooks: [] }],\n\tcreate(context, [options]) {\n\t\tconst services = ESLintUtils.getParserServices(context);\n\t\tconst program = services.program;\n\t\tconst checker = program.getTypeChecker();\n\t\tconst allowedHooks = new Set([...DEFAULT_ALLOWED_HOOKS, ...options.allowedServerHooks]);\n\t\tconst useClientResolver = createUseClientResolver(program);\n\t\tconst violationDetector = createViolationDetector(ts, {\n\t\t\tallowedHooks,\n\t\t\tchecker\n\t\t});\n\t\tconst transitiveAnalyzer = createTransitiveAnalyzer(ts, program, checker, useClientResolver, violationDetector);\n\t\treturn { CallExpression(node) {\n\t\t\tconst sourceFile = services.esTreeNodeToTSNodeMap.get(node).getSourceFile();\n\t\t\tif (useClientResolver.hasUseClientDirective(sourceFile.fileName)) return;\n\t\t\tconst rootKind = getServerRootKind(node);\n\t\t\tif (!rootKind) return;\n\t\t\tif (rootKind === \"createCompositeComponent\") {\n\t\t\t\tconst callback = node.arguments[0];\n\t\t\t\tif (!callback) return;\n\t\t\t\tconst tsNode = services.esTreeNodeToTSNodeMap.get(callback);\n\t\t\t\tif (ts.isFunctionLike(tsNode)) analyzeServerComponentCallback(tsNode, node, rootKind);\n\t\t\t\telse if (ts.isIdentifier(tsNode)) analyzeDirectComponentReference(tsNode, node, rootKind);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst element = node.arguments[0];\n\t\t\tif (!element) return;\n\t\t\tanalyzeServerComponentNode(services.esTreeNodeToTSNodeMap.get(element), node, rootKind);\n\t\t} };\n\t\tfunction getServerRootKind(node) {\n\t\t\tif (node.callee.type === \"Identifier\") {\n\t\t\t\tif (node.callee.name === \"createCompositeComponent\") return \"createCompositeComponent\";\n\t\t\t\tif (node.callee.name === \"renderServerComponent\") return \"renderServerComponent\";\n\t\t\t}\n\t\t\tif (node.callee.type === \"MemberExpression\" && node.callee.property.type === \"Identifier\") {\n\t\t\t\tif (node.callee.property.name === \"createCompositeComponent\") return \"createCompositeComponent\";\n\t\t\t\tif (node.callee.property.name === \"renderServerComponent\") return \"renderServerComponent\";\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\tfunction analyzeServerComponentNode(node, eslintNode, rootKind) {\n\t\t\tconst reportedViolations = /* @__PURE__ */ new Set();\n\t\t\tconst sourceFile = node.getSourceFile();\n\t\t\tconst directViolations = violationDetector.detectViolations(sourceFile);\n\t\t\tconst start = node.getStart();\n\t\t\tconst end = node.getEnd();\n\t\t\tfor (const violation of directViolations) {\n\t\t\t\tconst violationPos = violation.node.getStart();\n\t\t\t\tif (violationPos >= start && violationPos <= end) {\n\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\treportViolation(violation, [], rootKind, eslintNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst componentRefs = findComponentReferences(node);\n\t\t\tfor (const ref of componentRefs) {\n\t\t\t\tconst symbol = checker.getSymbolAtLocation(ref);\n\t\t\t\tif (!symbol) continue;\n\t\t\t\tconst resolvedSymbol = ts.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;\n\t\t\t\tconst result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);\n\t\t\t\tif (result.isClientBoundary) continue;\n\t\t\t\tfor (const violation of result.violations) {\n\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\treportViolation(violation, violation.chain, rootKind, eslintNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfunction analyzeServerComponentCallback(callback, eslintNode, rootKind) {\n\t\t\tconst reportedViolations = /* @__PURE__ */ new Set();\n\t\t\tconst parameterNames = /* @__PURE__ */ new Set();\n\t\t\tfor (const param of callback.parameters) collectParameterBindings(param.name, parameterNames);\n\t\t\tconst body = callback.body;\n\t\t\tif (body) {\n\t\t\t\tconst sourceFile = callback.getSourceFile();\n\t\t\t\tconst directViolations = violationDetector.detectViolations(sourceFile);\n\t\t\t\tconst callbackStart = body.getStart();\n\t\t\t\tconst callbackEnd = body.getEnd();\n\t\t\t\tfor (const violation of directViolations) {\n\t\t\t\t\tconst violationPos = violation.node.getStart();\n\t\t\t\t\tif (violationPos >= callbackStart && violationPos <= callbackEnd) {\n\t\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\t\treportViolation(violation, [], rootKind, eslintNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst componentRefs = findComponentReferences(callback);\n\t\t\tfor (const ref of componentRefs) {\n\t\t\t\tif (parameterNames.has(ref.text)) continue;\n\t\t\t\tconst symbol = checker.getSymbolAtLocation(ref);\n\t\t\t\tif (!symbol) continue;\n\t\t\t\tif (symbol.getDeclarations()?.some((d) => isWithinParameters(d, callback))) continue;\n\t\t\t\tconst resolvedSymbol = ts.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;\n\t\t\t\tconst result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);\n\t\t\t\tif (result.isClientBoundary) continue;\n\t\t\t\tfor (const violation of result.violations) {\n\t\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\t\treportViolation(violation, violation.chain, rootKind, eslintNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Analyze a component passed directly to createCompositeComponent(Component)\n\t\t*/\n\t\tfunction analyzeDirectComponentReference(ref, eslintNode, rootKind = \"createCompositeComponent\") {\n\t\t\tconst symbol = checker.getSymbolAtLocation(ref);\n\t\t\tif (!symbol) return;\n\t\t\tconst resolvedSymbol = ts.SymbolFlags.Alias & symbol.flags ? checker.getAliasedSymbol(symbol) : symbol;\n\t\t\tconst result = transitiveAnalyzer.analyzeEntrySymbol(resolvedSymbol);\n\t\t\tif (result.isClientBoundary) return;\n\t\t\tconst reportedViolations = /* @__PURE__ */ new Set();\n\t\t\tfor (const violation of result.violations) {\n\t\t\t\tconst key = `${violation.fileName}:${violation.line}:${violation.name}`;\n\t\t\t\tif (!reportedViolations.has(key)) {\n\t\t\t\t\treportedViolations.add(key);\n\t\t\t\t\treportViolation(violation, violation.chain, rootKind, eslintNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t* Collect all binding names from a parameter (handles destructuring)\n\t\t*/\n\t\tfunction collectParameterBindings(bindingName, names) {\n\t\t\tfunction collectFromBinding(node) {\n\t\t\t\tif (ts.isIdentifier(node)) names.add(node.text);\n\t\t\t\telse if (ts.isObjectBindingPattern(node)) for (const element of node.elements) collectFromBinding(element.name);\n\t\t\t\telse if (ts.isArrayBindingPattern(node)) {\n\t\t\t\t\tfor (const element of node.elements) if (ts.isBindingElement(element)) collectFromBinding(element.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcollectFromBinding(bindingName);\n\t\t}\n\t\t/**\n\t\t* Check if a declaration is within the parameters of the callback\n\t\t*/\n\t\tfunction isWithinParameters(decl, callback) {\n\t\t\tlet current = decl;\n\t\t\twhile (current) {\n\t\t\t\tif (ts.isParameter(current)) {\n\t\t\t\t\tconst paramParent = current.parent;\n\t\t\t\t\tif (ts.isFunctionLike(paramParent) && paramParent === callback) return true;\n\t\t\t\t}\n\t\t\t\tcurrent = current.parent;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tfunction findComponentReferences(node) {\n\t\t\tconst refs = [];\n\t\t\tfunction visit(n) {\n\t\t\t\tif (ts.isJsxOpeningElement(n) || ts.isJsxSelfClosingElement(n)) {\n\t\t\t\t\tconst tagName = n.tagName;\n\t\t\t\t\tif (ts.isIdentifier(tagName) && /^[A-Z]/.test(tagName.text)) refs.push(tagName);\n\t\t\t\t}\n\t\t\t\tif (ts.isCallExpression(n)) {\n\t\t\t\t\tconst callee = n.expression;\n\t\t\t\t\tif (ts.isIdentifier(callee) && /^[A-Z]/.test(callee.text)) refs.push(callee);\n\t\t\t\t}\n\t\t\t\tts.forEachChild(n, visit);\n\t\t\t}\n\t\t\tvisit(node);\n\t\t\treturn refs;\n\t\t}\n\t\tfunction reportViolation(violation, chain, entryComponentName, eslintNode) {\n\t\t\tconst location = formatLocation(violation, chain);\n\t\t\tconst messageId = getMessageId(violation.type);\n\t\t\tcontext.report({\n\t\t\t\tnode: eslintNode,\n\t\t\t\tmessageId,\n\t\t\t\tdata: {\n\t\t\t\t\tname: violation.name,\n\t\t\t\t\tlocation,\n\t\t\t\t\tentry: entryComponentName,\n\t\t\t\t\tfileName: getRelativePath(violation.fileName)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tfunction getMessageId(type) {\n\t\t\tswitch (type) {\n\t\t\t\tcase \"hook\": return \"hookInServerComponent\";\n\t\t\t\tcase \"browser-global\": return \"browserGlobalInServerComponent\";\n\t\t\t\tcase \"event-handler\": return \"eventHandlerInServerComponent\";\n\t\t\t\tcase \"function-prop\": return \"functionPropInServerComponent\";\n\t\t\t\tcase \"class-component\": return \"classComponentInServerComponent\";\n\t\t\t}\n\t\t}\n\t\tfunction formatLocation(violation, chain) {\n\t\t\tif (chain.length > 0) return `(via ${chain.map((e) => getRelativePath(e.toFile)).join(\" -> \")}) at ${getRelativePath(violation.fileName)}:${violation.line}`;\n\t\t\treturn `at ${getRelativePath(violation.fileName)}:${violation.line}`;\n\t\t}\n\t\tfunction getRelativePath(fileName) {\n\t\t\tconst cwd = context.cwd;\n\t\t\treturn path.relative(cwd, fileName);\n\t\t}\n\t}\n});\n//#endregion\nexport { name, rule };\n\n//# sourceMappingURL=no-client-code-in-server-component.rule.js.map","//#region src/rules/no-async-client-component/constants.ts\n/**\n* Route option names that accept component references.\n* These make the referenced component a \"client root\".\n*/\nvar ROUTE_COMPONENT_OPTION_NAMES = [\n\t\"component\",\n\t\"pendingComponent\",\n\t\"errorComponent\",\n\t\"notFoundComponent\"\n];\n/**\n* Function names that create routes (client entry points).\n*/\nvar ROUTE_CREATOR_NAMES = [\n\t\"createFileRoute\",\n\t\"createRootRoute\",\n\t\"createRootRouteWithContext\"\n];\n/**\n* Function names that create server-component roots.\n*/\nvar SERVER_COMPONENT_ROOTS = [\"renderServerComponent\", \"createCompositeComponent\"];\n//#endregion\nexport { ROUTE_COMPONENT_OPTION_NAMES, ROUTE_CREATOR_NAMES, SERVER_COMPONENT_ROOTS };\n\n//# sourceMappingURL=constants.js.map","import { ROUTE_COMPONENT_OPTION_NAMES, ROUTE_CREATOR_NAMES, SERVER_COMPONENT_ROOTS } from \"./constants.js\";\n//#region src/rules/no-async-client-component/render-graph-builder.ts\n/**\n* Builds a render graph from the TypeScript program.\n* Indexes components, JSX edges, server roots, and client roots.\n*/\nfunction createRenderGraphBuilder(tsLib, program, checker) {\n\tconst graph = {\n\t\tcomponents: /* @__PURE__ */ new Map(),\n\t\tedges: [],\n\t\tserverRoots: /* @__PURE__ */ new Set(),\n\t\tclientRoots: /* @__PURE__ */ new Set(),\n\t\tuseClientFiles: /* @__PURE__ */ new Set(),\n\t\trouteOptionUsages: /* @__PURE__ */ new Map(),\n\t\trouteOptionRootsByFile: /* @__PURE__ */ new Map()\n\t};\n\treturn {\n\t\tbuild() {\n\t\t\tfor (const sourceFile of program.getSourceFiles()) {\n\t\t\t\tif (sourceFile.isDeclarationFile) continue;\n\t\t\t\tif (sourceFile.fileName.includes(\"node_modules\")) continue;\n\t\t\t\tif (!fileCanContribute(sourceFile)) continue;\n\t\t\t\tprocessSourceFile(sourceFile);\n\t\t\t}\n\t\t\treturn graph;\n\t\t},\n\t\tgetGraph() {\n\t\t\treturn graph;\n\t\t}\n\t};\n\t/**\n\t* Quick text-based check to skip files that can't contribute edges or roots.\n\t* A file can contribute if it might have:\n\t* - JSX (components, edges)\n\t* - 'use client' directive (client roots)\n\t* - createFileRoute/createRootRoute (route-option roots)\n\t* - renderServerComponent/createCompositeComponent (server roots)\n\t\n\t*/\n\tfunction fileCanContribute(sourceFile) {\n\t\tconst text = sourceFile.text;\n\t\tconst hasJsx = text.includes(\"<\") && (text.includes(\"/>\") || text.includes(\"</\"));\n\t\tconst hasUseClient = text.includes(\"use client\");\n\t\tconst hasRouteCreator = text.includes(\"createFileRoute\") || text.includes(\"createRootRoute\") || text.includes(\"createRootRouteWithContext\");\n\t\tconst hasServerComponentRoot = SERVER_COMPONENT_ROOTS.some((name) => text.includes(name));\n\t\treturn hasJsx || hasUseClient || hasRouteCreator || hasServerComponentRoot;\n\t}\n\tfunction processSourceFile(sourceFile) {\n\t\tif (hasUseClientDirective(sourceFile)) graph.useClientFiles.add(sourceFile.fileName);\n\t\tvisitNode(sourceFile, sourceFile, null);\n\t}\n\tfunction hasUseClientDirective(sourceFile) {\n\t\tconst firstStatement = sourceFile.statements[0];\n\t\tif (!firstStatement) return false;\n\t\tif (tsLib.isExpressionStatement(firstStatement) && tsLib.isStringLiteral(firstStatement.expression) && firstStatement.expression.text === \"use client\") return true;\n\t\treturn false;\n\t}\n\tfunction visitNode(node, sourceFile, currentComponent) {\n\t\tif (tsLib.isFunctionDeclaration(node) && node.name) {\n\t\t\tif (isPascalCase(node.name.text)) {\n\t\t\t\tconst key = makeKey(sourceFile.fileName, node.name.text);\n\t\t\t\tgraph.components.set(key, {\n\t\t\t\t\tname: node.name.text,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\tnode,\n\t\t\t\t\tisAsync: hasAsyncModifier(node),\n\t\t\t\t\tline: getLine(sourceFile, node)\n\t\t\t\t});\n\t\t\t\tif (graph.useClientFiles.has(sourceFile.fileName)) graph.clientRoots.add(key);\n\t\t\t\tif (node.body) tsLib.forEachChild(node.body, (child) => visitNode(child, sourceFile, key));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isVariableStatement(node)) {\n\t\t\tfor (const decl of node.declarationList.declarations) if (tsLib.isIdentifier(decl.name) && isPascalCase(decl.name.text) && decl.initializer && isFunctionLike(decl.initializer)) {\n\t\t\t\tconst key = makeKey(sourceFile.fileName, decl.name.text);\n\t\t\t\tgraph.components.set(key, {\n\t\t\t\t\tname: decl.name.text,\n\t\t\t\t\tfileName: sourceFile.fileName,\n\t\t\t\t\tnode: decl,\n\t\t\t\t\tisAsync: isAsyncFunctionLike(decl.initializer),\n\t\t\t\t\tline: getLine(sourceFile, decl)\n\t\t\t\t});\n\t\t\t\tif (graph.useClientFiles.has(sourceFile.fileName)) graph.clientRoots.add(key);\n\t\t\t\tconst funcNode = decl.initializer;\n\t\t\t\ttsLib.forEachChild(funcNode.body, (child) => visitNode(child, sourceFile, key));\n\t\t\t} else if (decl.initializer) visitNode(decl.initializer, sourceFile, currentComponent);\n\t\t\treturn;\n\t\t}\n\t\tif (tsLib.isCallExpression(node)) {\n\t\t\tconst serverRootKind = getServerRootKind(node, checker);\n\t\t\tif (serverRootKind === \"createCompositeComponent\") {\n\t\t\t\tconst callback = node.arguments[0];\n\t\t\t\tif (callback && isFunctionLike(callback)) collectJsxComponentRefs(callback, sourceFile, currentComponent, true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (serverRootKind === \"renderServerComponent\") {\n\t\t\t\tconst element = node.arguments[0];\n\t\t\t\tif (element) collectJsxComponentRefs(element, sourceFile, currentComponent, true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isCallExpression(node)) {\n\t\t\tconst routeOptions = getRouteOptionsObject(node);\n\t\t\tif (routeOptions) {\n\t\t\t\tfor (const prop of routeOptions.properties) if (tsLib.isPropertyAssignment(prop) && tsLib.isIdentifier(prop.name) && ROUTE_COMPONENT_OPTION_NAMES.includes(prop.name.text)) markAsClientRoot(prop.initializer, sourceFile, currentComponent, prop);\n\t\t\t}\n\t\t}\n\t\tif (tsLib.isJsxOpeningElement(node) || tsLib.isJsxSelfClosingElement(node)) {\n\t\t\tconst tagName = node.tagName;\n\t\t\tif (tsLib.isIdentifier(tagName) && isPascalCase(tagName.text)) {\n\t\t\t\tconst symbol = checker.getSymbolAtLocation(tagName);\n\t\t\t\tif (symbol) {\n\t\t\t\t\tconst resolved = resolveSymbol(symbol);\n\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\tconst decls = resolved.getDeclarations();\n\t\t\t\t\t\tif (decls && decls.length > 0) {\n\t\t\t\t\t\t\tconst declFile = decls[0].getSourceFile().fileName;\n\t\t\t\t\t\t\tconst toKey = makeKey(declFile, tagName.text);\n\t\t\t\t\t\t\tif (currentComponent) graph.edges.push({\n\t\t\t\t\t\t\t\tfromFile: sourceFile.fileName,\n\t\t\t\t\t\t\t\tfromComponent: currentComponent.split(\":\")[1],\n\t\t\t\t\t\t\t\ttoFile: declFile,\n\t\t\t\t\t\t\t\ttoComponent: tagName.text,\n\t\t\t\t\t\t\t\ttoComponentKey: toKey,\n\t\t\t\t\t\t\t\tjsxNode: node,\n\t\t\t\t\t\t\t\tjsxLine: getLine(sourceFile, node)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttsLib.forEachChild(node, (child) => visitNode(child, sourceFile, currentComponent));\n\t}\n\tfunction getServerRootKind(node, _checker) {\n\t\tif (tsLib.isIdentifier(node.expression)) {\n\t\t\tconst name = node.expression.text;\n\t\t\treturn SERVER_COMPONENT_ROOTS.includes(name) ? name : null;\n\t\t}\n\t\tif (tsLib.isPropertyAccessExpression(node.expression) && tsLib.isIdentifier(node.expression.name)) {\n\t\t\tconst name = node.expression.name.text;\n\t\t\treturn SERVER_COMPONENT_ROOTS.includes(name) ? name : null;\n\t\t}\n\t\treturn null;\n\t}\n\tfunction getRouteOptionsObject(node) {\n\t\tconst optionsArg = node.arguments[0];\n\t\tif (!optionsArg || !tsLib.isObjectLiteralExpression(optionsArg)) return;\n\t\tconst routeCreator = findRouteCreatorFromCallee(node.expression);\n\t\tif (!routeCreator) return;\n\t\tconst routeCreatorName = tsLib.isIdentifier(routeCreator) ? routeCreator.text : routeCreator.name.text;\n\t\tif (ROUTE_CREATOR_NAMES.includes(routeCreatorName)) return optionsArg;\n\t}\n\tfunction findRouteCreatorFromCallee(expr) {\n\t\tif (tsLib.isParenthesizedExpression(expr)) return findRouteCreatorFromCallee(expr.expression);\n\t\tif (tsLib.isCallExpression(expr)) return findRouteCreatorFromCallee(expr.expression);\n\t\tif (tsLib.isPropertyAccessExpression(expr)) {\n\t\t\tif (tsLib.isIdentifier(expr.name)) {\n\t\t\t\tif (ROUTE_CREATOR_NAMES.includes(expr.name.text)) return expr;\n\t\t\t}\n\t\t\treturn findRouteCreatorFromCallee(expr.expression);\n\t\t}\n\t\tif (tsLib.isIdentifier(expr)) return expr;\n\t}\n\tfunction markAsClientRoot(node, sourceFile, _currentComponent, usageNode) {\n\t\tif (tsLib.isIdentifier(node)) {\n\t\t\tconst componentName = node.text;\n\t\t\tconst symbol = checker.getSymbolAtLocation(node);\n\t\t\tif (symbol) {\n\t\t\t\tconst resolved = resolveSymbol(symbol);\n\t\t\t\tif (resolved) {\n\t\t\t\t\tconst decls = resolved.getDeclarations();\n\t\t\t\t\tif (decls && decls.length > 0) {\n\t\t\t\t\t\tconst declFile = decls[0].getSourceFile().fileName;\n\t\t\t\t\t\tconst key = makeKey(declFile, componentName);\n\t\t\t\t\t\tgraph.clientRoots.add(key);\n\t\t\t\t\t\tif (usageNode) {\n\t\t\t\t\t\t\tgraph.routeOptionUsages.set(key, {\n\t\t\t\t\t\t\t\tcomponentKey: key,\n\t\t\t\t\t\t\t\tusageNode,\n\t\t\t\t\t\t\t\tusageLine: getLine(sourceFile, usageNode),\n\t\t\t\t\t\t\t\tfileName: sourceFile.fileName\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\taddToRouteOptionRootsByFile(sourceFile.fileName, key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst fallbackKey = makeKey(sourceFile.fileName, componentName);\n\t\t\tgraph.clientRoots.add(fallbackKey);\n\t\t\tif (usageNode) {\n\t\t\t\tgraph.routeOptionUsages.set(fallbackKey, {\n\t\t\t\t\tcomponentKey: fallbackKey,\n\t\t\t\t\tusageNode,\n\t\t\t\t\tusageLine: getLine(sourceFile, usageNode),\n\t\t\t\t\tfileName: sourceFile.fileName\n\t\t\t\t});\n\t\t\t\taddToRouteOptionRootsByFile(sourceFile.fileName, fallbackKey);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (isFunctionLike(node)) collectJsxComponentRefs(node, sourceFile, null, false, usageNode);\n\t}\n\tfunction collectJsxComponentRefs(node, sourceFile, _currentComponent, isServerContext, usageNode) {\n\t\tfunction walk(n) {\n\t\t\tif (tsLib.isJsxOpeningElement(n) || tsLib.isJsxSelfClosingElement(n)) {\n\t\t\t\tconst tagName = n.tagName;\n\t\t\t\tif (tsLib.isIdentifier(tagName) && isPascalCase(tagName.text)) {\n\t\t\t\t\tconst symbol = checker.getSymbolAtLocation(tagName);\n\t\t\t\t\tif (symbol) {\n\t\t\t\t\t\tconst resolved = resolveSymbol(symbol);\n\t\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\t\tconst decls = resolved.getDeclarations();\n\t\t\t\t\t\t\tif (decls && decls.length > 0) {\n\t\t\t\t\t\t\t\tconst declFile = decls[0].getSourceFile().fileName;\n\t\t\t\t\t\t\t\tconst key = makeKey(declFile, tagName.text);\n\t\t\t\t\t\t\t\tif (isServerContext) graph.serverRoots.add(key);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tgraph.clientRoots.add(key);\n\t\t\t\t\t\t\t\t\tconst effectiveUsageNode = usageNode ?? n;\n\t\t\t\t\t\t\t\t\tgraph.routeOptionUsages.set(key, {\n\t\t\t\t\t\t\t\t\t\tcomponentKey: key,\n\t\t\t\t\t\t\t\t\t\tusageNode: effectiveUsageNode,\n\t\t\t\t\t\t\t\t\t\tusageLine: getLine(sourceFile, effectiveUsageNode),\n\t\t\t\t\t\t\t\t\t\tfileName: sourceFile.fileName\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\taddToRouteOptionRootsByFile(sourceFile.fileName, key);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttsLib.forEachChild(n, walk);\n\t\t}\n\t\twalk(node);\n\t}\n\tfunction resolveSymbol(symbol) {\n\t\tif (symbol.flags & tsLib.SymbolFlags.Alias) return checker.getAliasedSymbol(symbol);\n\t\treturn symbol;\n\t}\n\tfunction isPascalCase(name) {\n\t\treturn /^[A-Z]/.test(name);\n\t}\n\tfunction hasAsyncModifier(node) {\n\t\treturn node.modifiers?.some((mod) => mod.kind === tsLib.SyntaxKind.AsyncKeyword) ?? false;\n\t}\n\tfunction isFunctionLike(node) {\n\t\treturn tsLib.isArrowFunction(node) || tsLib.isFunctionExpression(node) || tsLib.isFunctionDeclaration(node);\n\t}\n\tfunction isAsyncFunctionLike(node) {\n\t\tif (tsLib.isArrowFunction(node) || tsLib.isFunctionExpression(node)) return hasAsyncModifier(node);\n\t\treturn false;\n\t}\n\tfunction makeKey(fileName, componentName) {\n\t\treturn `${fileName}:${componentName}`;\n\t}\n\tfunction getLine(sourceFile, node) {\n\t\treturn sourceFile.getLineAndCharacterOfPosition(node.getStart()).line + 1;\n\t}\n\tfunction addToRouteOptionRootsByFile(fileName, key) {\n\t\tlet set = graph.routeOptionRootsByFile.get(fileName);\n\t\tif (!set) {\n\t\t\tset = /* @__PURE__ */ new Set();\n\t\t\tgraph.routeOptionRootsByFile.set(fileName, set);\n\t\t}\n\t\tset.add(key);\n\t}\n}\n//#endregion\nexport { createRenderGraphBuilder };\n\n//# sourceMappingURL=render-graph-builder.js.map","//#region src/rules/no-async-client-component/context-analyzer.ts\n/**\n* Analyzes the render graph to propagate server/client context.\n*\n* Algorithm:\n* 1. Mark server roots as server context, propagate to descendants\n* 2. Stop propagation at 'use client' boundaries\n* 3. Mark client roots as client context, propagate to descendants\n* 4. Components reachable from both => client wins (tainted)\n\n*/\nfunction analyzeContext(graph) {\n\tconst contexts = /* @__PURE__ */ new Map();\n\tfor (const [key, component] of graph.components) contexts.set(key, {\n\t\tkey,\n\t\tcomponent,\n\t\tisServerContext: false,\n\t\tisClientContext: false\n\t});\n\tconst adjacency = buildAdjacencyList(graph.edges);\n\tconst serverVisited = /* @__PURE__ */ new Set();\n\tfor (const serverRoot of graph.serverRoots) propagateServerContext(serverRoot, serverVisited, graph, contexts, adjacency);\n\tconst clientVisited = /* @__PURE__ */ new Set();\n\tfor (const clientRoot of graph.clientRoots) {\n\t\tconst ctx = contexts.get(clientRoot);\n\t\tif (!ctx) continue;\n\t\tlet reason;\n\t\tif (graph.useClientFiles.has(ctx.component.fileName)) reason = {\n\t\t\ttype: \"use-client\",\n\t\t\tfileName: ctx.component.fileName\n\t\t};\n\t\telse {\n\t\t\tconst routeUsage = graph.routeOptionUsages.get(clientRoot);\n\t\t\treason = {\n\t\t\t\ttype: \"route-option\",\n\t\t\t\tfileName: ctx.component.fileName,\n\t\t\t\tusageFile: routeUsage?.fileName,\n\t\t\t\tusageNode: routeUsage?.usageNode,\n\t\t\t\tusageLine: routeUsage?.usageLine\n\t\t\t};\n\t\t}\n\t\tpropagateClientContext(clientRoot, clientVisited, contexts, adjacency, reason);\n\t}\n\tfor (const [_key, ctx] of contexts) if (graph.useClientFiles.has(ctx.component.fileName) && !ctx.isClientContext) {\n\t\tctx.isClientContext = true;\n\t\tctx.clientReason = {\n\t\t\ttype: \"use-client\",\n\t\t\tfileName: ctx.component.fileName\n\t\t};\n\t}\n\tconst clientEdges = [];\n\tfor (const edge of graph.edges) {\n\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\tif (contexts.get(fromKey)?.isClientContext) clientEdges.push(edge);\n\t}\n\treturn {\n\t\tcontexts,\n\t\tclientEdges\n\t};\n}\nfunction buildAdjacencyList(edges) {\n\tconst adj = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\tif (!adj.has(fromKey)) adj.set(fromKey, []);\n\t\tadj.get(fromKey).push(edge);\n\t}\n\treturn adj;\n}\nfunction propagateServerContext(key, visited, graph, contexts, adjacency) {\n\tif (visited.has(key)) return;\n\tvisited.add(key);\n\tconst ctx = contexts.get(key);\n\tif (!ctx) return;\n\tif (graph.useClientFiles.has(ctx.component.fileName)) {\n\t\tctx.isClientContext = true;\n\t\tctx.clientReason = {\n\t\t\ttype: \"use-client\",\n\t\t\tfileName: ctx.component.fileName\n\t\t};\n\t\treturn;\n\t}\n\tctx.isServerContext = true;\n\tconst edges = adjacency.get(key) ?? [];\n\tfor (const edge of edges) propagateServerContext(edge.toComponentKey, visited, graph, contexts, adjacency);\n}\nfunction propagateClientContext(key, visited, contexts, adjacency, reason) {\n\tif (visited.has(key)) return;\n\tvisited.add(key);\n\tconst ctx = contexts.get(key);\n\tif (!ctx) return;\n\tctx.isClientContext = true;\n\tif (!ctx.clientReason) ctx.clientReason = reason;\n\tconst edges = adjacency.get(key) ?? [];\n\tfor (const edge of edges) propagateClientContext(edge.toComponentKey, visited, contexts, adjacency, {\n\t\ttype: \"rendered-by-client\",\n\t\tparentComponent: ctx.component.name,\n\t\tparentFile: ctx.component.fileName\n\t});\n}\n//#endregion\nexport { analyzeContext };\n\n//# sourceMappingURL=context-analyzer.js.map","import { getDocsUrl } from \"../../utils/get-docs-url.js\";\nimport { createRenderGraphBuilder } from \"./render-graph-builder.js\";\nimport { analyzeContext } from \"./context-analyzer.js\";\nimport path from \"node:path\";\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport * as ts from \"typescript\";\n//#region src/rules/no-async-client-component/no-async-client-component.rule.ts\nvar name = \"no-async-client-component\";\nvar perProgramCache = /* @__PURE__ */ new WeakMap();\nvar onDemandCache = /* @__PURE__ */ new WeakMap();\nvar adjacencyCache = /* @__PURE__ */ new WeakMap();\nvar rule = ESLintUtils.RuleCreator(getDocsUrl)({\n\tname,\n\tmeta: {\n\t\ttype: \"problem\",\n\t\tdocs: {\n\t\t\tdescription: \"Disallow async components in client context. Async components are only valid inside server components.\",\n\t\t\trecommended: \"error\"\n\t\t},\n\t\tschema: [{\n\t\t\ttype: \"object\",\n\t\t\tproperties: { ignorePatterns: {\n\t\t\t\ttype: \"array\",\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdescription: \"File patterns to ignore\"\n\t\t\t} },\n\t\t\tadditionalProperties: false\n\t\t}],\n\t\tmessages: {\n\t\t\tasyncClientComponentDefinition: \"Async component \\\"{{name}}\\\" cannot be used in client context. Async components are only valid inside server components. Either remove \\\"async\\\" or ensure this component is only rendered within server components. {{reason}}\",\n\t\t\tasyncClientComponentUsage: \"Async component \\\"{{name}}\\\" is rendered in client context here. Async components are only valid inside server components. Move this to a server component or use a non-async version.\"\n\t\t}\n\t},\n\tdefaultOptions: [{ ignorePatterns: [] }],\n\tcreate(context, [options]) {\n\t\tconst services = ESLintUtils.getParserServices(context);\n\t\tconst program = services.program;\n\t\tconst checker = program.getTypeChecker();\n\t\tconst currentFile = path.isAbsolute(context.filename) ? context.filename : path.resolve(context.cwd, context.filename);\n\t\tif (shouldIgnore(currentFile, [...options.ignorePatterns])) return {};\n\t\tlet cached = perProgramCache.get(program);\n\t\tif (!cached) {\n\t\t\tcached = {\n\t\t\t\tbuilder: createRenderGraphBuilder(ts, program, checker),\n\t\t\t\tgraphBuilt: false\n\t\t\t};\n\t\t\tperProgramCache.set(program, cached);\n\t\t}\n\t\tconst reported = /* @__PURE__ */ new Set();\n\t\treturn { Program() {\n\t\t\tconst sourceFile = program.getSourceFile(currentFile);\n\t\t\tif (!sourceFile) return;\n\t\t\tif (fileContainsRouteOptions(sourceFile)) {}\n\t\t\tconst analysis = getOnDemandAnalysis(currentFile);\n\t\t\tfor (const [key, ctx] of analysis.contexts) {\n\t\t\t\tif (!ctx.component.isAsync || !ctx.isClientContext) continue;\n\t\t\t\tconst reportKey = `def:${key}`;\n\t\t\t\tif (reported.has(reportKey)) continue;\n\t\t\t\tif (ctx.clientReason?.type === \"route-option\") {\n\t\t\t\t\tconst usageFile = ctx.clientReason.usageFile;\n\t\t\t\t\tif (usageFile && usageFile === currentFile) {\n\t\t\t\t\t\tconst usageTsNode = ctx.clientReason.usageNode;\n\t\t\t\t\t\tconst usageEslintNode = services.tsNodeToESTreeNodeMap.get(usageTsNode);\n\t\t\t\t\t\tif (usageEslintNode) {\n\t\t\t\t\t\t\treported.add(reportKey);\n\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\tnode: usageEslintNode,\n\t\t\t\t\t\t\t\tmessageId: \"asyncClientComponentDefinition\",\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tname: ctx.component.name,\n\t\t\t\t\t\t\t\t\treason: formatReason(ctx.clientReason, context.cwd)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\treported.add(reportKey);\n\t\t\t\tconst tsNode = ctx.component.node;\n\t\t\t\tconst eslintNode = services.tsNodeToESTreeNodeMap.get(tsNode);\n\t\t\t\tif (eslintNode) context.report({\n\t\t\t\t\tnode: eslintNode,\n\t\t\t\t\tmessageId: \"asyncClientComponentDefinition\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tname: ctx.component.name,\n\t\t\t\t\t\treason: ctx.clientReason ? formatReason(ctx.clientReason, context.cwd) : \"\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const edge of analysis.clientEdges) {\n\t\t\t\tif (!analysis.contexts.get(edge.toComponentKey)?.component.isAsync) continue;\n\t\t\t\tif (edge.fromFile !== currentFile) continue;\n\t\t\t\tconst reportKey = `usage:${edge.fromFile}:${edge.jsxLine}:${edge.toComponent}`;\n\t\t\t\tif (reported.has(reportKey)) continue;\n\t\t\t\treported.add(reportKey);\n\t\t\t\tconst eslintNode = services.tsNodeToESTreeNodeMap.get(edge.jsxNode);\n\t\t\t\tif (eslintNode) context.report({\n\t\t\t\t\tnode: eslintNode,\n\t\t\t\t\tmessageId: \"asyncClientComponentUsage\",\n\t\t\t\t\tdata: { name: edge.toComponent }\n\t\t\t\t});\n\t\t\t}\n\t\t} };\n\t\tfunction shouldIgnore(filePath, patterns) {\n\t\t\tfor (const pattern of patterns) if (filePath.includes(pattern)) return true;\n\t\t\treturn false;\n\t\t}\n\t\tfunction formatReason(reason, cwd) {\n\t\t\tswitch (reason.type) {\n\t\t\t\tcase \"use-client\": return `File has \"use client\" directive.`;\n\t\t\t\tcase \"route-option\": return `Component is referenced by a route option (createFileRoute/createRootRoute).`;\n\t\t\t\tcase \"rendered-by-client\": return `Rendered by client component \"${reason.parentComponent}\" in ${path.relative(cwd, reason.parentFile)}.`;\n\t\t\t}\n\t\t}\n\t\tfunction getOnDemandAnalysis(entryFile) {\n\t\t\tlet programCache = onDemandCache.get(program);\n\t\t\tif (!programCache) {\n\t\t\t\tprogramCache = /* @__PURE__ */ new Map();\n\t\t\t\tonDemandCache.set(program, programCache);\n\t\t\t}\n\t\t\tconst cachedResult = programCache.get(entryFile);\n\t\t\tif (cachedResult) return cachedResult.analysis;\n\t\t\tif (!cached.graphBuilt) {\n\t\t\t\tcached.builder.build();\n\t\t\t\tcached.graphBuilt = true;\n\t\t\t}\n\t\t\tconst full = cached.builder.getGraph();\n\t\t\tconst subgraph = sliceGraphForEntryFile(full, entryFile);\n\t\t\tconst entrySourceFile = program.getSourceFile(entryFile);\n\t\t\tconst analysis = !!entrySourceFile && subgraph.clientRoots.size === 0 && subgraph.serverRoots.size === 0 ? analyzeContext(full) : analyzeContext(subgraph);\n\t\t\tprogramCache.set(entryFile, {\n\t\t\t\tgraph: subgraph,\n\t\t\t\tanalysis\n\t\t\t});\n\t\t\treturn analysis;\n\t\t}\n\t\tfunction sliceGraphForEntryFile(full, entryFile) {\n\t\t\tconst components = full.components;\n\t\t\tconst edges = full.edges;\n\t\t\tconst serverRoots = full.serverRoots;\n\t\t\tconst clientRoots = full.clientRoots;\n\t\t\tconst useClientFiles = full.useClientFiles;\n\t\t\tconst routeOptionUsages = full.routeOptionUsages;\n\t\t\tconst entryClientRoots = /* @__PURE__ */ new Set();\n\t\t\tconst entryServerRoots = /* @__PURE__ */ new Set();\n\t\t\tconst routeRootsInFile = routeOptionUsages.size > 0 ? full.routeOptionRootsByFile.get(entryFile) : void 0;\n\t\t\tif (routeRootsInFile) {\n\t\t\t\tfor (const key of routeRootsInFile) if (clientRoots.has(key)) entryClientRoots.add(key);\n\t\t\t}\n\t\t\tfor (const key of serverRoots) if (components.get(key)?.fileName === entryFile) entryServerRoots.add(key);\n\t\t\tif (useClientFiles.has(entryFile)) {\n\t\t\t\tfor (const [key, component] of components) if (component.fileName === entryFile) entryClientRoots.add(key);\n\t\t\t}\n\t\t\tconst reachable = /* @__PURE__ */ new Set();\n\t\t\tconst queue = [];\n\t\t\tfor (const r of entryClientRoots) queue.push(r);\n\t\t\tfor (const r of entryServerRoots) queue.push(r);\n\t\t\tconst adjacency = getAdjacency(full);\n\t\t\twhile (queue.length) {\n\t\t\t\tconst key = queue.pop();\n\t\t\t\tif (reachable.has(key)) continue;\n\t\t\t\treachable.add(key);\n\t\t\t\tconst children = adjacency.get(key);\n\t\t\t\tif (!children) continue;\n\t\t\t\tfor (const toKey of children) if (!reachable.has(toKey)) queue.push(toKey);\n\t\t\t}\n\t\t\tconst subComponents = /* @__PURE__ */ new Map();\n\t\t\tfor (const key of reachable) {\n\t\t\t\tconst comp = components.get(key);\n\t\t\t\tif (comp) subComponents.set(key, comp);\n\t\t\t}\n\t\t\tconst subEdges = edges.filter((edge) => {\n\t\t\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\t\t\treturn reachable.has(fromKey) && reachable.has(edge.toComponentKey);\n\t\t\t});\n\t\t\tconst subServerRoots = new Set([...entryServerRoots].filter((k) => reachable.has(k)));\n\t\t\tconst subClientRoots = new Set([...entryClientRoots].filter((k) => reachable.has(k)));\n\t\t\tconst subRouteOptionUsages = /* @__PURE__ */ new Map();\n\t\t\tconst subRouteOptionRootsByFile = /* @__PURE__ */ new Map();\n\t\t\tfor (const key of subClientRoots) {\n\t\t\t\tconst usage = routeOptionUsages.get(key);\n\t\t\t\tif (usage) {\n\t\t\t\t\tsubRouteOptionUsages.set(key, usage);\n\t\t\t\t\tlet set = subRouteOptionRootsByFile.get(usage.fileName);\n\t\t\t\t\tif (!set) {\n\t\t\t\t\t\tset = /* @__PURE__ */ new Set();\n\t\t\t\t\t\tsubRouteOptionRootsByFile.set(usage.fileName, set);\n\t\t\t\t\t}\n\t\t\t\t\tset.add(key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcomponents: subComponents,\n\t\t\t\tedges: subEdges,\n\t\t\t\tserverRoots: subServerRoots,\n\t\t\t\tclientRoots: subClientRoots,\n\t\t\t\tuseClientFiles,\n\t\t\t\trouteOptionUsages: subRouteOptionUsages,\n\t\t\t\trouteOptionRootsByFile: subRouteOptionRootsByFile\n\t\t\t};\n\t\t}\n\t\tfunction getAdjacency(full) {\n\t\t\tlet cachedAdjacency = adjacencyCache.get(program);\n\t\t\tif (cachedAdjacency) return cachedAdjacency;\n\t\t\tcachedAdjacency = /* @__PURE__ */ new Map();\n\t\t\tfor (const edge of full.edges) {\n\t\t\t\tconst fromKey = `${edge.fromFile}:${edge.fromComponent}`;\n\t\t\t\tlet set = cachedAdjacency.get(fromKey);\n\t\t\t\tif (!set) {\n\t\t\t\t\tset = /* @__PURE__ */ new Set();\n\t\t\t\t\tcachedAdjacency.set(fromKey, set);\n\t\t\t\t}\n\t\t\t\tset.add(edge.toComponentKey);\n\t\t\t}\n\t\t\tadjacencyCache.set(program, cachedAdjacency);\n\t\t\treturn cachedAdjacency;\n\t\t}\n\t\tfunction fileHasUseClientDirective(sourceFile) {\n\t\t\tconst firstStmt = sourceFile.statements[0];\n\t\t\tif (!firstStmt) return false;\n\t\t\treturn ts.isExpressionStatement(firstStmt) && ts.isStringLiteral(firstStmt.expression) && firstStmt.expression.text === \"use client\";\n\t\t}\n\t\tfunction fileContainsServerComponentRoots(sourceFile) {\n\t\t\tconst text = sourceFile.text;\n\t\t\treturn text.includes(\"renderServerComponent\") || text.includes(\"createCompositeComponent\");\n\t\t}\n\t\tfunction fileContainsRouteOptions(sourceFile) {\n\t\t\tconst text = sourceFile.text;\n\t\t\tif (!text.includes(\"createFileRoute\") && !text.includes(\"createRootRoute\") && !text.includes(\"createRootRouteWithContext\")) return false;\n\t\t\treturn text.includes(\"component\") || text.includes(\"pendingComponent\") || text.includes(\"errorComponent\") || text.includes(\"notFoundComponent\");\n\t\t}\n\t}\n});\n//#endregion\nexport { name, rule };\n\n//# sourceMappingURL=no-async-client-component.rule.js.map","import { name, rule } from \"./rules/no-client-code-in-server-component/no-client-code-in-server-component.rule.js\";\nimport { name as name$1, rule as rule$1 } from \"./rules/no-async-client-component/no-async-client-component.rule.js\";\n//#region src/rules.ts\nvar rules = {\n\t[name]: rule,\n\t[name$1]: rule$1\n};\n//#endregion\nexport { rules };\n\n//# sourceMappingURL=rules.js.map","import { rules } from \"./rules.js\";\n//#region src/index.ts\nvar plugin = {\n\tmeta: { name: \"@tanstack/eslint-plugin-start\" },\n\tconfigs: {},\n\trules\n};\nObject.assign(plugin.configs, {\n\trecommended: {\n\t\tplugins: [\"@tanstack/eslint-plugin-start\"],\n\t\trules: {\n\t\t\t\"@tanstack/start/no-client-code-in-server-component\": \"error\",\n\t\t\t\"@tanstack/start/no-async-client-component\": \"error\"\n\t\t}\n\t},\n\t\"flat/recommended\": [{\n\t\tplugins: { \"@tanstack/start\": plugin },\n\t\trules: {\n\t\t\t\"@tanstack/start/no-client-code-in-server-component\": \"error\",\n\t\t\t\"@tanstack/start/no-async-client-component\": \"error\"\n\t\t}\n\t}]\n});\n//#endregion\nexport { plugin as default };\n\n//# sourceMappingURL=index.js.map","import tanstackStart from \"@tanstack/eslint-plugin-start\";\nimport type { Plugin } from \"vite-plus/lint/plugins\";\n\nimport { typedRules } from \"./typed-rule.ts\";\n\nconst plugin: Plugin & { readonly meta: { readonly name: string } } = {\n meta: { name: \"tanstack-start\" },\n rules: typedRules(tanstackStart.rules),\n};\n\nexport default plugin;\n"],"ignoreList":[0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,cAAc,aAAa,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACGhF,MAAM,sCAA+C,IAAI,IAAI;CAC3D,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;AACb,CAAC;AAED,MAAM,kBAAkB,SACtB,OAAO,cAAc,IAAI,CAAC,CAAC,KAAK,OAAO,QAAQ,EAAE,WAAW,oBAAoB,IAAI,IAAI,CAAC,CAAC;AAE5F,MAAM,eAGF,SAAS,MACV,SACCA,QAAI,KAAKA,QAAI,aAAa,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,OAAO,UAAU,IAAI,UAAU,UAAU,CAAC,CAAC,IACjF,MAAY,UACnB,KAAK,aAAa,KAAK,CAC3B;;;;;AC3BA,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;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;;;AAID,SAAS,oBAAoB,MAAM;CAClC,OAAO,qBAAqB,IAAI,IAAI;AACrC;;;;AAIA,SAAS,iBAAiB,MAAM,eAAe,uBAAuB;CACrE,IAAI,CAAC,YAAY,KAAK,IAAI,GAAG,OAAO;CACpC,IAAI,aAAa,IAAI,IAAI,GAAG,OAAO;CACnC,OAAO;AACR;;;;;AChMA,SAAS,YAAY,MAAM,YAAY;CACtC,MAAM,EAAE,MAAM,cAAc,WAAW,8BAA8B,KAAK,SAAS,CAAC;CACpF,OAAO;EACN,MAAM,OAAO;EACb,QAAQ,YAAY;CACrB;AACD;;;;AAIA,SAAS,wBAAwB,OAAO,UAAU,CAAC,GAAG;CACrD,MAAM,eAAe,QAAQ,gBAAgB;CAC7C,MAAM,UAAU,QAAQ;;;;CAIxB,SAAS,sBAAsB,MAAM;EACpC,IAAI,CAAC,KAAK,iBAAiB,OAAO;EAClC,KAAK,MAAM,UAAU,KAAK,iBAAiB;GAC1C,IAAI,OAAO,UAAU,MAAM,WAAW,gBAAgB;GACtD,KAAK,MAAM,QAAQ,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AM,SAAgE;CACpE,MAAM,EAAE,MAAM,iBAAiB;CAC/B,OAAO,WAAWC,SAAc,KAAK;AACvC"}
@@ -4,6 +4,15 @@ import { FetchHttpClient } from "effect/http";
4
4
  import { OtlpSerialization, OtlpTracer } from "effect/observability";
5
5
  import { createFileSystemLayer } from "typescript-7/fs";
6
6
  import { API } from "typescript-7/sync";
7
+ // src/memo.ts
8
+ const memoizeByKey = (compute) => {
9
+ const cache = /* @__PURE__ */ new WeakMap();
10
+ return (key) => Option.fromNullishOr(cache.get(key)).pipe(Option.getOrElse(() => {
11
+ const computed = compute(key);
12
+ cache.set(key, computed);
13
+ return computed;
14
+ }));
15
+ };
7
16
  // src/parser-services.ts
8
17
  const covers = (node, [start, end]) => node.getStart() <= start && node.end >= end;
9
18
  const spans = (node, [start, end]) => node.getStart() === start && node.end === end;
@@ -26,35 +35,32 @@ const toMappedNode = ({ context }, node) => {
26
35
  }
27
36
  };
28
37
  };
29
- const createParserServices = (file) => {
30
- const toTs = /* @__PURE__ */ new WeakMap();
31
- return {
32
- program: file.program,
33
- esTreeNodeToTSNodeMap: { get: (node) => Option.fromNullishOr(toTs.get(node)).pipe(Option.getOrElse(() => {
34
- const found = innermostSpanning(file.sourceFile, node.range);
35
- toTs.set(node, found);
36
- return found;
37
- })) },
38
- tsNodeToESTreeNodeMap: { get: (node) => Option.liftPredicate(node, (candidate) => candidate.getSourceFile().fileName === file.sourceFile.fileName).pipe(Option.map((candidate) => toMappedNode(file, candidate)), Option.getOrUndefined) }
39
- };
40
- };
38
+ const createParserServices = (file) => ({
39
+ program: file.program,
40
+ esTreeNodeToTSNodeMap: { get: memoizeByKey((node) => innermostSpanning(file.sourceFile, node.range)) },
41
+ tsNodeToESTreeNodeMap: { get: (node) => Option.liftPredicate(node, (candidate) => candidate.getSourceFile().fileName === file.sourceFile.fileName).pipe(Option.map((candidate) => toMappedNode(file, candidate)), Option.getOrUndefined) }
42
+ });
41
43
  // src/program.ts
42
44
  const tracing = OtlpTracer.layerFromConfig({ resource: { serviceName: "oxlint-typed-rules" } }).pipe(Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer));
43
45
  const runtime = ManagedRuntime.make(tracing);
44
- const api = new API();
46
+ const startApi = () => {
47
+ const started = new API();
48
+ process.once("beforeExit", () => {
49
+ started.close();
50
+ Effect.runFork(runtime.disposeEffect);
51
+ });
52
+ return started;
53
+ };
54
+ const api = startApi();
45
55
  const snapshots = /* @__PURE__ */ new Map([[api, api.createSnapshot()]]);
46
56
  const currentSnapshot = () => Option.fromNullishOr(snapshots.get(api)).pipe(Option.getOrElse(() => {
47
57
  const created = api.createSnapshot();
48
58
  snapshots.set(api, created);
49
59
  return created;
50
60
  }));
51
- process.once("beforeExit", () => {
52
- api.close();
53
- Effect.runFork(runtime.disposeEffect);
54
- });
55
61
  const isOwnSourceFile = (fileName) => !String.includes("/node_modules/")(fileName) && !String.endsWith(".d.ts")(fileName);
56
62
  const compatSymbols = /* @__PURE__ */ new WeakMap();
57
- const toCompatSymbol = (project, native) => Option.fromNullishOr(compatSymbols.get(native)).pipe(Option.getOrElse(() => {
63
+ const internCompatSymbol = (project, native) => Option.fromNullishOr(compatSymbols.get(native)).pipe(Option.getOrElse(() => {
58
64
  const created = {
59
65
  native,
60
66
  flags: native.flags,
@@ -67,35 +73,26 @@ const toCompatSymbol = (project, native) => Option.fromNullishOr(compatSymbols.g
67
73
  return created;
68
74
  }));
69
75
  const compatChecker = (project, checker) => ({
70
- getSymbolAtLocation: (node) => Option.fromNullishOr(checker.getSymbolAtLocation(node)).pipe(Option.map((native) => toCompatSymbol(project, native)), Option.getOrUndefined),
71
- getAliasedSymbol: (symbol) => toCompatSymbol(project, checker.getAliasedSymbol(symbol.native))
76
+ getSymbolAtLocation: (node) => Option.fromNullishOr(checker.getSymbolAtLocation(node)).pipe(Option.map((native) => internCompatSymbol(project, native)), Option.getOrUndefined),
77
+ getAliasedSymbol: (symbol) => internCompatSymbol(project, checker.getAliasedSymbol(symbol.native))
72
78
  });
73
79
  const ownSourceFiles = (program) => pipe(program.getSourceFileNames(), Array.filter(isOwnSourceFile), Array.flatMap((fileName) => Option.fromNullishOr(program.getSourceFile(fileName)).pipe(Option.toArray)));
80
+ const cachedOwnSourceFiles = memoizeByKey(ownSourceFiles);
74
81
  const compatPrograms = /* @__PURE__ */ new WeakMap();
75
- const toCompatProgram = (project) => Option.fromNullishOr(compatPrograms.get(project.program)).pipe(Option.getOrElse(() => {
82
+ const internCompatProgram = (project) => Option.fromNullishOr(compatPrograms.get(project.program)).pipe(Option.getOrElse(() => {
76
83
  const { program } = project;
77
84
  const checker = compatChecker(project, project.checker);
78
- const ownFiles = [];
79
85
  const created = {
80
- getSourceFile: (fileName) => program.getSourceFile(fileName),
81
- getSourceFiles: () => Array.head(ownFiles).pipe(Option.getOrElse(() => {
82
- const files = ownSourceFiles(program);
83
- ownFiles.push(files);
84
- return files;
85
- })),
86
+ getSourceFile: program.getSourceFile.bind(program),
87
+ getSourceFiles: () => cachedOwnSourceFiles(program),
86
88
  getTypeChecker: () => checker
87
89
  };
88
90
  compatPrograms.set(program, created);
89
91
  return created;
90
92
  }));
91
93
  const matchesText = (project, overlay) => Option.fromNullishOr(project.program.getSourceFile(overlay.fileName)).pipe(Option.exists((sourceFile) => sourceFile.text === overlay.text));
92
- const projectsByDirectory = /* @__PURE__ */ new WeakMap();
93
94
  const directoryOf = (fileName) => String.replace(/[\\/][^\\/]*$/u, "")(fileName);
94
- const directoryProjects = (snapshot) => Option.fromNullishOr(projectsByDirectory.get(snapshot)).pipe(Option.getOrElse(() => {
95
- const created = /* @__PURE__ */ new Map();
96
- projectsByDirectory.set(snapshot, created);
97
- return created;
98
- }));
95
+ const directoryProjects = memoizeByKey((_snapshot) => /* @__PURE__ */ new Map());
99
96
  const defaultProject = (snapshot, fileName) => Option.fromNullishOr(snapshot.getDefaultProjectForFile(fileName)).pipe(Option.map((project) => {
100
97
  directoryProjects(snapshot).set(directoryOf(fileName), project);
101
98
  return project;
@@ -117,7 +114,7 @@ const projectOfFile = (overlay) => Effect.suspend(() => Option.match(currentProj
117
114
  onNone: () => openFile(overlay)
118
115
  }));
119
116
  const programFor = (overlay) => Exit.match(runtime.runSyncExit(projectOfFile(overlay)), {
120
- onSuccess: Option.map(toCompatProgram),
117
+ onSuccess: Option.map(internCompatProgram),
121
118
  onFailure: (cause) => {
122
119
  throw Cause.squash(cause);
123
120
  }
@@ -129,9 +126,7 @@ const typedContext = (context, parserServices) => ({
129
126
  cwd: context.cwd,
130
127
  options: context.options,
131
128
  languageOptions: context.languageOptions,
132
- report: (diagnostic) => {
133
- context.report(diagnostic);
134
- },
129
+ report: context.report,
135
130
  sourceCode: { parserServices }
136
131
  });
137
132
  const withTypeInformation = (rule) => ({
@@ -148,4 +143,4 @@ const withTypeInformation = (rule) => ({
148
143
  const typedRules = (rules) => pipe(rules, Record.filter(isTypedRule), Record.map(withTypeInformation));
149
144
  export { withTypeInformation as n, typedRules as t };
150
145
 
151
- //# sourceMappingURL=typed-rule-ClHYwCu8.mjs.map
146
+ //# sourceMappingURL=typed-rule-BPSyA0px.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typed-rule-BPSyA0px.mjs","names":["Str","Arr"],"sources":["../src/memo.ts","../src/parser-services.ts","../src/program.ts","../src/typed-rule.ts"],"sourcesContent":["import { Option } from \"effect\";\n\nconst memoizeByKey = <Key extends WeakKey, Value>(\n compute: (key: Key) => Value,\n): ((key: Key) => Value) => {\n const cache = new WeakMap<Key, Value>();\n return (key) =>\n Option.fromNullishOr(cache.get(key)).pipe(\n Option.getOrElse(() => {\n const computed = compute(key);\n cache.set(key, computed);\n return computed;\n }),\n );\n};\n\nexport { memoizeByKey };\n","import { Option } from \"effect\";\nimport { SyntaxKind } from \"typescript-7/ast\";\nimport type { Node, SourceFile } from \"typescript-7/ast\";\nimport type { Context, Location, Range } from \"vite-plus/lint/plugins\";\n\nimport { memoizeByKey } from \"./memo.ts\";\nimport type { CompatProgram } from \"./program.ts\";\n\ninterface RangedNode {\n readonly range: Readonly<Range>;\n}\n\ninterface MappedNode {\n readonly type: string;\n readonly range: Readonly<Range>;\n readonly loc: Location;\n}\n\ninterface ParserServices {\n readonly program: CompatProgram;\n readonly esTreeNodeToTSNodeMap: { readonly get: (node: RangedNode) => Node };\n readonly tsNodeToESTreeNodeMap: {\n readonly get: (node: Node) => MappedNode | undefined;\n };\n}\n\ninterface FileProgram {\n readonly context: Context;\n readonly program: CompatProgram;\n readonly sourceFile: SourceFile;\n}\n\nconst covers = (node: Node, [start, end]: Readonly<Range>): boolean =>\n node.getStart() <= start && node.end >= end;\n\nconst spans = (node: Node, [start, end]: Readonly<Range>): boolean =>\n node.getStart() === start && node.end === end;\n\nconst innermostSpanning = (sourceFile: SourceFile, range: Readonly<Range>): Node => {\n const visit = (node: Node, found: Node): Node => {\n if (!covers(node, range)) {\n return found;\n }\n const matched = Option.liftPredicate(node, (candidate) => spans(candidate, range)).pipe(\n Option.getOrElse(() => found),\n );\n return Option.fromNullishOr(\n node.forEachChild((child) =>\n Option.liftPredicate(visit(child, matched), (deeper) => deeper !== matched).pipe(\n Option.getOrUndefined,\n ),\n ),\n ).pipe(Option.getOrElse(() => matched));\n };\n return visit(sourceFile, sourceFile);\n};\n\nconst toMappedNode = ({ context }: FileProgram, node: Node): MappedNode => {\n const start = node.getStart();\n return {\n type: SyntaxKind[node.kind],\n range: [start, node.end],\n loc: {\n start: context.sourceCode.getLocFromIndex(start),\n end: context.sourceCode.getLocFromIndex(node.end),\n },\n };\n};\n\nconst createParserServices = (file: FileProgram): ParserServices => ({\n program: file.program,\n esTreeNodeToTSNodeMap: {\n get: memoizeByKey((node: RangedNode) => innermostSpanning(file.sourceFile, node.range)),\n },\n tsNodeToESTreeNodeMap: {\n get: (node) =>\n Option.liftPredicate(\n node,\n (candidate) => candidate.getSourceFile().fileName === file.sourceFile.fileName,\n ).pipe(\n Option.map((candidate) => toMappedNode(file, candidate)),\n Option.getOrUndefined,\n ),\n },\n});\n\nexport { createParserServices };\nexport type { FileProgram, MappedNode, ParserServices, RangedNode };\n","import {\n Array as Arr,\n Cause,\n Effect,\n Exit,\n Layer,\n ManagedRuntime,\n Option,\n String as Str,\n pipe,\n} from \"effect\";\nimport { FetchHttpClient } from \"effect/http\";\nimport { OtlpSerialization, OtlpTracer } from \"effect/observability\";\nimport type { Node, SourceFile } from \"typescript-7/ast\";\nimport { createFileSystemLayer } from \"typescript-7/fs\";\nimport { API } from \"typescript-7/sync\";\nimport type {\n Checker,\n Program as NativeProgram,\n Project,\n Snapshot,\n Symbol as NativeSymbol,\n SymbolFlags,\n} from \"typescript-7/sync\";\n\nimport { memoizeByKey } from \"./memo.ts\";\n\nconst tracing = OtlpTracer.layerFromConfig({\n resource: { serviceName: \"oxlint-typed-rules\" },\n}).pipe(Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer));\n\nconst runtime = ManagedRuntime.make(tracing);\n\ninterface Overlay {\n readonly fileName: string;\n readonly text: string;\n}\n\ninterface CompatSymbol {\n readonly native: NativeSymbol;\n readonly flags: SymbolFlags;\n readonly name: string;\n readonly getName: () => string;\n readonly getFlags: () => SymbolFlags;\n readonly getDeclarations: () => readonly Node[];\n}\n\ninterface CompatChecker {\n readonly getSymbolAtLocation: (node: Node) => CompatSymbol | undefined;\n readonly getAliasedSymbol: (symbol: CompatSymbol) => CompatSymbol;\n}\n\ninterface CompatProgram {\n readonly getSourceFile: (fileName: string) => SourceFile | undefined;\n readonly getSourceFiles: () => readonly SourceFile[];\n readonly getTypeChecker: () => CompatChecker;\n}\n\nconst startApi = (): API => {\n const started = new API();\n process.once(\"beforeExit\", () => {\n started.close();\n Effect.runFork(runtime.disposeEffect);\n });\n return started;\n};\n\nconst api = startApi();\n\nconst snapshots = new Map<API, Snapshot>([[api, api.createSnapshot()]]);\n\nconst currentSnapshot = (): Snapshot =>\n Option.fromNullishOr(snapshots.get(api)).pipe(\n Option.getOrElse(() => {\n const created = api.createSnapshot();\n snapshots.set(api, created);\n return created;\n }),\n );\n\nconst isOwnSourceFile = (fileName: string): boolean =>\n !Str.includes(\"/node_modules/\")(fileName) && !Str.endsWith(\".d.ts\")(fileName);\n\nconst compatSymbols = new WeakMap<NativeSymbol, CompatSymbol>();\n\nconst internCompatSymbol = (project: Project, native: NativeSymbol): CompatSymbol =>\n Option.fromNullishOr(compatSymbols.get(native)).pipe(\n Option.getOrElse(() => {\n const created: CompatSymbol = {\n native,\n flags: native.flags,\n name: native.name,\n getName: () => native.name,\n getFlags: () => native.flags,\n getDeclarations: () =>\n pipe(\n native.declarations,\n Arr.flatMap((handle) =>\n Option.fromNullishOr(handle.resolve(project)).pipe(Option.toArray),\n ),\n ),\n };\n compatSymbols.set(native, created);\n return created;\n }),\n );\n\nconst compatChecker = (project: Project, checker: Checker): CompatChecker => ({\n getSymbolAtLocation: (node) =>\n Option.fromNullishOr(checker.getSymbolAtLocation(node)).pipe(\n Option.map((native) => internCompatSymbol(project, native)),\n Option.getOrUndefined,\n ),\n getAliasedSymbol: (symbol) =>\n internCompatSymbol(project, checker.getAliasedSymbol(symbol.native)),\n});\n\nconst ownSourceFiles = (program: NativeProgram): readonly SourceFile[] =>\n pipe(\n program.getSourceFileNames(),\n Arr.filter(isOwnSourceFile),\n Arr.flatMap((fileName) =>\n Option.fromNullishOr(program.getSourceFile(fileName)).pipe(Option.toArray),\n ),\n );\n\nconst cachedOwnSourceFiles = memoizeByKey(ownSourceFiles);\n\nconst compatPrograms = new WeakMap<NativeProgram, CompatProgram>();\n\nconst internCompatProgram = (project: Project): CompatProgram =>\n Option.fromNullishOr(compatPrograms.get(project.program)).pipe(\n Option.getOrElse(() => {\n const { program } = project;\n const checker = compatChecker(project, project.checker);\n const created: CompatProgram = {\n getSourceFile: program.getSourceFile.bind(program),\n getSourceFiles: () => cachedOwnSourceFiles(program),\n getTypeChecker: () => checker,\n };\n compatPrograms.set(program, created);\n return created;\n }),\n );\n\nconst matchesText = (project: Project, overlay: Overlay): boolean =>\n Option.fromNullishOr(project.program.getSourceFile(overlay.fileName)).pipe(\n Option.exists((sourceFile) => sourceFile.text === overlay.text),\n );\n\nconst directoryOf = (fileName: string): string => Str.replace(/[\\\\/][^\\\\/]*$/u, \"\")(fileName);\n\nconst directoryProjects = memoizeByKey(\n (_snapshot: Snapshot): Map<string, Project> => new Map<string, Project>(),\n);\n\nconst defaultProject = (snapshot: Snapshot, fileName: string): Option.Option<Project> =>\n Option.fromNullishOr(snapshot.getDefaultProjectForFile(fileName)).pipe(\n Option.map((project) => {\n directoryProjects(snapshot).set(directoryOf(fileName), project);\n return project;\n }),\n );\n\nconst currentProject = (overlay: Overlay): Option.Option<Project> => {\n const snapshot = currentSnapshot();\n return Option.fromNullishOr(directoryProjects(snapshot).get(directoryOf(overlay.fileName))).pipe(\n Option.filter((project) => matchesText(project, overlay)),\n Option.orElse(() =>\n defaultProject(snapshot, overlay.fileName).pipe(\n Option.filter((project) => matchesText(project, overlay)),\n ),\n ),\n );\n};\n\nconst openFile = (overlay: Overlay): Effect.Effect<Option.Option<Project>> =>\n Effect.sync(() => {\n const updated = currentSnapshot().update({\n openFiles: [overlay.fileName],\n fileSystem: createFileSystemLayer([[overlay.fileName, overlay.text]]),\n });\n snapshots.set(api, updated);\n return defaultProject(updated, overlay.fileName);\n }).pipe(\n Effect.withSpan(\"oxlint-typed-rules.open-file\", {\n attributes: { fileName: overlay.fileName },\n }),\n );\n\nconst projectOfFile = (overlay: Overlay): Effect.Effect<Option.Option<Project>> =>\n Effect.suspend(() =>\n Option.match(currentProject(overlay), {\n onSome: Effect.succeedSome,\n onNone: () => openFile(overlay),\n }),\n );\n\nconst programFor = (overlay: Overlay): Option.Option<CompatProgram> =>\n Exit.match(runtime.runSyncExit(projectOfFile(overlay)), {\n onSuccess: Option.map(internCompatProgram),\n onFailure: (cause) => {\n throw Cause.squash(cause);\n },\n });\n\nexport type { CompatChecker, CompatProgram, CompatSymbol, Overlay };\nexport { programFor };\n","import { Option, Predicate, Record, pipe } from \"effect\";\nimport type { Context, CreateRule, RuleMeta, Visitor } from \"vite-plus/lint/plugins\";\n\nimport { createParserServices } from \"./parser-services.ts\";\nimport type { ParserServices } from \"./parser-services.ts\";\nimport { programFor } from \"./program.ts\";\n\ninterface TypedContext {\n readonly filename: string;\n readonly cwd: string;\n readonly options: readonly unknown[];\n readonly languageOptions: Readonly<Context[\"languageOptions\"]>;\n readonly report: Context[\"report\"];\n readonly sourceCode: { readonly parserServices: ParserServices };\n}\n\ninterface TypedRule {\n readonly meta: RuleMeta;\n readonly create: (context: TypedContext) => Visitor;\n}\n\nconst isTypedRule = <Rule>(rule: Rule): rule is Rule & TypedRule =>\n Predicate.hasProperty(rule, \"meta\") &&\n Predicate.hasProperty(rule, \"create\") &&\n Predicate.isFunction(rule.create);\n\nconst typedContext = (context: Context, parserServices: ParserServices): TypedContext => ({\n filename: context.filename,\n cwd: context.cwd,\n options: context.options,\n languageOptions: context.languageOptions,\n report: context.report,\n sourceCode: { parserServices },\n});\n\nconst withTypeInformation = (rule: TypedRule): CreateRule => ({\n meta: rule.meta,\n create: (context) =>\n programFor({ fileName: context.filename, text: context.sourceCode.text }).pipe(\n Option.flatMap((program) =>\n Option.fromNullishOr(program.getSourceFile(context.filename)).pipe(\n Option.map((sourceFile) =>\n rule.create(\n typedContext(context, createParserServices({ context, program, sourceFile })),\n ),\n ),\n ),\n ),\n Option.getOrElse(() => ({})),\n ),\n});\n\nconst typedRules = (\n rules: Record.ReadonlyRecord<string, unknown>,\n): Record.ReadonlyRecord<string, CreateRule> =>\n pipe(rules, Record.filter(isTypedRule), Record.map(withTypeInformation));\n\nexport type { TypedContext, TypedRule };\nexport { typedRules, withTypeInformation };\n"],"mappings":";;;;;;;AAEA,MAAM,gBACJ,YAC0B;CAC1B,MAAM,wBAAQ,IAAI,QAAoB;CACtC,QAAQ,QACN,OAAO,cAAc,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,KACnC,OAAO,gBAAgB;EACrB,MAAM,WAAW,QAAQ,GAAG;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Q;CAClB,KAAK,QAAQ;CACb,SAAS,QAAQ;CACjB,iBAAiB,QAAQ;CACzB,QAAQ,QAAQ;CAChB,YAAY,EAAE,eAAe;AAC/B;AAEA,MAAM,uBAAuB,UAAiC;CAC5D,MAAM,KAAK;CACX,SAAS,YACP,WAAW;EAAE,UAAU,QAAQ;EAAU,MAAM,QAAQ,WAAW;CAAK,CAAC,CAAC,CAAC,KACxE,OAAO,SAAS,YACd,OAAO,cAAc,QAAQ,cAAc,QAAQ,QAAQ,CAAC,CAAC,CAAC,KAC5D,OAAO,KAAK,eACV,KAAK,OACH,aAAa,SAAS,qBAAqB;EAAE;EAAS;EAAS;CAAW,CAAC,CAAC,CAC9E,CACF,CACF,CACF,GACA,OAAO,iBAAiB,CAAC,EAAE,CAC7B;AACJ;AAEA,MAAM,cACJ,UAEA,KAAK,OAAO,OAAO,OAAO,WAAW,GAAG,OAAO,IAAI,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r_masseater/oxlint-typed-rules",
3
- "version": "0.0.3",
3
+ "version": "0.1.1",
4
4
  "description": "Run ESLint rules that need type information as oxlint JS plugins, starting with TanStack Start's React Server Component rules.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -9,14 +9,14 @@
9
9
  "tanstack-start",
10
10
  "typescript"
11
11
  ],
12
- "homepage": "https://github.com/masseater/oxlint-typed-rules#readme",
12
+ "homepage": "https://github.com/masseater/lint-kit/tree/main/libs/oxlint-typed-rules#readme",
13
13
  "bugs": {
14
- "url": "https://github.com/masseater/oxlint-typed-rules/issues"
14
+ "url": "https://github.com/masseater/lint-kit/issues"
15
15
  },
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/masseater/oxlint-typed-rules.git",
19
+ "url": "git+https://github.com/masseater/lint-kit.git",
20
20
  "directory": "libs/oxlint-typed-rules"
21
21
  },
22
22
  "files": [
@@ -40,12 +40,13 @@
40
40
  "provenance": true
41
41
  },
42
42
  "dependencies": {
43
- "effect": "4.0.7",
43
+ "effect": "4.1.2",
44
44
  "typescript-7": "npm:typescript@7.1.0-beta"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@arethetypeswrong/core": "0.18.5",
48
- "@effect/platform-node": "4.0.7",
48
+ "@effect/platform-node": "4.1.2",
49
+ "@effect/vitest": "4.1.2",
49
50
  "@size-limit/file": "14.3.0",
50
51
  "@tanstack/eslint-plugin-start": "0.1.0",
51
52
  "@types/node": "26.6.6",
@@ -66,7 +67,7 @@
66
67
  },
67
68
  "scripts": {
68
69
  "build": "vp pack",
69
- "test": "vp test run",
70
+ "test": "vp test run --coverage",
70
71
  "size": "vp run build && size-limit"
71
72
  }
72
73
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"typed-rule-ClHYwCu8.mjs","names":["Str","Arr"],"sources":["../src/parser-services.ts","../src/program.ts","../src/typed-rule.ts"],"sourcesContent":["import { Option } from \"effect\";\nimport { SyntaxKind } from \"typescript-7/ast\";\nimport type { Node, SourceFile } from \"typescript-7/ast\";\nimport type { Context, Location, Range } from \"vite-plus/lint/plugins\";\n\nimport type { CompatProgram } from \"./program.ts\";\n\ninterface RangedNode {\n readonly range: Readonly<Range>;\n}\n\ninterface MappedNode {\n readonly type: string;\n readonly range: Readonly<Range>;\n readonly loc: Location;\n}\n\ninterface ParserServices {\n readonly program: CompatProgram;\n readonly esTreeNodeToTSNodeMap: { readonly get: (node: RangedNode) => Node };\n readonly tsNodeToESTreeNodeMap: {\n readonly get: (node: Node) => MappedNode | undefined;\n };\n}\n\ninterface FileProgram {\n readonly context: Context;\n readonly program: CompatProgram;\n readonly sourceFile: SourceFile;\n}\n\nconst covers = (node: Node, [start, end]: Readonly<Range>): boolean =>\n node.getStart() <= start && node.end >= end;\n\nconst spans = (node: Node, [start, end]: Readonly<Range>): boolean =>\n node.getStart() === start && node.end === end;\n\nconst innermostSpanning = (sourceFile: SourceFile, range: Readonly<Range>): Node => {\n const visit = (node: Node, found: Node): Node => {\n if (!covers(node, range)) {\n return found;\n }\n const matched = Option.liftPredicate(node, (candidate) => spans(candidate, range)).pipe(\n Option.getOrElse(() => found),\n );\n return Option.fromNullishOr(\n node.forEachChild((child) =>\n Option.liftPredicate(visit(child, matched), (deeper) => deeper !== matched).pipe(\n Option.getOrUndefined,\n ),\n ),\n ).pipe(Option.getOrElse(() => matched));\n };\n return visit(sourceFile, sourceFile);\n};\n\nconst toMappedNode = ({ context }: FileProgram, node: Node): MappedNode => {\n const start = node.getStart();\n return {\n type: SyntaxKind[node.kind],\n range: [start, node.end],\n loc: {\n start: context.sourceCode.getLocFromIndex(start),\n end: context.sourceCode.getLocFromIndex(node.end),\n },\n };\n};\n\nconst createParserServices = (file: FileProgram): ParserServices => {\n const toTs = new WeakMap<RangedNode, Node>();\n return {\n program: file.program,\n esTreeNodeToTSNodeMap: {\n get: (node) =>\n Option.fromNullishOr(toTs.get(node)).pipe(\n Option.getOrElse(() => {\n const found = innermostSpanning(file.sourceFile, node.range);\n toTs.set(node, found);\n return found;\n }),\n ),\n },\n tsNodeToESTreeNodeMap: {\n get: (node) =>\n Option.liftPredicate(\n node,\n (candidate) => candidate.getSourceFile().fileName === file.sourceFile.fileName,\n ).pipe(\n Option.map((candidate) => toMappedNode(file, candidate)),\n Option.getOrUndefined,\n ),\n },\n };\n};\n\nexport { createParserServices };\nexport type { FileProgram, MappedNode, ParserServices, RangedNode };\n","import {\n Array as Arr,\n Cause,\n Effect,\n Exit,\n Layer,\n ManagedRuntime,\n Option,\n String as Str,\n pipe,\n} from \"effect\";\nimport { FetchHttpClient } from \"effect/http\";\nimport { OtlpSerialization, OtlpTracer } from \"effect/observability\";\nimport type { Node, SourceFile } from \"typescript-7/ast\";\nimport { createFileSystemLayer } from \"typescript-7/fs\";\nimport { API } from \"typescript-7/sync\";\nimport type {\n Checker,\n Program as NativeProgram,\n Project,\n Snapshot,\n Symbol as NativeSymbol,\n SymbolFlags,\n} from \"typescript-7/sync\";\n\nconst tracing = OtlpTracer.layerFromConfig({\n resource: { serviceName: \"oxlint-typed-rules\" },\n}).pipe(Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer));\n\nconst runtime = ManagedRuntime.make(tracing);\n\ninterface Overlay {\n readonly fileName: string;\n readonly text: string;\n}\n\ninterface CompatSymbol {\n readonly native: NativeSymbol;\n readonly flags: SymbolFlags;\n readonly name: string;\n readonly getName: () => string;\n readonly getFlags: () => SymbolFlags;\n readonly getDeclarations: () => readonly Node[];\n}\n\ninterface CompatChecker {\n readonly getSymbolAtLocation: (node: Node) => CompatSymbol | undefined;\n readonly getAliasedSymbol: (symbol: CompatSymbol) => CompatSymbol;\n}\n\ninterface CompatProgram {\n readonly getSourceFile: (fileName: string) => SourceFile | undefined;\n readonly getSourceFiles: () => readonly SourceFile[];\n readonly getTypeChecker: () => CompatChecker;\n}\n\nconst api = new API();\n\nconst snapshots = new Map<API, Snapshot>([[api, api.createSnapshot()]]);\n\nconst currentSnapshot = (): Snapshot =>\n Option.fromNullishOr(snapshots.get(api)).pipe(\n Option.getOrElse(() => {\n const created = api.createSnapshot();\n snapshots.set(api, created);\n return created;\n }),\n );\n\nprocess.once(\"beforeExit\", () => {\n api.close();\n Effect.runFork(runtime.disposeEffect);\n});\n\nconst isOwnSourceFile = (fileName: string): boolean =>\n !Str.includes(\"/node_modules/\")(fileName) && !Str.endsWith(\".d.ts\")(fileName);\n\nconst compatSymbols = new WeakMap<NativeSymbol, CompatSymbol>();\n\nconst toCompatSymbol = (project: Project, native: NativeSymbol): CompatSymbol =>\n Option.fromNullishOr(compatSymbols.get(native)).pipe(\n Option.getOrElse(() => {\n const created: CompatSymbol = {\n native,\n flags: native.flags,\n name: native.name,\n getName: () => native.name,\n getFlags: () => native.flags,\n getDeclarations: () =>\n pipe(\n native.declarations,\n Arr.flatMap((handle) =>\n Option.fromNullishOr(handle.resolve(project)).pipe(Option.toArray),\n ),\n ),\n };\n compatSymbols.set(native, created);\n return created;\n }),\n );\n\nconst compatChecker = (project: Project, checker: Checker): CompatChecker => ({\n getSymbolAtLocation: (node) =>\n Option.fromNullishOr(checker.getSymbolAtLocation(node)).pipe(\n Option.map((native) => toCompatSymbol(project, native)),\n Option.getOrUndefined,\n ),\n getAliasedSymbol: (symbol) => toCompatSymbol(project, checker.getAliasedSymbol(symbol.native)),\n});\n\nconst ownSourceFiles = (program: NativeProgram): readonly SourceFile[] =>\n pipe(\n program.getSourceFileNames(),\n Arr.filter(isOwnSourceFile),\n Arr.flatMap((fileName) =>\n Option.fromNullishOr(program.getSourceFile(fileName)).pipe(Option.toArray),\n ),\n );\n\nconst compatPrograms = new WeakMap<NativeProgram, CompatProgram>();\n\nconst toCompatProgram = (project: Project): CompatProgram =>\n Option.fromNullishOr(compatPrograms.get(project.program)).pipe(\n Option.getOrElse(() => {\n const { program } = project;\n const checker = compatChecker(project, project.checker);\n const ownFiles: (readonly SourceFile[])[] = [];\n const created: CompatProgram = {\n getSourceFile: (fileName) => program.getSourceFile(fileName),\n getSourceFiles: () =>\n Arr.head(ownFiles).pipe(\n Option.getOrElse(() => {\n const files = ownSourceFiles(program);\n ownFiles.push(files);\n return files;\n }),\n ),\n getTypeChecker: () => checker,\n };\n compatPrograms.set(program, created);\n return created;\n }),\n );\n\nconst matchesText = (project: Project, overlay: Overlay): boolean =>\n Option.fromNullishOr(project.program.getSourceFile(overlay.fileName)).pipe(\n Option.exists((sourceFile) => sourceFile.text === overlay.text),\n );\n\nconst projectsByDirectory = new WeakMap<Snapshot, Map<string, Project>>();\n\nconst directoryOf = (fileName: string): string => Str.replace(/[\\\\/][^\\\\/]*$/u, \"\")(fileName);\n\nconst directoryProjects = (snapshot: Snapshot): Map<string, Project> =>\n Option.fromNullishOr(projectsByDirectory.get(snapshot)).pipe(\n Option.getOrElse(() => {\n const created = new Map<string, Project>();\n projectsByDirectory.set(snapshot, created);\n return created;\n }),\n );\n\nconst defaultProject = (snapshot: Snapshot, fileName: string): Option.Option<Project> =>\n Option.fromNullishOr(snapshot.getDefaultProjectForFile(fileName)).pipe(\n Option.map((project) => {\n directoryProjects(snapshot).set(directoryOf(fileName), project);\n return project;\n }),\n );\n\nconst currentProject = (overlay: Overlay): Option.Option<Project> => {\n const snapshot = currentSnapshot();\n return Option.fromNullishOr(directoryProjects(snapshot).get(directoryOf(overlay.fileName))).pipe(\n Option.filter((project) => matchesText(project, overlay)),\n Option.orElse(() =>\n defaultProject(snapshot, overlay.fileName).pipe(\n Option.filter((project) => matchesText(project, overlay)),\n ),\n ),\n );\n};\n\nconst openFile = (overlay: Overlay): Effect.Effect<Option.Option<Project>> =>\n Effect.sync(() => {\n const updated = currentSnapshot().update({\n openFiles: [overlay.fileName],\n fileSystem: createFileSystemLayer([[overlay.fileName, overlay.text]]),\n });\n snapshots.set(api, updated);\n return defaultProject(updated, overlay.fileName);\n }).pipe(\n Effect.withSpan(\"oxlint-typed-rules.open-file\", {\n attributes: { fileName: overlay.fileName },\n }),\n );\n\nconst projectOfFile = (overlay: Overlay): Effect.Effect<Option.Option<Project>> =>\n Effect.suspend(() =>\n Option.match(currentProject(overlay), {\n onSome: Effect.succeedSome,\n onNone: () => openFile(overlay),\n }),\n );\n\nconst programFor = (overlay: Overlay): Option.Option<CompatProgram> =>\n Exit.match(runtime.runSyncExit(projectOfFile(overlay)), {\n onSuccess: Option.map(toCompatProgram),\n onFailure: (cause) => {\n throw Cause.squash(cause);\n },\n });\n\nexport type { CompatChecker, CompatProgram, CompatSymbol, Overlay };\nexport { programFor };\n","import { Option, Predicate, Record, pipe } from \"effect\";\nimport type { Context, CreateRule, RuleMeta, Visitor } from \"vite-plus/lint/plugins\";\n\nimport { createParserServices } from \"./parser-services.ts\";\nimport type { ParserServices } from \"./parser-services.ts\";\nimport { programFor } from \"./program.ts\";\n\ninterface TypedContext {\n readonly filename: string;\n readonly cwd: string;\n readonly options: readonly unknown[];\n readonly languageOptions: Readonly<Context[\"languageOptions\"]>;\n readonly report: Context[\"report\"];\n readonly sourceCode: { readonly parserServices: ParserServices };\n}\n\ninterface TypedRule {\n readonly meta: RuleMeta;\n readonly create: (context: TypedContext) => Visitor;\n}\n\nconst isTypedRule = <Rule>(rule: Rule): rule is Rule & TypedRule =>\n Predicate.hasProperty(rule, \"meta\") &&\n Predicate.hasProperty(rule, \"create\") &&\n Predicate.isFunction(rule.create);\n\nconst typedContext = (context: Context, parserServices: ParserServices): TypedContext => ({\n filename: context.filename,\n cwd: context.cwd,\n options: context.options,\n languageOptions: context.languageOptions,\n report: (diagnostic) => {\n context.report(diagnostic);\n },\n sourceCode: { parserServices },\n});\n\nconst withTypeInformation = (rule: TypedRule): CreateRule => ({\n meta: rule.meta,\n create: (context) =>\n programFor({ fileName: context.filename, text: context.sourceCode.text }).pipe(\n Option.flatMap((program) =>\n Option.fromNullishOr(program.getSourceFile(context.filename)).pipe(\n Option.map((sourceFile) =>\n rule.create(\n typedContext(context, createParserServices({ context, program, sourceFile })),\n ),\n ),\n ),\n ),\n Option.getOrElse(() => ({})),\n ),\n});\n\nconst typedRules = (\n rules: Record.ReadonlyRecord<string, unknown>,\n): Record.ReadonlyRecord<string, CreateRule> =>\n pipe(rules, Record.filter(isTypedRule), Record.map(withTypeInformation));\n\nexport type { TypedContext, TypedRule };\nexport { typedRules, withTypeInformation };\n"],"mappings":";;;;;;;AA+BA,MAAM,UAAU,MAAY,CAAC,OAAO,SAClC,KAAK,SAAS,KAAK,SAAS,KAAK,OAAO;AAE1C,MAAM,SAAS,MAAY,CAAC,OAAO,SACjC,KAAK,SAAS,MAAM,SAAS,KAAK,QAAQ;AAE5C,MAAM,qBAAqB,YAAwB,UAAiC;CAClF,MAAM,SAAS,MAAY,UAAsB;EAC/C,IAAI,CAAC,OAAO,MAAM,KAAK,GACrB,OAAO;EAET,MAAM,UAAU,OAAO,cAAc,OAAO,cAAc,MAAM,WAAW,KAAK,CAAC,CAAC,CAAC,KACjF,OAAO,gBAAgB,KAAK,CAC9B;EACA,OAAO,OAAO,cACZ,KAAK,cAAc,UACjB,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