@geoql/doctor-rule-core 1.1.0 → 1.2.0

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/dist/index.js CHANGED
@@ -133,7 +133,7 @@ const noExplicitImportsOfAutoImported = defineRule({ create(context) {
133
133
  } });
134
134
  //#endregion
135
135
  //#region src/rules/nuxt/ai-slop/no-fetch-in-setup.ts
136
- const MESSAGE$22 = `Bare $fetch/fetch at the top level of <script setup> runs on both server and client without SSR deduplication. Use useFetch for automatic request deduplication and SSR hydration. See https://nuxt.com/docs/4.x/guide/data-fetching`;
136
+ const MESSAGE$27 = `Bare $fetch/fetch at the top level of <script setup> runs on both server and client without SSR deduplication. Use useFetch for automatic request deduplication and SSR hydration. See https://nuxt.com/docs/4.x/guide/data-fetching`;
137
137
  function isFetchCall(node) {
138
138
  if (!node || node.type !== "CallExpression") return false;
139
139
  const callee = node.callee;
@@ -170,7 +170,7 @@ const noFetchInSetup = defineRule({ create(context) {
170
170
  if (node["parent"]?.type === "AwaitExpression") return;
171
171
  context.report({
172
172
  node,
173
- message: MESSAGE$22
173
+ message: MESSAGE$27
174
174
  });
175
175
  },
176
176
  AwaitExpression(node) {
@@ -178,7 +178,7 @@ const noFetchInSetup = defineRule({ create(context) {
178
178
  if (!isFetchCall(node.argument)) return;
179
179
  context.report({
180
180
  node,
181
- message: MESSAGE$22
181
+ message: MESSAGE$27
182
182
  });
183
183
  }
184
184
  };
@@ -190,7 +190,7 @@ const LEGACY_PROPS = new Set([
190
190
  "server",
191
191
  "browser"
192
192
  ]);
193
- const MESSAGE$21 = `Use import.meta.client / import.meta.server / import.meta.browser instead of process.client / process.server / process.browser (Nuxt 4). See https://nuxt.com/docs/4.x/guide/concepts/auto-imports`;
193
+ const MESSAGE$26 = `Use import.meta.client / import.meta.server / import.meta.browser instead of process.client / process.server / process.browser (Nuxt 4). See https://nuxt.com/docs/4.x/guide/concepts/auto-imports`;
194
194
  const noProcessClientServer = defineRule({
195
195
  create(context) {
196
196
  return { MemberExpression(node) {
@@ -202,7 +202,7 @@ const noProcessClientServer = defineRule({
202
202
  if (!LEGACY_PROPS.has(property.name)) return;
203
203
  context.report({
204
204
  node,
205
- message: MESSAGE$21
205
+ message: MESSAGE$26
206
206
  });
207
207
  } };
208
208
  },
@@ -219,7 +219,7 @@ const noProcessClientServer = defineRule({
219
219
  });
220
220
  //#endregion
221
221
  //#region src/rules/nuxt/ai-slop/no-useState-for-server-data.ts
222
- const MESSAGE$20 = `useState with a fetch/await initializer suggests useFetch or useAsyncData for automatic SSR hydration and request deduplication. See https://nuxt.com/docs/4.x/guide/data-fetching`;
222
+ const MESSAGE$25 = `useState with a fetch/await initializer suggests useFetch or useAsyncData for automatic SSR hydration and request deduplication. See https://nuxt.com/docs/4.x/guide/data-fetching`;
223
223
  function containsFetchOrAwait(node, visited) {
224
224
  if (!node || visited.has(node)) return false;
225
225
  visited.add(node);
@@ -256,13 +256,13 @@ const noUseStateForServerData = defineRule({ create(context) {
256
256
  if (!containsFetchOrAwait(initFn.body, /* @__PURE__ */ new Set())) return;
257
257
  context.report({
258
258
  node,
259
- message: MESSAGE$20
259
+ message: MESSAGE$25
260
260
  });
261
261
  } };
262
262
  } });
263
263
  //#endregion
264
264
  //#region src/rules/nuxt/data-fetching/useAsyncData-key-required-in-loop.ts
265
- const MESSAGE$19 = `useAsyncData/useFetch without an explicit string key inside a loop causes duplicate requests and cache fragmentation. Pass a unique string key as the first argument. See https://nuxt.com/docs/4.x/guide/data-fetching`;
265
+ const MESSAGE$24 = `useAsyncData/useFetch without an explicit string key inside a loop causes duplicate requests and cache fragmentation. Pass a unique string key as the first argument. See https://nuxt.com/docs/4.x/guide/data-fetching`;
266
266
  const DATA_FETCHERS = new Set(["useAsyncData", "useFetch"]);
267
267
  function isMapCall(node) {
268
268
  const callee = node.callee;
@@ -315,7 +315,7 @@ const useAsyncDataKeyRequiredInLoop = defineRule({ create(context) {
315
315
  if (firstArg.type === "Literal" && typeof firstArg.value === "string") return;
316
316
  context.report({
317
317
  node,
318
- message: MESSAGE$19
318
+ message: MESSAGE$24
319
319
  });
320
320
  },
321
321
  "CallExpression:exit"(node) {
@@ -325,7 +325,7 @@ const useAsyncDataKeyRequiredInLoop = defineRule({ create(context) {
325
325
  } });
326
326
  //#endregion
327
327
  //#region src/rules/nuxt/security/no-user-input-in-fetch-url.ts
328
- const MESSAGE$18 = `Building a useFetch/$fetch URL from user input (route.query/route.params) lets an attacker control the request target — an SSRF risk during SSR. Use a fixed path and pass user input via the query/body options instead. See https://owasp.org/www-community/attacks/Server_Side_Request_Forgery`;
328
+ const MESSAGE$23 = `Building a useFetch/$fetch URL from user input (route.query/route.params) lets an attacker control the request target — an SSRF risk during SSR. Use a fixed path and pass user input via the query/body options instead. See https://owasp.org/www-community/attacks/Server_Side_Request_Forgery`;
329
329
  const FETCH_CALLEES = new Set([
330
330
  "useFetch",
331
331
  "useLazyFetch",
@@ -363,13 +363,13 @@ const noUserInputInFetchUrl = defineRule({ create(context) {
363
363
  const urlArg = node.arguments[0];
364
364
  if (urlArgIsTainted(urlArg)) context.report({
365
365
  node,
366
- message: MESSAGE$18
366
+ message: MESSAGE$23
367
367
  });
368
368
  } };
369
369
  } });
370
370
  //#endregion
371
371
  //#region src/rules/nuxt/hydration/clientOnly-for-browser-apis.ts
372
- const MESSAGE$17 = `Accessing window./document./navigator./localStorage./sessionStorage. without an import.meta.client or process.client guard causes SSR failures. Wrap with if (import.meta.client) { ... } or move to onMounted. See https://nuxt.com/docs/4.x/guide/components`;
372
+ const MESSAGE$22 = `Accessing window./document./navigator./localStorage./sessionStorage. without an import.meta.client or process.client guard causes SSR failures. Wrap with if (import.meta.client) { ... } or move to onMounted. See https://nuxt.com/docs/4.x/guide/components`;
373
373
  const BROWSER_GLOBALS = new Set([
374
374
  "window",
375
375
  "document",
@@ -440,14 +440,14 @@ const clientOnlyForBrowserApis = defineRule({ create(context) {
440
440
  if (!BROWSER_GLOBALS.has(obj.name)) return;
441
441
  context.report({
442
442
  node,
443
- message: MESSAGE$17
443
+ message: MESSAGE$22
444
444
  });
445
445
  }
446
446
  };
447
447
  } });
448
448
  //#endregion
449
449
  //#region src/rules/nuxt/hydration/no-document-in-setup.ts
450
- const MESSAGE$16 = `Accessing document/window/navigator/localStorage at the top level of <script setup> causes a server-side crash (SSR). These browser globals are undefined on the server. Move access inside onMounted or guard with import.meta.client. See https://nuxt.com/docs/4.x/guide/components`;
450
+ const MESSAGE$21 = `Accessing document/window/navigator/localStorage at the top level of <script setup> causes a server-side crash (SSR). These browser globals are undefined on the server. Move access inside onMounted or guard with import.meta.client. See https://nuxt.com/docs/4.x/guide/components`;
451
451
  const SSR_UNSAFE_GLOBALS = new Set([
452
452
  "document",
453
453
  "window",
@@ -480,14 +480,14 @@ const noDocumentInSetup = defineRule({ create(context) {
480
480
  if (functionDepthStack.length > 0) return;
481
481
  if (SSR_UNSAFE_GLOBALS.has(node.name)) context.report({
482
482
  node,
483
- message: MESSAGE$16
483
+ message: MESSAGE$21
484
484
  });
485
485
  }
486
486
  };
487
487
  } });
488
488
  //#endregion
489
489
  //#region src/rules/nuxt/server-routes/createError-on-failure.ts
490
- const MESSAGE$15 = `throw new Error() leaks the call stack and exposes internal details. Use throw createError() from h3 for proper HTTP errors with no stack leak. See https://h3.unjs.io/guide/throw`;
490
+ const MESSAGE$20 = `throw new Error() leaks the call stack and exposes internal details. Use throw createError() from h3 for proper HTTP errors with no stack leak. See https://h3.unjs.io/guide/throw`;
491
491
  const createErrorOnFailure = defineRule({ create(context) {
492
492
  let handlerDepth = 0;
493
493
  return {
@@ -512,15 +512,15 @@ const createErrorOnFailure = defineRule({ create(context) {
512
512
  if (ctor.name !== "Error") return;
513
513
  context.report({
514
514
  node,
515
- message: MESSAGE$15
515
+ message: MESSAGE$20
516
516
  });
517
517
  }
518
518
  };
519
519
  } });
520
520
  //#endregion
521
521
  //#region src/rules/nuxt/server-routes/defineEventHandler-typed.ts
522
- const MESSAGE$14 = `defineEventHandler handler param event lacks a type annotation. Add a generic: defineEventHandler<H3Event>(...) or type the event parameter explicitly. See https://h3.unjs.io/guide/typed`;
523
- function isFunction$1(node) {
522
+ const MESSAGE$19 = `defineEventHandler handler param event lacks a type annotation. Add a generic: defineEventHandler<H3Event>(...) or type the event parameter explicitly. See https://h3.unjs.io/guide/typed`;
523
+ function isFunction$2(node) {
524
524
  return node?.type === "ArrowFunctionExpression" || node?.type === "FunctionExpression";
525
525
  }
526
526
  const defineEventHandlerTyped = defineRule({ create(context) {
@@ -532,19 +532,19 @@ const defineEventHandlerTyped = defineRule({ create(context) {
532
532
  const args = node.arguments;
533
533
  if (args.length === 0) return;
534
534
  const handler = args[0];
535
- if (!isFunction$1(handler)) return;
535
+ if (!isFunction$2(handler)) return;
536
536
  const params = handler.params;
537
537
  if (!params || params.length === 0) return;
538
538
  if (params[0].typeAnnotation) return;
539
539
  context.report({
540
540
  node,
541
- message: MESSAGE$14
541
+ message: MESSAGE$19
542
542
  });
543
543
  } };
544
544
  } });
545
545
  //#endregion
546
546
  //#region src/rules/nuxt/server-routes/validate-body-with-h3-v2.ts
547
- const MESSAGE$13 = `readBody() is the legacy H3 reader. In Nuxt 4 with h3 v2, use readValidatedBody to parse and validate the request body in one step. See https://nuxt.com/docs/4.x/guide/data-fetching`;
547
+ const MESSAGE$18 = `readBody() is the legacy H3 reader. In Nuxt 4 with h3 v2, use readValidatedBody to parse and validate the request body in one step. See https://nuxt.com/docs/4.x/guide/data-fetching`;
548
548
  const validateBodyWithH3V2 = defineRule({ create(context) {
549
549
  return { CallExpression(node) {
550
550
  const callee = node.callee;
@@ -552,7 +552,7 @@ const validateBodyWithH3V2 = defineRule({ create(context) {
552
552
  if (callee.name !== "readBody") return;
553
553
  context.report({
554
554
  node,
555
- message: MESSAGE$13
555
+ message: MESSAGE$18
556
556
  });
557
557
  } };
558
558
  } });
@@ -582,7 +582,7 @@ const NUXT_RULES = [
582
582
  ];
583
583
  //#endregion
584
584
  //#region src/rules/vue/ai-slop/no-destructure-props-without-toRefs.ts
585
- const MESSAGE$12 = `Destructuring props loses reactivity. Wrap with toRefs(...) to keep refs. See https://vuejs.org/guide/components/props.html#reactive-props-destructure`;
585
+ const MESSAGE$17 = `Destructuring props loses reactivity. Wrap with toRefs(...) to keep refs. See https://vuejs.org/guide/components/props.html#reactive-props-destructure`;
586
586
  function calleeName$6(node) {
587
587
  const callee = node.callee;
588
588
  if (callee?.type === "Identifier") return callee.name;
@@ -618,7 +618,7 @@ const noDestructurePropsWithoutToRefs = defineRule({ create(context) {
618
618
  if (isToRefsCall$1(init)) return;
619
619
  if (isDefinePropsCall(init) || init.type === "Identifier" && propsSources.has(init.name)) context.report({
620
620
  node,
621
- message: MESSAGE$12
621
+ message: MESSAGE$17
622
622
  });
623
623
  },
624
624
  Property(node) {
@@ -629,7 +629,7 @@ const noDestructurePropsWithoutToRefs = defineRule({ create(context) {
629
629
  } });
630
630
  //#endregion
631
631
  //#region src/rules/vue/ai-slop/no-destructure-reactive-without-toRefs.ts
632
- const MESSAGE$11 = `Destructuring reactive state loses reactivity. Wrap with toRefs(...) or read single keys via toRef(state, 'key'). See https://vuejs.org/guide/essentials/reactivity-fundamentals.html#destructuring-reactive-state`;
632
+ const MESSAGE$16 = `Destructuring reactive state loses reactivity. Wrap with toRefs(...) or read single keys via toRef(state, 'key'). See https://vuejs.org/guide/essentials/reactivity-fundamentals.html#destructuring-reactive-state`;
633
633
  const REACTIVE_FACTORIES = new Set(["reactive", "shallowReactive"]);
634
634
  function calleeName$5(node) {
635
635
  const callee = node.callee;
@@ -661,7 +661,7 @@ const noDestructureReactiveWithoutToRefs = defineRule({ create(context) {
661
661
  if (isToRefsCall(init)) return;
662
662
  if (isReactiveCall(init) || init.type === "Identifier" && reactiveSources.has(init.name)) context.report({
663
663
  node,
664
- message: MESSAGE$11
664
+ message: MESSAGE$16
665
665
  });
666
666
  } };
667
667
  } });
@@ -730,7 +730,7 @@ const noImportsFromVueWhenAutoImported = defineRule({ create(context) {
730
730
  } });
731
731
  //#endregion
732
732
  //#region src/rules/vue/ai-slop/no-non-null-assertion-on-ref-value.ts
733
- const MESSAGE$10 = `Non-null assertion on a ref's .value hides nullability. Add an explicit guard ('if (!r.value) return') or use optional chaining ('r.value?.x'). See https://vuejs.org/guide/typescript/composition-api.html#typing-ref`;
733
+ const MESSAGE$15 = `Non-null assertion on a ref's .value hides nullability. Add an explicit guard ('if (!r.value) return') or use optional chaining ('r.value?.x'). See https://vuejs.org/guide/typescript/composition-api.html#typing-ref`;
734
734
  const REF_FACTORIES = new Set([
735
735
  "ref",
736
736
  "shallowRef",
@@ -767,14 +767,14 @@ const noNonNullAssertionOnRefValue = defineRule({ create(context) {
767
767
  if (!refSources.has(object.name)) return;
768
768
  context.report({
769
769
  node,
770
- message: MESSAGE$10
770
+ message: MESSAGE$15
771
771
  });
772
772
  }
773
773
  };
774
774
  } });
775
775
  //#endregion
776
776
  //#region src/rules/vue/composition/defineProps-typed.ts
777
- const MESSAGE$9 = `This defineProps() call declares props with a runtime object, which discards static type information. Use the type-only generic form (defineProps<{ ... }>()) so props are fully typed. See https://vuejs.org/guide/typescript/composition-api.html#typing-component-props`;
777
+ const MESSAGE$14 = `This defineProps() call declares props with a runtime object, which discards static type information. Use the type-only generic form (defineProps<{ ... }>()) so props are fully typed. See https://vuejs.org/guide/typescript/composition-api.html#typing-component-props`;
778
778
  function calleeName$3(node) {
779
779
  const callee = node.callee;
780
780
  if (callee?.type === "Identifier") return callee.name;
@@ -784,13 +784,41 @@ const definePropsTyped = defineRule({ create(context) {
784
784
  if (calleeName$3(node) !== "defineProps") return;
785
785
  if (node.arguments[0]?.type === "ObjectExpression") context.report({
786
786
  node,
787
- message: MESSAGE$9
787
+ message: MESSAGE$14
788
788
  });
789
789
  } };
790
790
  } });
791
791
  //#endregion
792
+ //#region src/rules/vue/composition/no-pinia-store-in-setup.ts
793
+ const MESSAGE$13 = `This calls defineStore() inside a function (setup, a composable, or a component body), so a brand-new store definition is created on every call instead of one shared singleton. Call defineStore() once at module scope and call the returned useXxxStore() inside setup. See https://pinia.vuejs.org/core-concepts/#defining-a-store`;
794
+ const noPiniaStoreInSetup = defineRule({ create(context) {
795
+ let functionDepth = 0;
796
+ const enter = () => {
797
+ functionDepth += 1;
798
+ };
799
+ const exit = () => {
800
+ functionDepth -= 1;
801
+ };
802
+ return {
803
+ CallExpression(node) {
804
+ const callee = node.callee;
805
+ if (callee?.type !== "Identifier" || callee.name !== "defineStore") return;
806
+ if (functionDepth > 0) context.report({
807
+ node,
808
+ message: MESSAGE$13
809
+ });
810
+ },
811
+ FunctionDeclaration: enter,
812
+ "FunctionDeclaration:exit": exit,
813
+ FunctionExpression: enter,
814
+ "FunctionExpression:exit": exit,
815
+ ArrowFunctionExpression: enter,
816
+ "ArrowFunctionExpression:exit": exit
817
+ };
818
+ } });
819
+ //#endregion
792
820
  //#region src/rules/vue/composition/prefer-script-setup-for-new-files.ts
793
- const MESSAGE$8 = `This component nests composition-API logic inside an options-object setup(). Use a <script setup> block instead — it removes the setup() boilerplate and exposes bindings to the template directly. See https://vuejs.org/api/sfc-script-setup.html`;
821
+ const MESSAGE$12 = `This component nests composition-API logic inside an options-object setup(). Use a <script setup> block instead — it removes the setup() boilerplate and exposes bindings to the template directly. See https://vuejs.org/api/sfc-script-setup.html`;
794
822
  function isFunctionValue(node) {
795
823
  return node?.type === "ArrowFunctionExpression" || node?.type === "FunctionExpression";
796
824
  }
@@ -807,13 +835,13 @@ const preferScriptSetupForNewFiles = defineRule({ create(context) {
807
835
  if (declaration?.type !== "ObjectExpression") return;
808
836
  if (declaration.properties.some(isSetupProperty)) context.report({
809
837
  node,
810
- message: MESSAGE$8
838
+ message: MESSAGE$12
811
839
  });
812
840
  } };
813
841
  } });
814
842
  //#endregion
815
843
  //#region src/rules/vue/performance/prefer-defineAsyncComponent-on-route.ts
816
- const MESSAGE$7 = `This route record's \`component:\` field references the imported component directly, which forces a synchronous import of the route bundle. Use \`() => import('./Foo.vue')\` or \`defineAsyncComponent(() => import('./Foo.vue'))\` to lazy-load the route. See https://vuejs.org/guide/components/async.html`;
844
+ const MESSAGE$11 = `This route record's \`component:\` field references the imported component directly, which forces a synchronous import of the route bundle. Use \`() => import('./Foo.vue')\` or \`defineAsyncComponent(() => import('./Foo.vue'))\` to lazy-load the route. See https://vuejs.org/guide/components/async.html`;
817
845
  function keyName(key) {
818
846
  return key.type === "Identifier" ? key.name : key.value;
819
847
  }
@@ -823,6 +851,313 @@ const preferDefineAsyncComponentOnRoute = defineRule({ create(context) {
823
851
  if (keyName(node.key) !== "component") return;
824
852
  if (node.value.type === "Identifier") context.report({
825
853
  node,
854
+ message: MESSAGE$11
855
+ });
856
+ } };
857
+ } });
858
+ //#endregion
859
+ //#region src/rules/vue/performance/prefer-module-scope-pure-function.ts
860
+ const MESSAGE$10 = `This helper closes over nothing reactive (only its parameters, imports, and globals), yet it is re-created on every call of the enclosing function. Hoist it to module scope so a single function reference is shared across all component instances. See https://vuejs.org/guide/best-practices/performance.html`;
861
+ const GLOBALS = new Set([
862
+ "console",
863
+ "Math",
864
+ "JSON",
865
+ "Object",
866
+ "Array",
867
+ "Number",
868
+ "String",
869
+ "Boolean",
870
+ "Date",
871
+ "RegExp",
872
+ "Map",
873
+ "Set",
874
+ "WeakMap",
875
+ "WeakSet",
876
+ "Promise",
877
+ "Symbol",
878
+ "BigInt",
879
+ "parseInt",
880
+ "parseFloat",
881
+ "isNaN",
882
+ "isFinite",
883
+ "encodeURIComponent",
884
+ "decodeURIComponent",
885
+ "structuredClone",
886
+ "undefined",
887
+ "NaN",
888
+ "Infinity",
889
+ "globalThis"
890
+ ]);
891
+ const SKIP_KEYS = new Set([
892
+ "type",
893
+ "loc",
894
+ "start",
895
+ "end",
896
+ "range",
897
+ "parent"
898
+ ]);
899
+ function eachChild(node, visit) {
900
+ for (const key of Object.keys(node)) {
901
+ if (SKIP_KEYS.has(key)) continue;
902
+ const value = node[key];
903
+ if (Array.isArray(value)) {
904
+ for (const c of value) if (c && typeof c === "object" && "type" in c) visit(c);
905
+ } else if (value && typeof value === "object" && "type" in value) visit(value);
906
+ }
907
+ }
908
+ function collectPatternNames(pattern, into) {
909
+ switch (pattern.type) {
910
+ case "Identifier":
911
+ into.add(pattern.name);
912
+ return;
913
+ case "AssignmentPattern":
914
+ collectPatternNames(pattern.left, into);
915
+ return;
916
+ case "RestElement":
917
+ collectPatternNames(pattern.argument, into);
918
+ return;
919
+ case "ArrayPattern":
920
+ for (const el of pattern.elements) if (el) collectPatternNames(el, into);
921
+ return;
922
+ case "ObjectPattern":
923
+ for (const prop of pattern.properties) if (prop.type === "RestElement") collectPatternNames(prop.argument, into);
924
+ else collectPatternNames(prop.value, into);
925
+ return;
926
+ }
927
+ }
928
+ function collectBound(fn, bound) {
929
+ for (const param of fn.params) collectPatternNames(param, bound);
930
+ if (fn.id && fn.id.type === "Identifier") bound.add(fn.id.name);
931
+ const walk = (node) => {
932
+ if (node.type === "VariableDeclarator") collectPatternNames(node.id, bound);
933
+ else if (node.type === "FunctionDeclaration" && node.id) bound.add(node.id.name);
934
+ else if ((node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") && node !== fn) for (const p of node.params) collectPatternNames(p, bound);
935
+ eachChild(node, walk);
936
+ };
937
+ eachChild(fn, walk);
938
+ }
939
+ function collectFree(fn, free) {
940
+ const visit = (node, parent, key) => {
941
+ if (node.type === "Identifier") {
942
+ const isMemberProp = parent?.type === "MemberExpression" && key === "property" && parent.computed !== true;
943
+ const isPropKey = parent?.type === "Property" && key === "key" && parent.computed !== true;
944
+ if (!isMemberProp && !isPropKey) free.add(node.name);
945
+ return;
946
+ }
947
+ for (const k of Object.keys(node)) {
948
+ if (SKIP_KEYS.has(k)) continue;
949
+ const value = node[k];
950
+ if (Array.isArray(value)) {
951
+ for (const c of value) if (c && typeof c === "object" && "type" in c) visit(c, node, k);
952
+ } else if (value && typeof value === "object" && "type" in value) visit(value, node, k);
953
+ }
954
+ };
955
+ for (const stmt of bodyNodes(fn)) visit(stmt, fn, "body");
956
+ }
957
+ function bodyNodes(fn) {
958
+ const body = fn.body;
959
+ if (body.type === "BlockStatement") return body.body;
960
+ return [body];
961
+ }
962
+ function isHoistable(fn, imports) {
963
+ const bound = /* @__PURE__ */ new Set();
964
+ collectBound(fn, bound);
965
+ const free = /* @__PURE__ */ new Set();
966
+ collectFree(fn, free);
967
+ for (const name of free) {
968
+ if (bound.has(name)) continue;
969
+ if (imports.has(name)) continue;
970
+ if (GLOBALS.has(name)) continue;
971
+ return false;
972
+ }
973
+ return true;
974
+ }
975
+ const preferModuleScopePureFunction = defineRule({ create(context) {
976
+ const imports = /* @__PURE__ */ new Set();
977
+ let functionDepth = 0;
978
+ const enter = () => {
979
+ functionDepth += 1;
980
+ };
981
+ const exit = () => {
982
+ functionDepth -= 1;
983
+ };
984
+ const analyze = (fn) => {
985
+ if (functionDepth < 1) return;
986
+ if (isHoistable(fn, imports)) context.report({
987
+ node: fn,
988
+ message: MESSAGE$10
989
+ });
990
+ };
991
+ return {
992
+ ImportDeclaration(node) {
993
+ for (const spec of node.specifiers) {
994
+ const local = spec.local;
995
+ imports.add(local.name);
996
+ }
997
+ },
998
+ VariableDeclaration(node) {
999
+ if (functionDepth < 1) return;
1000
+ if (node.kind !== "const") return;
1001
+ for (const decl of node.declarations) {
1002
+ const init = decl.init;
1003
+ if (init?.type === "ArrowFunctionExpression" || init?.type === "FunctionExpression") {
1004
+ if (isHoistable(init, imports)) context.report({
1005
+ node: init,
1006
+ message: MESSAGE$10
1007
+ });
1008
+ }
1009
+ }
1010
+ },
1011
+ FunctionDeclaration(node) {
1012
+ analyze(node);
1013
+ enter();
1014
+ },
1015
+ "FunctionDeclaration:exit"() {
1016
+ exit();
1017
+ },
1018
+ ArrowFunctionExpression: enter,
1019
+ "ArrowFunctionExpression:exit": exit,
1020
+ FunctionExpression: enter,
1021
+ "FunctionExpression:exit": exit
1022
+ };
1023
+ } });
1024
+ //#endregion
1025
+ //#region src/rules/vue/performance/prefer-module-scope-static-value.ts
1026
+ const MESSAGE$9 = `This static array or object literal is declared inside a function, so a fresh copy is allocated on every call (including every component instantiation). Hoist it to module scope so the single frozen reference is shared. See https://vuejs.org/guide/best-practices/performance.html`;
1027
+ const LITERAL_TYPES = new Set([
1028
+ "Literal",
1029
+ "StringLiteral",
1030
+ "NumericLiteral",
1031
+ "BooleanLiteral",
1032
+ "NullLiteral",
1033
+ "BigIntLiteral",
1034
+ "TemplateLiteral"
1035
+ ]);
1036
+ function isStaticLiteral(node) {
1037
+ if (!node) return false;
1038
+ if (LITERAL_TYPES.has(node.type)) {
1039
+ if (node.type === "TemplateLiteral") return node.expressions.length === 0;
1040
+ return true;
1041
+ }
1042
+ if (node.type === "UnaryExpression") return isStaticLiteral(node.argument);
1043
+ if (node.type === "ArrayExpression") {
1044
+ const elements = node.elements;
1045
+ return elements.length > 0 && elements.every((el) => isStaticLiteral(el ?? void 0));
1046
+ }
1047
+ if (node.type === "ObjectExpression") {
1048
+ const props = node.properties;
1049
+ if (props.length === 0) return false;
1050
+ return props.every((p) => {
1051
+ if (p.type !== "Property" || p.computed === true) return false;
1052
+ return isStaticLiteral(p.value);
1053
+ });
1054
+ }
1055
+ return false;
1056
+ }
1057
+ function isHoistableSize(node) {
1058
+ if (node.type === "ArrayExpression") return node.elements.length > 1;
1059
+ return node.properties.length > 0;
1060
+ }
1061
+ const preferModuleScopeStaticValue = defineRule({ create(context) {
1062
+ let functionDepth = 0;
1063
+ return {
1064
+ ArrowFunctionExpression() {
1065
+ functionDepth += 1;
1066
+ },
1067
+ "ArrowFunctionExpression:exit"() {
1068
+ functionDepth -= 1;
1069
+ },
1070
+ FunctionExpression() {
1071
+ functionDepth += 1;
1072
+ },
1073
+ "FunctionExpression:exit"() {
1074
+ functionDepth -= 1;
1075
+ },
1076
+ FunctionDeclaration() {
1077
+ functionDepth += 1;
1078
+ },
1079
+ "FunctionDeclaration:exit"() {
1080
+ functionDepth -= 1;
1081
+ },
1082
+ VariableDeclarator(node) {
1083
+ if (functionDepth === 0) return;
1084
+ const init = node.init;
1085
+ if (!init) return;
1086
+ if (init.type !== "ArrayExpression" && init.type !== "ObjectExpression") return;
1087
+ if (!isHoistableSize(init)) return;
1088
+ if (!isStaticLiteral(init)) return;
1089
+ context.report({
1090
+ node: init,
1091
+ message: MESSAGE$9
1092
+ });
1093
+ }
1094
+ };
1095
+ } });
1096
+ //#endregion
1097
+ //#region src/rules/vue/performance/prefer-stable-empty-fallback.ts
1098
+ const MESSAGE$8 = `This computed falls back to a fresh empty array or object literal, so it returns a brand-new reference whenever the source is nullish. Downstream watchers, child props, and v-memo see an identity change every recompute. Hoist a single module-scope EMPTY constant and fall back to that. See https://vuejs.org/guide/best-practices/performance.html`;
1099
+ function isEmptyLiteral(node) {
1100
+ if (node?.type === "ArrayExpression") return node.elements.length === 0;
1101
+ if (node?.type === "ObjectExpression") return node.properties.length === 0;
1102
+ return false;
1103
+ }
1104
+ function fallsBackToEmptyLiteral(node) {
1105
+ if (node.type === "LogicalExpression") {
1106
+ const op = node.operator;
1107
+ if (op !== "??" && op !== "||") return false;
1108
+ return isEmptyLiteral(node.right);
1109
+ }
1110
+ if (node.type === "ConditionalExpression") return isEmptyLiteral(node.consequent) || isEmptyLiteral(node.alternate);
1111
+ return false;
1112
+ }
1113
+ function getterBody(node) {
1114
+ const first = node.arguments[0];
1115
+ if (first?.type !== "ArrowFunctionExpression" && first?.type !== "FunctionExpression") return;
1116
+ const body = first.body;
1117
+ if (body.type !== "BlockStatement") return body;
1118
+ const statements = body.body;
1119
+ for (const stmt of statements) if (stmt.type === "ReturnStatement") return stmt.argument;
1120
+ }
1121
+ const preferStableEmptyFallback = defineRule({ create(context) {
1122
+ return { CallExpression(node) {
1123
+ const callee = node.callee;
1124
+ if (callee?.type !== "Identifier" || callee.name !== "computed") return;
1125
+ const returned = getterBody(node);
1126
+ if (returned && fallsBackToEmptyLiteral(returned)) context.report({
1127
+ node: returned,
1128
+ message: MESSAGE$8
1129
+ });
1130
+ } };
1131
+ } });
1132
+ //#endregion
1133
+ //#region src/rules/vue/reactivity/no-fresh-deps-in-watch.ts
1134
+ const MESSAGE$7 = `This watch getter returns a freshly-constructed array or object literal, so Vue compares it by reference (Object.is) and the watcher re-fires on every reactive tick — even when nothing changed. Use the multi-source array form watch([a, b], cb) for several sources, or watch a primitive/ref directly. See https://vuejs.org/guide/essentials/watchers.html#watch-source-types`;
1135
+ function isFunction$1(node) {
1136
+ return node?.type === "ArrowFunctionExpression" || node?.type === "FunctionExpression";
1137
+ }
1138
+ function unwrap(node) {
1139
+ let current = node;
1140
+ while (current?.type === "ParenthesizedExpression") current = current.expression;
1141
+ return current;
1142
+ }
1143
+ function isFreshLiteral(node) {
1144
+ const inner = unwrap(node);
1145
+ return inner?.type === "ArrayExpression" || inner?.type === "ObjectExpression";
1146
+ }
1147
+ function getterReturnsFreshLiteral(fn) {
1148
+ const body = fn.body;
1149
+ if (body.type !== "BlockStatement") return isFreshLiteral(body);
1150
+ for (const stmt of body.body) if (stmt.type === "ReturnStatement") return isFreshLiteral(stmt.argument);
1151
+ return false;
1152
+ }
1153
+ const noFreshDepsInWatch = defineRule({ create(context) {
1154
+ return { CallExpression(node) {
1155
+ const callee = node.callee;
1156
+ if (callee?.type !== "Identifier" || callee.name !== "watch") return;
1157
+ const source = node.arguments[0];
1158
+ if (!source || !isFunction$1(source)) return;
1159
+ if (getterReturnsFreshLiteral(source)) context.report({
1160
+ node: source,
826
1161
  message: MESSAGE$7
827
1162
  });
828
1163
  } };
@@ -1162,9 +1497,14 @@ const VUE_RULES = [
1162
1497
  coreRule("reactivity/watch-without-cleanup", "reactivity", "warn", true, defineRule(watchWithoutCleanup)),
1163
1498
  coreRule("reactivity/prefer-shallowRef-for-large-data", "reactivity", "info", false, defineRule(preferShallowRefForLargeData)),
1164
1499
  coreRule("reactivity/prefer-readonly-for-injected", "reactivity", "info", false, defineRule(preferReadonlyForInjected)),
1500
+ coreRule("reactivity/no-fresh-deps-in-watch", "reactivity", "warn", true, defineRule(noFreshDepsInWatch)),
1165
1501
  coreRule("composition/prefer-script-setup-for-new-files", "composition", "warn", true, defineRule(preferScriptSetupForNewFiles)),
1166
1502
  coreRule("composition/defineProps-typed", "composition", "warn", true, defineRule(definePropsTyped)),
1503
+ coreRule("composition/no-pinia-store-in-setup", "composition", "warn", true, defineRule(noPiniaStoreInSetup)),
1167
1504
  coreRule("performance/prefer-defineAsyncComponent-on-route", "performance", "info", false, defineRule(preferDefineAsyncComponentOnRoute)),
1505
+ coreRule("performance/prefer-module-scope-static-value", "performance", "info", false, defineRule(preferModuleScopeStaticValue)),
1506
+ coreRule("performance/prefer-module-scope-pure-function", "performance", "info", false, defineRule(preferModuleScopePureFunction)),
1507
+ coreRule("performance/prefer-stable-empty-fallback", "performance", "warn", true, defineRule(preferStableEmptyFallback)),
1168
1508
  coreRule("security/no-inner-html", "security", "error", true, defineRule(noInnerHtml)),
1169
1509
  coreRule("security/no-eval-like", "security", "error", true, defineRule(noEvalLike)),
1170
1510
  coreRule("security/no-auth-token-in-web-storage", "security", "warn", true, defineRule(noAuthTokenInWebStorage)),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DOCS_URL","WHOLE_MESSAGE","SPECIFIER_MESSAGE","isAutoImportedValueSpecifier","MESSAGE","MESSAGE","MESSAGE","MESSAGE","MESSAGE","calleeName","MESSAGE","MESSAGE","MESSAGE","MESSAGE","isFunction","MESSAGE","coreRule","MESSAGE","calleeName","isToRefsCall","MESSAGE","calleeName","MESSAGE","calleeName","MESSAGE","calleeName","MESSAGE","MESSAGE","MESSAGE","calleeName","MESSAGE","calleeName","MESSAGE","MESSAGE","stringValue","MESSAGE","MESSAGE"],"sources":["../src/define-rule.ts","../src/shared/auto-imported-symbols.ts","../src/rules/nuxt/ai-slop/no-explicit-imports-of-auto-imported.ts","../src/rules/nuxt/ai-slop/no-fetch-in-setup.ts","../src/rules/nuxt/ai-slop/no-process-client-server.ts","../src/rules/nuxt/ai-slop/no-useState-for-server-data.ts","../src/rules/nuxt/data-fetching/useAsyncData-key-required-in-loop.ts","../src/rules/nuxt/security/no-user-input-in-fetch-url.ts","../src/rules/nuxt/hydration/clientOnly-for-browser-apis.ts","../src/rules/nuxt/hydration/no-document-in-setup.ts","../src/rules/nuxt/server-routes/createError-on-failure.ts","../src/rules/nuxt/server-routes/defineEventHandler-typed.ts","../src/rules/nuxt/server-routes/validate-body-with-h3-v2.ts","../src/rules/nuxt/index.ts","../src/rules/vue/ai-slop/no-destructure-props-without-toRefs.ts","../src/rules/vue/ai-slop/no-destructure-reactive-without-toRefs.ts","../src/rules/vue/ai-slop/no-em-dash-in-string.ts","../src/rules/vue/ai-slop/no-imports-from-vue-when-auto-imported.ts","../src/rules/vue/ai-slop/no-non-null-assertion-on-ref-value.ts","../src/rules/vue/composition/defineProps-typed.ts","../src/rules/vue/composition/prefer-script-setup-for-new-files.ts","../src/rules/vue/performance/prefer-defineAsyncComponent-on-route.ts","../src/rules/vue/reactivity/prefer-readonly-for-injected.ts","../src/rules/vue/reactivity/prefer-shallowRef-for-large-data.ts","../src/rules/vue/reactivity/watch-without-cleanup.ts","../src/rules/vue/security/no-auth-token-in-web-storage.ts","../src/rules/vue/security/no-eval-like.ts","../src/rules/vue/security/no-inner-html.ts","../src/rules/vue/security/no-secrets-in-source.ts","../src/rules/vue/index.ts"],"sourcesContent":["import type { Rule, RuleContext } from './types.js';\n\nexport function defineRule(rule: Rule): Rule {\n const userFix = rule.fix;\n if (!userFix) return rule;\n return {\n ...rule,\n meta: { ...rule.meta, fixable: 'code' },\n create(context: RuleContext) {\n const wrapped: RuleContext = {\n ...context,\n report(descriptor) {\n const replacement = userFix(descriptor.node);\n if (replacement === null) {\n context.report(descriptor);\n return;\n }\n context.report({\n ...descriptor,\n fix: (fixer) => fixer.replaceText(descriptor.node, replacement),\n });\n },\n };\n return rule.create(wrapped);\n },\n };\n}\n","export const VUE_AUTO_IMPORTED: ReadonlySet<string> = new Set([\n 'ref',\n 'shallowRef',\n 'computed',\n 'reactive',\n 'shallowReactive',\n 'readonly',\n 'shallowReadonly',\n 'toRef',\n 'toRefs',\n 'isRef',\n 'isReactive',\n 'isReadonly',\n 'isProxy',\n 'unref',\n 'triggerRef',\n 'customRef',\n 'markRaw',\n 'toRaw',\n 'watch',\n 'watchEffect',\n 'watchPostEffect',\n 'watchSyncEffect',\n 'effectScope',\n 'getCurrentScope',\n 'onScopeDispose',\n 'onMounted',\n 'onUpdated',\n 'onUnmounted',\n 'onBeforeMount',\n 'onBeforeUpdate',\n 'onBeforeUnmount',\n 'onErrorCaptured',\n 'onRenderTracked',\n 'onRenderTriggered',\n 'onActivated',\n 'onDeactivated',\n 'onServerPrefetch',\n 'provide',\n 'inject',\n 'hasInjectionContext',\n 'getCurrentInstance',\n 'nextTick',\n 'defineComponent',\n 'defineAsyncComponent',\n 'useTemplateRef',\n 'useId',\n 'useModel',\n]);\n\nexport const NUXT_AUTO_IMPORTED: ReadonlySet<string> = new Set([\n ...VUE_AUTO_IMPORTED,\n 'useRoute',\n 'useRouter',\n 'useFetch',\n 'useAsyncData',\n 'useState',\n 'useRuntimeConfig',\n 'useNuxtApp',\n 'navigateTo',\n 'definePageMeta',\n 'useSeoMeta',\n 'useHead',\n]);\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\nimport { NUXT_AUTO_IMPORTED } from '../../../shared/auto-imported-symbols.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/concepts/auto-imports';\nconst WHOLE_MESSAGE = `These symbols are auto-imported in Nuxt projects. Remove the import entirely. See ${DOCS_URL}`;\nconst SPECIFIER_MESSAGE = `This symbol is auto-imported in Nuxt projects. Remove it from the import — it is dead weight. See ${DOCS_URL}`;\n\nconst AUTO_IMPORT_SOURCES = new Set(['vue', '#imports', 'vue-router', '#app']);\n\nfunction isAutoImportedValueSpecifier(spec: AstNode): boolean {\n if (spec.importKind === 'type') return false;\n const imported = spec.imported as AstNode;\n return NUXT_AUTO_IMPORTED.has(imported.name as string);\n}\n\nexport const noExplicitImportsOfAutoImported = defineRule({\n create(context: RuleContext) {\n return {\n ImportDeclaration(node: AstNode) {\n if (node.importKind === 'type') return;\n const source = node.source as AstNode;\n if (!AUTO_IMPORT_SOURCES.has(source.value as string)) return;\n const specifiers = node.specifiers as AstNode[];\n const named = specifiers.filter((s) => s.type === 'ImportSpecifier');\n if (named.length === 0) return;\n const offending = named.filter(isAutoImportedValueSpecifier);\n if (offending.length === 0) return;\n if (\n offending.length === named.length &&\n specifiers.length === named.length\n ) {\n context.report({ node, message: WHOLE_MESSAGE });\n return;\n }\n for (const spec of offending) {\n context.report({ node: spec, message: SPECIFIER_MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `Bare $fetch/fetch at the top level of <script setup> runs on both server and client without SSR deduplication. Use useFetch for automatic request deduplication and SSR hydration. See ${DOCS_URL}`;\n\nfunction isFetchCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') {\n const name = callee.name as string;\n return name === '$fetch' || name === 'fetch';\n }\n return false;\n}\n\nexport const noFetchInSetup = defineRule({\n create(context: RuleContext) {\n const functionDepthStack: number[] = [];\n\n return {\n ArrowFunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'ArrowFunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionDeclaration() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionDeclaration:exit'() {\n functionDepthStack.pop();\n },\n CallExpression(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (!isFetchCall(node)) return;\n const parent = (node as Record<string, unknown>)['parent'] as\n | AstNode\n | undefined;\n if (parent?.type === 'AwaitExpression') return;\n context.report({ node, message: MESSAGE });\n },\n AwaitExpression(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (!isFetchCall(node.argument as AstNode | undefined)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst LEGACY_PROPS = new Set(['client', 'server', 'browser']);\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/concepts/auto-imports';\nconst MESSAGE = `Use import.meta.client / import.meta.server / import.meta.browser instead of process.client / process.server / process.browser (Nuxt 4). See ${DOCS_URL}`;\n\nexport const noProcessClientServer = defineRule({\n create(context: RuleContext) {\n return {\n MemberExpression(node: AstNode) {\n const object = node.object as AstNode | undefined;\n if (object?.type !== 'Identifier') return;\n if ((object as AstNode & { name: string }).name !== 'process') return;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return;\n if (!LEGACY_PROPS.has(property.name as string)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n fix(node: AstNode) {\n const object = node.object as AstNode | undefined;\n if (object?.type !== 'Identifier') return null;\n if ((object as AstNode & { name: string }).name !== 'process') return null;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return null;\n const name = property.name as string;\n if (!LEGACY_PROPS.has(name)) return null;\n return `import.meta.${name}`;\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `useState with a fetch/await initializer suggests useFetch or useAsyncData for automatic SSR hydration and request deduplication. See ${DOCS_URL}`;\n\nfunction containsFetchOrAwait(\n node: AstNode | undefined,\n visited: Set<unknown>,\n): boolean {\n if (!node || visited.has(node)) return false;\n visited.add(node);\n if (node.type === 'AwaitExpression') return true;\n if (node.type === 'CallExpression') {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') {\n const name = callee.name as string;\n if (name === '$fetch' || name === 'fetch') return true;\n }\n }\n for (const key of Object.keys(node)) {\n if (key === 'type' || key === 'loc' || key === 'range') continue;\n const value = (node as Record<string, unknown>)[key];\n if (Array.isArray(value)) {\n for (const child of value) {\n if (child && typeof child === 'object' && 'type' in child) {\n if (containsFetchOrAwait(child as AstNode, visited)) return true;\n }\n }\n } else if (value && typeof value === 'object' && 'type' in value) {\n if (containsFetchOrAwait(value as AstNode, visited)) return true;\n }\n }\n return false;\n}\n\nexport const noUseStateForServerData = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if ((callee as AstNode & { name: string }).name !== 'useState') return;\n const args = node.arguments as AstNode[];\n if (args.length < 2) return;\n const initFn = args[1];\n if (\n initFn.type !== 'ArrowFunctionExpression' &&\n initFn.type !== 'FunctionExpression'\n )\n return;\n if (!containsFetchOrAwait(initFn.body as AstNode, new Set())) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `useAsyncData/useFetch without an explicit string key inside a loop causes duplicate requests and cache fragmentation. Pass a unique string key as the first argument. See ${DOCS_URL}`;\n\nconst DATA_FETCHERS = new Set(['useAsyncData', 'useFetch']);\n\nfunction isMapCall(node: AstNode): boolean {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name === 'map';\n if (callee?.type === 'MemberExpression') {\n const prop = (callee as AstNode & { property?: AstNode }).property as\n | AstNode\n | undefined;\n return (\n prop?.type === 'Identifier' &&\n (prop as AstNode & { name: string }).name === 'map'\n );\n }\n return false;\n}\n\nexport const useAsyncDataKeyRequiredInLoop = defineRule({\n create(context: RuleContext) {\n let loopDepth = 0;\n\n return {\n ForStatement() {\n loopDepth++;\n },\n 'ForStatement:exit'() {\n loopDepth--;\n },\n ForOfStatement() {\n loopDepth++;\n },\n 'ForOfStatement:exit'() {\n loopDepth--;\n },\n ForInStatement() {\n loopDepth++;\n },\n 'ForInStatement:exit'() {\n loopDepth--;\n },\n WhileStatement() {\n loopDepth++;\n },\n 'WhileStatement:exit'() {\n loopDepth--;\n },\n CallExpression(node: AstNode) {\n if (isMapCall(node)) {\n loopDepth++;\n return;\n }\n if (loopDepth === 0) return;\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (!DATA_FETCHERS.has(callee.name as string)) return;\n const args = node.arguments as AstNode[];\n if (args.length === 0) return;\n const firstArg = args[0];\n if (firstArg.type === 'Literal' && typeof firstArg.value === 'string')\n return;\n context.report({ node, message: MESSAGE });\n },\n 'CallExpression:exit'(node: AstNode) {\n if (isMapCall(node)) {\n loopDepth--;\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://owasp.org/www-community/attacks/Server_Side_Request_Forgery';\nconst MESSAGE = `Building a useFetch/$fetch URL from user input (route.query/route.params) lets an attacker control the request target — an SSRF risk during SSR. Use a fixed path and pass user input via the query/body options instead. See ${DOCS_URL}`;\n\nconst FETCH_CALLEES = new Set([\n 'useFetch',\n 'useLazyFetch',\n 'useAsyncData',\n 'useLazyAsyncData',\n '$fetch',\n]);\n\nconst USER_INPUT_ROOTS = new Set(['route', 'useRoute']);\nconst USER_INPUT_SEGMENTS = new Set(['query', 'params']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\n/** True when the expression reads from route.query.* or route.params.*. */\nfunction readsUserInput(node: AstNode): boolean {\n if (node.type !== 'MemberExpression') return false;\n const object = node.object as AstNode;\n const property = node.property as AstNode;\n if (\n object.type === 'Identifier' &&\n USER_INPUT_ROOTS.has(object.name as string) &&\n property.type === 'Identifier' &&\n USER_INPUT_SEGMENTS.has(property.name as string)\n ) {\n return true;\n }\n return readsUserInput(object);\n}\n\nfunction templateReadsUserInput(node: AstNode): boolean {\n const expressions = node.expressions as AstNode[];\n return expressions.some((expr) => readsUserInput(expr));\n}\n\nfunction urlArgIsTainted(arg: AstNode | undefined): boolean {\n if (!arg) return false;\n if (arg.type === 'TemplateLiteral') return templateReadsUserInput(arg);\n if (arg.type === 'MemberExpression') return readsUserInput(arg);\n return false;\n}\n\nexport const noUserInputInFetchUrl = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const name = calleeName(node);\n if (name === undefined || !FETCH_CALLEES.has(name)) return;\n const urlArg = (node.arguments as AstNode[])[0];\n if (urlArgIsTainted(urlArg)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/components';\nconst MESSAGE = `Accessing window./document./navigator./localStorage./sessionStorage. without an import.meta.client or process.client guard causes SSR failures. Wrap with if (import.meta.client) { ... } or move to onMounted. See ${DOCS_URL}`;\n\nconst BROWSER_GLOBALS = new Set([\n 'window',\n 'document',\n 'navigator',\n 'localStorage',\n 'sessionStorage',\n]);\n\nfunction isImportMetaClientGuard(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'MemberExpression') return false;\n const obj = node.object as AstNode | undefined;\n if (obj?.type !== 'MetaProperty') return false;\n const meta = obj.meta as AstNode | undefined;\n const prop = obj.property as AstNode | undefined;\n if (meta?.type !== 'Identifier') return false;\n if ((meta as AstNode & { name: string }).name !== 'import') return false;\n if (prop?.type !== 'Identifier') return false;\n if ((prop as AstNode & { name: string }).name !== 'meta') return false;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return false;\n return (property as AstNode & { name: string }).name === 'client';\n}\n\nfunction isProcessClientGuard(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'MemberExpression') return false;\n const obj = node.object as AstNode | undefined;\n if (obj?.type !== 'Identifier') return false;\n if ((obj as AstNode & { name: string }).name !== 'process') return false;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return false;\n return (property as AstNode & { name: string }).name === 'client';\n}\n\nexport const clientOnlyForBrowserApis = defineRule({\n create(context: RuleContext) {\n const functionDepthStack: number[] = [];\n let isGuarded = false;\n\n return {\n ArrowFunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'ArrowFunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionDeclaration() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionDeclaration:exit'() {\n functionDepthStack.pop();\n },\n IfStatement(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n const test = node.test as AstNode | undefined;\n if (isImportMetaClientGuard(test) || isProcessClientGuard(test)) {\n isGuarded = true;\n }\n },\n 'IfStatement:exit'(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n const test = node.test as AstNode | undefined;\n if (isImportMetaClientGuard(test) || isProcessClientGuard(test)) {\n isGuarded = false;\n }\n },\n MemberExpression(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (isGuarded) return;\n const obj = node.object as AstNode | undefined;\n if (obj?.type !== 'Identifier') return;\n if (!BROWSER_GLOBALS.has(obj.name as string)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/components';\nconst MESSAGE = `Accessing document/window/navigator/localStorage at the top level of <script setup> causes a server-side crash (SSR). These browser globals are undefined on the server. Move access inside onMounted or guard with import.meta.client. See ${DOCS_URL}`;\n\nconst SSR_UNSAFE_GLOBALS = new Set([\n 'document',\n 'window',\n 'navigator',\n 'localStorage',\n 'sessionStorage',\n]);\n\nexport const noDocumentInSetup = defineRule({\n create(context: RuleContext) {\n const functionDepthStack: number[] = [];\n\n return {\n ArrowFunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'ArrowFunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionDeclaration() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionDeclaration:exit'() {\n functionDepthStack.pop();\n },\n Identifier(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (SSR_UNSAFE_GLOBALS.has(node.name as string)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://h3.unjs.io/guide/throw';\nconst MESSAGE = `throw new Error() leaks the call stack and exposes internal details. Use throw createError() from h3 for proper HTTP errors with no stack leak. See ${DOCS_URL}`;\n\nexport const createErrorOnFailure = defineRule({\n create(context: RuleContext) {\n let handlerDepth = 0;\n\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (\n (callee as AstNode & { name: string }).name !== 'defineEventHandler'\n )\n return;\n handlerDepth++;\n },\n 'CallExpression:exit'(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (\n (callee as AstNode & { name: string }).name !== 'defineEventHandler'\n )\n return;\n handlerDepth--;\n },\n ThrowStatement(node: AstNode) {\n if (handlerDepth === 0) return;\n const arg = node.argument as AstNode | undefined;\n if (!arg || arg.type !== 'NewExpression') return;\n const ctor = arg.callee as AstNode | undefined;\n if (ctor?.type !== 'Identifier') return;\n if ((ctor as AstNode & { name: string }).name !== 'Error') return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://h3.unjs.io/guide/typed';\nconst MESSAGE = `defineEventHandler handler param event lacks a type annotation. Add a generic: defineEventHandler<H3Event>(...) or type the event parameter explicitly. See ${DOCS_URL}`;\n\nfunction isFunction(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nexport const defineEventHandlerTyped = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (\n (callee as AstNode & { name: string }).name !== 'defineEventHandler'\n )\n return;\n if (node.typeArguments) return;\n const args = node.arguments as AstNode[];\n if (args.length === 0) return;\n const handler = args[0];\n if (!isFunction(handler)) return;\n const params = (handler as AstNode & { params: AstNode[] }).params;\n if (!params || params.length === 0) return;\n const eventParam = params[0] as AstNode;\n if (eventParam.typeAnnotation) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `readBody() is the legacy H3 reader. In Nuxt 4 with h3 v2, use readValidatedBody to parse and validate the request body in one step. See ${DOCS_URL}`;\n\nexport const validateBodyWithH3V2 = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if ((callee as AstNode & { name: string }).name !== 'readBody') return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../define-rule.js';\nimport type { CoreRule } from '../../types.js';\nimport { noExplicitImportsOfAutoImported } from './ai-slop/no-explicit-imports-of-auto-imported.js';\nimport { noFetchInSetup } from './ai-slop/no-fetch-in-setup.js';\nimport { noProcessClientServer } from './ai-slop/no-process-client-server.js';\nimport { noUseStateForServerData } from './ai-slop/no-useState-for-server-data.js';\nimport { useAsyncDataKeyRequiredInLoop } from './data-fetching/useAsyncData-key-required-in-loop.js';\nimport { noUserInputInFetchUrl } from './security/no-user-input-in-fetch-url.js';\nimport { clientOnlyForBrowserApis } from './hydration/clientOnly-for-browser-apis.js';\nimport { noDocumentInSetup } from './hydration/no-document-in-setup.js';\nimport { createErrorOnFailure } from './server-routes/createError-on-failure.js';\nimport { defineEventHandlerTyped } from './server-routes/defineEventHandler-typed.js';\nimport { validateBodyWithH3V2 } from './server-routes/validate-body-with-h3-v2.js';\n\nfunction coreRule(\n id: string,\n category: CoreRule['category'],\n severity: CoreRule['severity'],\n recommended: boolean,\n rule: Omit<CoreRule, 'id' | 'category' | 'severity' | 'recommended'>,\n): CoreRule {\n return { id, category, severity, recommended, ...rule };\n}\n\nexport const NUXT_RULES: readonly CoreRule[] = [\n coreRule(\n 'ai-slop/no-process-client-server',\n 'ai-slop',\n 'error',\n true,\n defineRule(noProcessClientServer),\n ),\n coreRule(\n 'ai-slop/no-explicit-imports-of-auto-imported',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noExplicitImportsOfAutoImported),\n ),\n coreRule(\n 'ai-slop/no-useState-for-server-data',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noUseStateForServerData),\n ),\n coreRule(\n 'ai-slop/no-fetch-in-setup',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noFetchInSetup),\n ),\n coreRule(\n 'data-fetching/useAsyncData-key-required-in-loop',\n 'data-fetching',\n 'error',\n true,\n defineRule(useAsyncDataKeyRequiredInLoop),\n ),\n coreRule(\n 'server-routes/defineEventHandler-typed',\n 'server-routes',\n 'warn',\n true,\n defineRule(defineEventHandlerTyped),\n ),\n coreRule(\n 'server-routes/validate-body-with-h3-v2',\n 'server-routes',\n 'warn',\n true,\n defineRule(validateBodyWithH3V2),\n ),\n coreRule(\n 'server-routes/createError-on-failure',\n 'server-routes',\n 'warn',\n true,\n defineRule(createErrorOnFailure),\n ),\n coreRule(\n 'hydration/no-document-in-setup',\n 'hydration',\n 'error',\n true,\n defineRule(noDocumentInSetup),\n ),\n coreRule(\n 'hydration/clientOnly-for-browser-apis',\n 'hydration',\n 'error',\n true,\n defineRule(clientOnlyForBrowserApis),\n ),\n coreRule(\n 'security/no-user-input-in-fetch-url',\n 'security',\n 'warn',\n true,\n defineRule(noUserInputInFetchUrl),\n ),\n];\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/components/props.html#reactive-props-destructure';\nconst MESSAGE = `Destructuring props loses reactivity. Wrap with toRefs(...) to keep refs. See ${DOCS_URL}`;\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isDefinePropsCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n if (name === 'defineProps') return true;\n if (name === 'withDefaults') {\n const args = node.arguments as AstNode[] | undefined;\n return isDefinePropsCall(args?.[0]);\n }\n return false;\n}\n\nfunction isToRefsCall(node: AstNode | undefined): boolean {\n return node?.type === 'CallExpression' && calleeName(node) === 'toRefs';\n}\n\nexport const noDestructurePropsWithoutToRefs = defineRule({\n create(context: RuleContext) {\n const propsSources = new Set<string>();\n\n function registerSetupParam(fn: AstNode | undefined): void {\n const params = fn?.params as AstNode[] | undefined;\n const first = params?.[0];\n if (first?.type === 'Identifier') propsSources.add(first.name as string);\n }\n\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n const init = node.init as AstNode | undefined;\n if (id.type === 'Identifier' && isDefinePropsCall(init)) {\n propsSources.add(id.name as string);\n return;\n }\n if (id.type !== 'ObjectPattern' || !init) return;\n if (isToRefsCall(init)) return;\n const fromProps =\n isDefinePropsCall(init) ||\n (init.type === 'Identifier' && propsSources.has(init.name as string));\n if (fromProps) context.report({ node, message: MESSAGE });\n },\n Property(node: AstNode) {\n const key = node.key as AstNode | undefined;\n if (key?.type === 'Identifier' && key.name === 'setup') {\n registerSetupParam(node.value as AstNode);\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/essentials/reactivity-fundamentals.html#destructuring-reactive-state';\nconst MESSAGE = `Destructuring reactive state loses reactivity. Wrap with toRefs(...) or read single keys via toRef(state, 'key'). See ${DOCS_URL}`;\n\nconst REACTIVE_FACTORIES = new Set(['reactive', 'shallowReactive']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isReactiveCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n if (name && REACTIVE_FACTORIES.has(name)) return true;\n if (name === 'readonly') {\n const args = node.arguments as AstNode[] | undefined;\n return isReactiveCall(args?.[0]);\n }\n return false;\n}\n\nfunction isToRefsCall(node: AstNode | undefined): boolean {\n return node?.type === 'CallExpression' && calleeName(node) === 'toRefs';\n}\n\nexport const noDestructureReactiveWithoutToRefs = defineRule({\n create(context: RuleContext) {\n const reactiveSources = new Set<string>();\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n const init = node.init as AstNode | undefined;\n if (id.type === 'Identifier' && isReactiveCall(init)) {\n reactiveSources.add(id.name as string);\n return;\n }\n if (id.type !== 'ObjectPattern' || !init) return;\n if (isToRefsCall(init)) return;\n const fromReactive =\n isReactiveCall(init) ||\n (init.type === 'Identifier' &&\n reactiveSources.has(init.name as string));\n if (fromReactive) context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst EM_DASH = '\\u2014';\n\ninterface LiteralNode extends AstNode {\n type: 'Literal';\n value: unknown;\n}\n\nexport const noEmDashInString = defineRule({\n create(context: RuleContext) {\n return {\n Literal(node: AstNode) {\n const literal = node as LiteralNode;\n if (typeof literal.value !== 'string') return;\n if (!literal.value.includes(EM_DASH)) return;\n context.report({\n node,\n message:\n 'Em dash in string literal reads as AI-generated output; use comma, colon, or parentheses.',\n });\n },\n };\n },\n fix(node: AstNode) {\n const literal = node as LiteralNode;\n if (typeof literal.value !== 'string') return null;\n const raw = literal.raw;\n if (typeof raw !== 'string') return null;\n if (!raw.includes(EM_DASH)) return null;\n return raw.split(EM_DASH).join('-');\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\nimport { VUE_AUTO_IMPORTED } from '../../../shared/auto-imported-symbols.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/concepts/auto-imports';\nconst WHOLE_MESSAGE = `The entire import from 'vue' can be removed — these names are auto-imported in this project. See ${DOCS_URL}`;\nconst SPECIFIER_MESSAGE = `This symbol is auto-imported in your project. Remove it from the 'vue' import — it is dead weight in the diff. See ${DOCS_URL}`;\n\nfunction isAutoImportedValueSpecifier(spec: AstNode): boolean {\n if (spec.importKind === 'type') return false;\n const imported = spec.imported as AstNode;\n return VUE_AUTO_IMPORTED.has(imported.name as string);\n}\n\nexport const noImportsFromVueWhenAutoImported = defineRule({\n create(context: RuleContext) {\n let gated = false;\n return {\n Program() {\n gated = context.capabilities?.has('auto-imports:vue') !== true;\n },\n ImportDeclaration(node: AstNode) {\n if (gated) return;\n if (node.importKind === 'type') return;\n const source = node.source as AstNode;\n if (source.value !== 'vue') return;\n const specifiers = node.specifiers as AstNode[];\n const named = specifiers.filter((s) => s.type === 'ImportSpecifier');\n if (named.length === 0) return;\n const offending = named.filter(isAutoImportedValueSpecifier);\n if (offending.length === 0) return;\n if (\n offending.length === named.length &&\n specifiers.length === named.length\n ) {\n context.report({ node, message: WHOLE_MESSAGE });\n return;\n }\n for (const spec of offending) {\n context.report({ node: spec, message: SPECIFIER_MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/typescript/composition-api.html#typing-ref';\nconst MESSAGE = `Non-null assertion on a ref's .value hides nullability. Add an explicit guard ('if (!r.value) return') or use optional chaining ('r.value?.x'). See ${DOCS_URL}`;\n\nconst REF_FACTORIES = new Set([\n 'ref',\n 'shallowRef',\n 'customRef',\n 'computed',\n 'useTemplateRef',\n]);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isRefFactoryCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n return name !== undefined && REF_FACTORIES.has(name);\n}\n\nfunction isDotValue(node: AstNode | undefined): node is AstNode {\n if (!node || node.type !== 'MemberExpression') return false;\n const property = node.property as AstNode | undefined;\n return (\n node.computed !== true &&\n property?.type === 'Identifier' &&\n property.name === 'value'\n );\n}\n\nexport const noNonNullAssertionOnRefValue = defineRule({\n create(context: RuleContext) {\n const refSources = new Set<string>();\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n if (\n id.type === 'Identifier' &&\n isRefFactoryCall(node.init as AstNode)\n ) {\n refSources.add(id.name as string);\n }\n },\n TSNonNullExpression(node: AstNode) {\n const arg = node.expression as AstNode | undefined;\n if (!isDotValue(arg)) return;\n const object = arg.object as AstNode | undefined;\n if (object?.type !== 'Identifier') return;\n if (!refSources.has(object.name as string)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/typescript/composition-api.html#typing-component-props';\nconst MESSAGE = `This defineProps() call declares props with a runtime object, which discards static type information. Use the type-only generic form (defineProps<{ ... }>()) so props are fully typed. See ${DOCS_URL}`;\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nexport const definePropsTyped = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n if (calleeName(node) !== 'defineProps') return;\n const firstArg = (node.arguments as AstNode[])[0];\n if (firstArg?.type === 'ObjectExpression') {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/api/sfc-script-setup.html';\nconst MESSAGE = `This component nests composition-API logic inside an options-object setup(). Use a <script setup> block instead — it removes the setup() boilerplate and exposes bindings to the template directly. See ${DOCS_URL}`;\n\nfunction isFunctionValue(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nfunction isSetupProperty(prop: AstNode): boolean {\n if (prop.type !== 'Property' || prop.computed === true) return false;\n if (prop.shorthand === true) return false;\n const key = prop.key as AstNode;\n if (key.type !== 'Identifier' || key.name !== 'setup') return false;\n return isFunctionValue(prop.value as AstNode | undefined);\n}\n\nexport const preferScriptSetupForNewFiles = defineRule({\n create(context: RuleContext) {\n return {\n ExportDefaultDeclaration(node: AstNode) {\n const declaration = node.declaration as AstNode | undefined;\n if (declaration?.type !== 'ObjectExpression') return;\n const properties = declaration.properties as AstNode[];\n if (properties.some(isSetupProperty)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/guide/components/async.html';\nconst MESSAGE = `This route record's \\`component:\\` field references the imported component directly, which forces a synchronous import of the route bundle. Use \\`() => import('./Foo.vue')\\` or \\`defineAsyncComponent(() => import('./Foo.vue'))\\` to lazy-load the route. See ${DOCS_URL}`;\n\nfunction keyName(key: AstNode): unknown {\n return key.type === 'Identifier' ? key.name : key.value;\n}\n\nexport const preferDefineAsyncComponentOnRoute = defineRule({\n create(context: RuleContext) {\n return {\n Property(node: AstNode) {\n if (node.computed === true || node.shorthand === true) return;\n if (keyName(node.key as AstNode) !== 'component') return;\n const value = node.value as AstNode;\n if (value.type === 'Identifier') {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/components/provide-inject.html#working-with-reactivity';\nconst MESSAGE = `Mutating an injected value from a consumer breaks one-way data flow and makes the source of changes hard to trace. Wrap the provided value in readonly() at the provide site and expose a dedicated mutator instead. See ${DOCS_URL}`;\n\nconst MUTATING_METHODS = new Set([\n 'push',\n 'pop',\n 'splice',\n 'shift',\n 'unshift',\n 'sort',\n 'reverse',\n]);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction memberObjectName(node: AstNode | undefined): string | undefined {\n if (!node || node.type !== 'MemberExpression') return undefined;\n const object = node.object as AstNode;\n if (object.type !== 'Identifier') return undefined;\n return object.name as string;\n}\n\nexport const preferReadonlyForInjected = defineRule({\n create(context: RuleContext) {\n const injectedSources = new Set<string>();\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n const init = node.init as AstNode | undefined;\n if (\n id.type === 'Identifier' &&\n init?.type === 'CallExpression' &&\n calleeName(init) === 'inject'\n ) {\n injectedSources.add(id.name as string);\n }\n },\n AssignmentExpression(node: AstNode) {\n const name = memberObjectName(node.left as AstNode);\n if (name !== undefined && injectedSources.has(name)) {\n context.report({ node, message: MESSAGE });\n }\n },\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'MemberExpression' || callee.computed === true) {\n return;\n }\n const name = memberObjectName(callee);\n if (name === undefined || !injectedSources.has(name)) return;\n const property = callee.property as AstNode;\n if (MUTATING_METHODS.has(property.name as string)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/api/reactivity-advanced.html#shallowref';\nconst MESSAGE = `This ref holds large or fetched data, so deep reactivity tracks every nested property and wastes memory and CPU. Use shallowRef() (and triggerRef on replacement) for large arrays, big objects, or server payloads. See ${DOCS_URL}`;\n\nconst ARRAY_LIMIT = 100;\nconst OBJECT_LIMIT = 50;\nconst FETCH_IDENTIFIERS = new Set(['$fetch', 'useFetch']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isAxiosGet(node: AstNode): boolean {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'MemberExpression' || callee.computed === true) {\n return false;\n }\n const object = callee.object as AstNode;\n const property = callee.property as AstNode;\n return (\n object.type === 'Identifier' &&\n object.name === 'axios' &&\n property.name === 'get'\n );\n}\n\nfunction isFetchSource(node: AstNode): boolean {\n if (node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n if (name !== undefined && FETCH_IDENTIFIERS.has(name)) return true;\n return isAxiosGet(node);\n}\n\nfunction isLargeData(node: AstNode | undefined): boolean {\n if (!node) return false;\n const value =\n node.type === 'AwaitExpression' ? (node.argument as AstNode) : node;\n if (value.type === 'ArrayExpression') {\n return (value.elements as AstNode[]).length > ARRAY_LIMIT;\n }\n if (value.type === 'ObjectExpression') {\n return (value.properties as AstNode[]).length > OBJECT_LIMIT;\n }\n return isFetchSource(value);\n}\n\nexport const preferShallowRefForLargeData = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n if (calleeName(node) !== 'ref') return;\n const init = (node.arguments as AstNode[])[0];\n if (isLargeData(init)) context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/essentials/watchers.html#side-effect-cleanup';\nconst MESSAGE = `This watcher registers a listener, timer, or observer but never cleans it up, so it leaks across re-runs and hot reloads. Return a cleanup function (or call onWatcherCleanup) inside the watcher. See ${DOCS_URL}`;\n\nconst REGISTER_CALLS = new Set([\n 'addEventListener',\n 'setInterval',\n 'setTimeout',\n]);\nconst OBSERVERS = new Set([\n 'IntersectionObserver',\n 'MutationObserver',\n 'ResizeObserver',\n]);\nconst CLEANUP_CALLS = new Set(['onCleanup', 'onWatcherCleanup']);\n\ninterface WatchFrame {\n sourceCall: AstNode;\n isEffect: boolean;\n hasRegistration: boolean;\n hasCleanup: boolean;\n}\n\nfunction calleeIdentifierName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction calledMethodName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n if (callee?.type === 'MemberExpression' && callee.computed !== true) {\n const property = callee.property as AstNode;\n return property.name as string;\n }\n return undefined;\n}\n\nfunction isFunction(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nexport const watchWithoutCleanup = defineRule({\n create(context: RuleContext) {\n const watchStack: WatchFrame[] = [];\n\n return {\n CallExpression(node: AstNode) {\n const name = calleeIdentifierName(node);\n if (name === 'watch' || name === 'watchEffect') {\n const isEffect = name === 'watchEffect';\n const args = node.arguments as AstNode[];\n const callback = args[isEffect ? 0 : 1];\n if (!isFunction(callback)) return;\n watchStack.push({\n sourceCall: node,\n isEffect,\n hasRegistration: false,\n hasCleanup: false,\n });\n return;\n }\n if (watchStack.length === 0) return;\n const top = watchStack[watchStack.length - 1]!;\n const method = calledMethodName(node);\n if (method !== undefined && REGISTER_CALLS.has(method)) {\n top.hasRegistration = true;\n }\n if (method !== undefined && CLEANUP_CALLS.has(method) && top.isEffect) {\n top.hasCleanup = true;\n }\n },\n NewExpression(node: AstNode) {\n if (watchStack.length === 0) return;\n const callee = node.callee as AstNode | undefined;\n if (\n callee?.type === 'Identifier' &&\n OBSERVERS.has(callee.name as string)\n ) {\n watchStack[watchStack.length - 1]!.hasRegistration = true;\n }\n },\n ReturnStatement(node: AstNode) {\n if (watchStack.length === 0) return;\n if (isFunction(node.argument as AstNode | undefined)) {\n watchStack[watchStack.length - 1]!.hasCleanup = true;\n }\n },\n 'CallExpression:exit'(node: AstNode) {\n if (watchStack.length === 0) return;\n const top = watchStack[watchStack.length - 1]!;\n if (top.sourceCall !== node) return;\n watchStack.pop();\n if (top.hasRegistration && !top.hasCleanup) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#local-storage';\nconst MESSAGE = `Persisting auth tokens/secrets in localStorage or sessionStorage exposes them to any XSS payload. Store them in an HttpOnly, Secure, SameSite cookie set by the server instead. See ${DOCS_URL}`;\n\nconst STORAGES = new Set(['localStorage', 'sessionStorage']);\nconst SENSITIVE_KEY =\n /token|jwt|secret|password|passwd|credential|api[-_]?key|bearer|private[-_]?key|auth/i;\n\nfunction stringValue(node: AstNode | undefined): string | undefined {\n if (node?.type === 'Literal' && typeof node.value === 'string') {\n return node.value;\n }\n return undefined;\n}\n\nfunction isStorageObject(node: AstNode | undefined): boolean {\n return node?.type === 'Identifier' && STORAGES.has(node.name as string);\n}\n\nfunction memberKey(node: AstNode): string | undefined {\n const property = node.property as AstNode;\n if (node.computed === true) return stringValue(property);\n return property.name as string;\n}\n\nexport const noAuthTokenInWebStorage = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode;\n if (callee.type !== 'MemberExpression') return;\n if (callee.computed === true) return;\n if (!isStorageObject(callee.object as AstNode | undefined)) return;\n const method = callee.property as AstNode;\n if (method.name !== 'setItem') return;\n const key = stringValue((node.arguments as AstNode[])[0]);\n if (key !== undefined && SENSITIVE_KEY.test(key)) {\n context.report({ node, message: MESSAGE });\n }\n },\n AssignmentExpression(node: AstNode) {\n const left = node.left as AstNode;\n if (left.type !== 'MemberExpression') return;\n if (!isStorageObject(left.object as AstNode | undefined)) return;\n const key = memberKey(left);\n if (key !== undefined && SENSITIVE_KEY.test(key)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_eval!';\nconst MESSAGE = `eval, new Function, and string-argument setTimeout/setInterval execute arbitrary code and are XSS/RCE vectors. Replace with explicit logic or JSON.parse for data. See ${DOCS_URL}`;\n\nconst STRING_TIMER_CALLEES = new Set(['setTimeout', 'setInterval']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isStringArg(node: AstNode | undefined): boolean {\n if (!node) return false;\n if (node.type === 'Literal') return typeof node.value === 'string';\n return node.type === 'TemplateLiteral';\n}\n\nexport const noEvalLike = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const name = calleeName(node);\n if (name === undefined) return;\n if (name === 'eval') {\n context.report({ node, message: MESSAGE });\n return;\n }\n if (STRING_TIMER_CALLEES.has(name)) {\n const args = node.arguments as AstNode[] | undefined;\n if (isStringArg(args?.[0])) {\n context.report({ node, message: MESSAGE });\n }\n }\n },\n NewExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier' && callee.name === 'Function') {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#security_considerations';\nconst MESSAGE = `Assigning to innerHTML/outerHTML injects unsanitized markup and is a DOM-based XSS sink. Use textContent for text, or sanitize with DOMPurify before assigning. See ${DOCS_URL}`;\n\nconst HTML_SINKS = new Set(['innerHTML', 'outerHTML']);\n\nfunction isHtmlSinkTarget(node: AstNode): boolean {\n if (node.type !== 'MemberExpression') return false;\n if (node.computed === true) return false;\n const property = node.property as AstNode;\n return (\n property.type === 'Identifier' && HTML_SINKS.has(property.name as string)\n );\n}\n\nexport const noInnerHtml = defineRule({\n create(context: RuleContext) {\n return {\n AssignmentExpression(node: AstNode) {\n if (!isHtmlSinkTarget(node.left as AstNode)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html';\nconst MESSAGE = `Hardcoded secret in source. Committed secrets leak in the client bundle and git history. Move it to an environment variable or a server-only runtime config. See ${DOCS_URL}`;\n\n// High-signal secret token shapes. Conservative on purpose: each pattern is a\n// well-known credential prefix/format, not a generic \"looks long\" heuristic.\nconst SECRET_VALUE_PATTERNS: readonly RegExp[] = [\n /\\bsk-[A-Za-z0-9-]{10,}\\b/,\n /\\bghp_[A-Za-z0-9]{20,}\\b/,\n /\\bgithub_pat_[A-Za-z0-9_]{20,}\\b/,\n /\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b/,\n /\\bAKIA[0-9A-Z]{16}\\b/,\n /\\bAIza[0-9A-Za-z_-]{20,}\\b/,\n];\n\n// Identifier names that strongly imply a secret. Paired with a long string\n// literal value to avoid flagging env reads or short non-secret strings.\nconst SECRET_NAME =\n /^(api[-_]?secret|api[-_]?key|secret[-_]?key|private[-_]?key|access[-_]?token|auth[-_]?token|client[-_]?secret|password|passwd|jwt[-_]?secret)$/i;\nconst MIN_NAMED_SECRET_LENGTH = 8;\n\nfunction stringValue(node: AstNode | undefined): string | undefined {\n if (node?.type === 'Literal' && typeof node.value === 'string') {\n return node.value;\n }\n return undefined;\n}\n\nfunction isHighSignalSecret(value: string): boolean {\n return SECRET_VALUE_PATTERNS.some((pattern) => pattern.test(value));\n}\n\nexport const noSecretsInSource = defineRule({\n create(context: RuleContext) {\n const reported = new Set<AstNode>();\n\n function report(node: AstNode): void {\n if (reported.has(node)) return;\n reported.add(node);\n context.report({ node, message: MESSAGE });\n }\n\n function checkNamedAssignment(\n name: string | undefined,\n valueNode: AstNode | undefined,\n ): void {\n if (name === undefined || !SECRET_NAME.test(name)) return;\n if (!valueNode) return;\n const value = stringValue(valueNode);\n if (value === undefined || value.length < MIN_NAMED_SECRET_LENGTH) return;\n report(valueNode);\n }\n\n return {\n Literal(node: AstNode) {\n if (typeof node.value !== 'string') return;\n if (isHighSignalSecret(node.value)) report(node);\n },\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n if (id.type !== 'Identifier') return;\n checkNamedAssignment(\n id.name as string,\n node.init as AstNode | undefined,\n );\n },\n Property(node: AstNode) {\n const key = node.key as AstNode;\n const name =\n key.type === 'Identifier' ? (key.name as string) : stringValue(key);\n checkNamedAssignment(name, node.value as AstNode | undefined);\n },\n };\n },\n});\n","import { defineRule } from '../../define-rule.js';\nimport type { CoreRule } from '../../types.js';\nimport { noDestructurePropsWithoutToRefs } from './ai-slop/no-destructure-props-without-toRefs.js';\nimport { noDestructureReactiveWithoutToRefs } from './ai-slop/no-destructure-reactive-without-toRefs.js';\nimport { noEmDashInString } from './ai-slop/no-em-dash-in-string.js';\nimport { noImportsFromVueWhenAutoImported } from './ai-slop/no-imports-from-vue-when-auto-imported.js';\nimport { noNonNullAssertionOnRefValue } from './ai-slop/no-non-null-assertion-on-ref-value.js';\nimport { definePropsTyped } from './composition/defineProps-typed.js';\nimport { preferScriptSetupForNewFiles } from './composition/prefer-script-setup-for-new-files.js';\nimport { preferDefineAsyncComponentOnRoute } from './performance/prefer-defineAsyncComponent-on-route.js';\nimport { preferReadonlyForInjected } from './reactivity/prefer-readonly-for-injected.js';\nimport { preferShallowRefForLargeData } from './reactivity/prefer-shallowRef-for-large-data.js';\nimport { watchWithoutCleanup } from './reactivity/watch-without-cleanup.js';\nimport { noAuthTokenInWebStorage } from './security/no-auth-token-in-web-storage.js';\nimport { noEvalLike } from './security/no-eval-like.js';\nimport { noInnerHtml } from './security/no-inner-html.js';\nimport { noSecretsInSource } from './security/no-secrets-in-source.js';\n\nfunction coreRule(\n id: string,\n category: CoreRule['category'],\n severity: CoreRule['severity'],\n recommended: boolean,\n rule: Omit<CoreRule, 'id' | 'category' | 'severity' | 'recommended'>,\n): CoreRule {\n return { id, category, severity, recommended, ...rule };\n}\n\nexport const VUE_RULES: readonly CoreRule[] = [\n coreRule(\n 'no-em-dash-in-string',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noEmDashInString),\n ),\n coreRule(\n 'no-destructure-props-without-to-refs',\n 'ai-slop',\n 'error',\n true,\n defineRule(noDestructurePropsWithoutToRefs),\n ),\n coreRule(\n 'no-destructure-reactive-without-to-refs',\n 'ai-slop',\n 'error',\n true,\n defineRule(noDestructureReactiveWithoutToRefs),\n ),\n coreRule(\n 'no-non-null-assertion-on-ref-value',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noNonNullAssertionOnRefValue),\n ),\n coreRule(\n 'no-imports-from-vue-when-auto-imported',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noImportsFromVueWhenAutoImported),\n ),\n coreRule(\n 'reactivity/watch-without-cleanup',\n 'reactivity',\n 'warn',\n true,\n defineRule(watchWithoutCleanup),\n ),\n coreRule(\n 'reactivity/prefer-shallowRef-for-large-data',\n 'reactivity',\n 'info',\n false,\n defineRule(preferShallowRefForLargeData),\n ),\n coreRule(\n 'reactivity/prefer-readonly-for-injected',\n 'reactivity',\n 'info',\n false,\n defineRule(preferReadonlyForInjected),\n ),\n coreRule(\n 'composition/prefer-script-setup-for-new-files',\n 'composition',\n 'warn',\n true,\n defineRule(preferScriptSetupForNewFiles),\n ),\n coreRule(\n 'composition/defineProps-typed',\n 'composition',\n 'warn',\n true,\n defineRule(definePropsTyped),\n ),\n coreRule(\n 'performance/prefer-defineAsyncComponent-on-route',\n 'performance',\n 'info',\n false,\n defineRule(preferDefineAsyncComponentOnRoute),\n ),\n coreRule(\n 'security/no-inner-html',\n 'security',\n 'error',\n true,\n defineRule(noInnerHtml),\n ),\n coreRule(\n 'security/no-eval-like',\n 'security',\n 'error',\n true,\n defineRule(noEvalLike),\n ),\n coreRule(\n 'security/no-auth-token-in-web-storage',\n 'security',\n 'warn',\n true,\n defineRule(noAuthTokenInWebStorage),\n ),\n coreRule(\n 'security/no-secrets-in-source',\n 'security',\n 'warn',\n true,\n defineRule(noSecretsInSource),\n ),\n];\n"],"mappings":";AAEA,SAAgB,WAA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AChB,MAAM,QAAQ,YAAY,SAAS;EACnC,IAAI,UAAU,KAAA,KAAa,MAAM,SAAS,yBAAyB;EACnE,OAAO,SAAS;CAClB;CAEA,OAAO;EACL,QAAQ,MAAe;GACrB,IAAI,OAAO,KAAK,UAAU,UAAU;GACpC,IAAI,mBAAmB,KAAK,KAAK,GAAG,OAAO,IAAI;EACjD;EACA,mBAAmB,MAAe;GAChC,MAAM,KAAK,KAAK;GAChB,IAAI,GAAG,SAAS,cAAc;GAC9B,qBACE,GAAG,MACH,KAAK,IACP;EACF;EACA,SAAS,MAAe;GACtB,MAAM,MAAM,KAAK;GAGjB,qBADE,IAAI,SAAS,eAAgB,IAAI,OAAkB,YAAY,GAAG,GACzC,KAAK,KAA4B;EAC9D;CACF;AACF,EACF,CAAC;;;AC3DD,SAAS,SACP,IACA,UACA,UACA,aACA,MACU;CACV,OAAO;EAAE;EAAI;EAAU;EAAU;EAAa,GAAG;CAAK;AACxD;AAEA,MAAa,YAAiC;CAC5C,SACE,wBACA,WACA,QACA,MACA,WAAW,gBAAgB,CAC7B;CACA,SACE,wCACA,WACA,SACA,MACA,WAAW,+BAA+B,CAC5C;CACA,SACE,2CACA,WACA,SACA,MACA,WAAW,kCAAkC,CAC/C;CACA,SACE,sCACA,WACA,QACA,MACA,WAAW,4BAA4B,CACzC;CACA,SACE,0CACA,WACA,QACA,MACA,WAAW,gCAAgC,CAC7C;CACA,SACE,oCACA,cACA,QACA,MACA,WAAW,mBAAmB,CAChC;CACA,SACE,+CACA,cACA,QACA,OACA,WAAW,4BAA4B,CACzC;CACA,SACE,2CACA,cACA,QACA,OACA,WAAW,yBAAyB,CACtC;CACA,SACE,iDACA,eACA,QACA,MACA,WAAW,4BAA4B,CACzC;CACA,SACE,iCACA,eACA,QACA,MACA,WAAW,gBAAgB,CAC7B;CACA,SACE,oDACA,eACA,QACA,OACA,WAAW,iCAAiC,CAC9C;CACA,SACE,0BACA,YACA,SACA,MACA,WAAW,WAAW,CACxB;CACA,SACE,yBACA,YACA,SACA,MACA,WAAW,UAAU,CACvB;CACA,SACE,yCACA,YACA,QACA,MACA,WAAW,uBAAuB,CACpC;CACA,SACE,iCACA,YACA,QACA,MACA,WAAW,iBAAiB,CAC9B;AACF"}
1
+ {"version":3,"file":"index.js","names":["DOCS_URL","WHOLE_MESSAGE","SPECIFIER_MESSAGE","isAutoImportedValueSpecifier","MESSAGE","MESSAGE","MESSAGE","MESSAGE","MESSAGE","calleeName","MESSAGE","MESSAGE","MESSAGE","MESSAGE","isFunction","MESSAGE","coreRule","MESSAGE","calleeName","isToRefsCall","MESSAGE","calleeName","MESSAGE","calleeName","MESSAGE","calleeName","MESSAGE","MESSAGE","MESSAGE","MESSAGE","MESSAGE","MESSAGE","MESSAGE","isFunction","MESSAGE","calleeName","MESSAGE","calleeName","MESSAGE","MESSAGE","stringValue","MESSAGE","MESSAGE"],"sources":["../src/define-rule.ts","../src/shared/auto-imported-symbols.ts","../src/rules/nuxt/ai-slop/no-explicit-imports-of-auto-imported.ts","../src/rules/nuxt/ai-slop/no-fetch-in-setup.ts","../src/rules/nuxt/ai-slop/no-process-client-server.ts","../src/rules/nuxt/ai-slop/no-useState-for-server-data.ts","../src/rules/nuxt/data-fetching/useAsyncData-key-required-in-loop.ts","../src/rules/nuxt/security/no-user-input-in-fetch-url.ts","../src/rules/nuxt/hydration/clientOnly-for-browser-apis.ts","../src/rules/nuxt/hydration/no-document-in-setup.ts","../src/rules/nuxt/server-routes/createError-on-failure.ts","../src/rules/nuxt/server-routes/defineEventHandler-typed.ts","../src/rules/nuxt/server-routes/validate-body-with-h3-v2.ts","../src/rules/nuxt/index.ts","../src/rules/vue/ai-slop/no-destructure-props-without-toRefs.ts","../src/rules/vue/ai-slop/no-destructure-reactive-without-toRefs.ts","../src/rules/vue/ai-slop/no-em-dash-in-string.ts","../src/rules/vue/ai-slop/no-imports-from-vue-when-auto-imported.ts","../src/rules/vue/ai-slop/no-non-null-assertion-on-ref-value.ts","../src/rules/vue/composition/defineProps-typed.ts","../src/rules/vue/composition/no-pinia-store-in-setup.ts","../src/rules/vue/composition/prefer-script-setup-for-new-files.ts","../src/rules/vue/performance/prefer-defineAsyncComponent-on-route.ts","../src/rules/vue/performance/prefer-module-scope-pure-function.ts","../src/rules/vue/performance/prefer-module-scope-static-value.ts","../src/rules/vue/performance/prefer-stable-empty-fallback.ts","../src/rules/vue/reactivity/no-fresh-deps-in-watch.ts","../src/rules/vue/reactivity/prefer-readonly-for-injected.ts","../src/rules/vue/reactivity/prefer-shallowRef-for-large-data.ts","../src/rules/vue/reactivity/watch-without-cleanup.ts","../src/rules/vue/security/no-auth-token-in-web-storage.ts","../src/rules/vue/security/no-eval-like.ts","../src/rules/vue/security/no-inner-html.ts","../src/rules/vue/security/no-secrets-in-source.ts","../src/rules/vue/index.ts"],"sourcesContent":["import type { Rule, RuleContext } from './types.js';\n\nexport function defineRule(rule: Rule): Rule {\n const userFix = rule.fix;\n if (!userFix) return rule;\n return {\n ...rule,\n meta: { ...rule.meta, fixable: 'code' },\n create(context: RuleContext) {\n const wrapped: RuleContext = {\n ...context,\n report(descriptor) {\n const replacement = userFix(descriptor.node);\n if (replacement === null) {\n context.report(descriptor);\n return;\n }\n context.report({\n ...descriptor,\n fix: (fixer) => fixer.replaceText(descriptor.node, replacement),\n });\n },\n };\n return rule.create(wrapped);\n },\n };\n}\n","export const VUE_AUTO_IMPORTED: ReadonlySet<string> = new Set([\n 'ref',\n 'shallowRef',\n 'computed',\n 'reactive',\n 'shallowReactive',\n 'readonly',\n 'shallowReadonly',\n 'toRef',\n 'toRefs',\n 'isRef',\n 'isReactive',\n 'isReadonly',\n 'isProxy',\n 'unref',\n 'triggerRef',\n 'customRef',\n 'markRaw',\n 'toRaw',\n 'watch',\n 'watchEffect',\n 'watchPostEffect',\n 'watchSyncEffect',\n 'effectScope',\n 'getCurrentScope',\n 'onScopeDispose',\n 'onMounted',\n 'onUpdated',\n 'onUnmounted',\n 'onBeforeMount',\n 'onBeforeUpdate',\n 'onBeforeUnmount',\n 'onErrorCaptured',\n 'onRenderTracked',\n 'onRenderTriggered',\n 'onActivated',\n 'onDeactivated',\n 'onServerPrefetch',\n 'provide',\n 'inject',\n 'hasInjectionContext',\n 'getCurrentInstance',\n 'nextTick',\n 'defineComponent',\n 'defineAsyncComponent',\n 'useTemplateRef',\n 'useId',\n 'useModel',\n]);\n\nexport const NUXT_AUTO_IMPORTED: ReadonlySet<string> = new Set([\n ...VUE_AUTO_IMPORTED,\n 'useRoute',\n 'useRouter',\n 'useFetch',\n 'useAsyncData',\n 'useState',\n 'useRuntimeConfig',\n 'useNuxtApp',\n 'navigateTo',\n 'definePageMeta',\n 'useSeoMeta',\n 'useHead',\n]);\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\nimport { NUXT_AUTO_IMPORTED } from '../../../shared/auto-imported-symbols.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/concepts/auto-imports';\nconst WHOLE_MESSAGE = `These symbols are auto-imported in Nuxt projects. Remove the import entirely. See ${DOCS_URL}`;\nconst SPECIFIER_MESSAGE = `This symbol is auto-imported in Nuxt projects. Remove it from the import — it is dead weight. See ${DOCS_URL}`;\n\nconst AUTO_IMPORT_SOURCES = new Set(['vue', '#imports', 'vue-router', '#app']);\n\nfunction isAutoImportedValueSpecifier(spec: AstNode): boolean {\n if (spec.importKind === 'type') return false;\n const imported = spec.imported as AstNode;\n return NUXT_AUTO_IMPORTED.has(imported.name as string);\n}\n\nexport const noExplicitImportsOfAutoImported = defineRule({\n create(context: RuleContext) {\n return {\n ImportDeclaration(node: AstNode) {\n if (node.importKind === 'type') return;\n const source = node.source as AstNode;\n if (!AUTO_IMPORT_SOURCES.has(source.value as string)) return;\n const specifiers = node.specifiers as AstNode[];\n const named = specifiers.filter((s) => s.type === 'ImportSpecifier');\n if (named.length === 0) return;\n const offending = named.filter(isAutoImportedValueSpecifier);\n if (offending.length === 0) return;\n if (\n offending.length === named.length &&\n specifiers.length === named.length\n ) {\n context.report({ node, message: WHOLE_MESSAGE });\n return;\n }\n for (const spec of offending) {\n context.report({ node: spec, message: SPECIFIER_MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `Bare $fetch/fetch at the top level of <script setup> runs on both server and client without SSR deduplication. Use useFetch for automatic request deduplication and SSR hydration. See ${DOCS_URL}`;\n\nfunction isFetchCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') {\n const name = callee.name as string;\n return name === '$fetch' || name === 'fetch';\n }\n return false;\n}\n\nexport const noFetchInSetup = defineRule({\n create(context: RuleContext) {\n const functionDepthStack: number[] = [];\n\n return {\n ArrowFunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'ArrowFunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionDeclaration() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionDeclaration:exit'() {\n functionDepthStack.pop();\n },\n CallExpression(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (!isFetchCall(node)) return;\n const parent = (node as Record<string, unknown>)['parent'] as\n | AstNode\n | undefined;\n if (parent?.type === 'AwaitExpression') return;\n context.report({ node, message: MESSAGE });\n },\n AwaitExpression(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (!isFetchCall(node.argument as AstNode | undefined)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst LEGACY_PROPS = new Set(['client', 'server', 'browser']);\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/concepts/auto-imports';\nconst MESSAGE = `Use import.meta.client / import.meta.server / import.meta.browser instead of process.client / process.server / process.browser (Nuxt 4). See ${DOCS_URL}`;\n\nexport const noProcessClientServer = defineRule({\n create(context: RuleContext) {\n return {\n MemberExpression(node: AstNode) {\n const object = node.object as AstNode | undefined;\n if (object?.type !== 'Identifier') return;\n if ((object as AstNode & { name: string }).name !== 'process') return;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return;\n if (!LEGACY_PROPS.has(property.name as string)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n fix(node: AstNode) {\n const object = node.object as AstNode | undefined;\n if (object?.type !== 'Identifier') return null;\n if ((object as AstNode & { name: string }).name !== 'process') return null;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return null;\n const name = property.name as string;\n if (!LEGACY_PROPS.has(name)) return null;\n return `import.meta.${name}`;\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `useState with a fetch/await initializer suggests useFetch or useAsyncData for automatic SSR hydration and request deduplication. See ${DOCS_URL}`;\n\nfunction containsFetchOrAwait(\n node: AstNode | undefined,\n visited: Set<unknown>,\n): boolean {\n if (!node || visited.has(node)) return false;\n visited.add(node);\n if (node.type === 'AwaitExpression') return true;\n if (node.type === 'CallExpression') {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') {\n const name = callee.name as string;\n if (name === '$fetch' || name === 'fetch') return true;\n }\n }\n for (const key of Object.keys(node)) {\n if (key === 'type' || key === 'loc' || key === 'range') continue;\n const value = (node as Record<string, unknown>)[key];\n if (Array.isArray(value)) {\n for (const child of value) {\n if (child && typeof child === 'object' && 'type' in child) {\n if (containsFetchOrAwait(child as AstNode, visited)) return true;\n }\n }\n } else if (value && typeof value === 'object' && 'type' in value) {\n if (containsFetchOrAwait(value as AstNode, visited)) return true;\n }\n }\n return false;\n}\n\nexport const noUseStateForServerData = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if ((callee as AstNode & { name: string }).name !== 'useState') return;\n const args = node.arguments as AstNode[];\n if (args.length < 2) return;\n const initFn = args[1];\n if (\n initFn.type !== 'ArrowFunctionExpression' &&\n initFn.type !== 'FunctionExpression'\n )\n return;\n if (!containsFetchOrAwait(initFn.body as AstNode, new Set())) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `useAsyncData/useFetch without an explicit string key inside a loop causes duplicate requests and cache fragmentation. Pass a unique string key as the first argument. See ${DOCS_URL}`;\n\nconst DATA_FETCHERS = new Set(['useAsyncData', 'useFetch']);\n\nfunction isMapCall(node: AstNode): boolean {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name === 'map';\n if (callee?.type === 'MemberExpression') {\n const prop = (callee as AstNode & { property?: AstNode }).property as\n | AstNode\n | undefined;\n return (\n prop?.type === 'Identifier' &&\n (prop as AstNode & { name: string }).name === 'map'\n );\n }\n return false;\n}\n\nexport const useAsyncDataKeyRequiredInLoop = defineRule({\n create(context: RuleContext) {\n let loopDepth = 0;\n\n return {\n ForStatement() {\n loopDepth++;\n },\n 'ForStatement:exit'() {\n loopDepth--;\n },\n ForOfStatement() {\n loopDepth++;\n },\n 'ForOfStatement:exit'() {\n loopDepth--;\n },\n ForInStatement() {\n loopDepth++;\n },\n 'ForInStatement:exit'() {\n loopDepth--;\n },\n WhileStatement() {\n loopDepth++;\n },\n 'WhileStatement:exit'() {\n loopDepth--;\n },\n CallExpression(node: AstNode) {\n if (isMapCall(node)) {\n loopDepth++;\n return;\n }\n if (loopDepth === 0) return;\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (!DATA_FETCHERS.has(callee.name as string)) return;\n const args = node.arguments as AstNode[];\n if (args.length === 0) return;\n const firstArg = args[0];\n if (firstArg.type === 'Literal' && typeof firstArg.value === 'string')\n return;\n context.report({ node, message: MESSAGE });\n },\n 'CallExpression:exit'(node: AstNode) {\n if (isMapCall(node)) {\n loopDepth--;\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://owasp.org/www-community/attacks/Server_Side_Request_Forgery';\nconst MESSAGE = `Building a useFetch/$fetch URL from user input (route.query/route.params) lets an attacker control the request target — an SSRF risk during SSR. Use a fixed path and pass user input via the query/body options instead. See ${DOCS_URL}`;\n\nconst FETCH_CALLEES = new Set([\n 'useFetch',\n 'useLazyFetch',\n 'useAsyncData',\n 'useLazyAsyncData',\n '$fetch',\n]);\n\nconst USER_INPUT_ROOTS = new Set(['route', 'useRoute']);\nconst USER_INPUT_SEGMENTS = new Set(['query', 'params']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\n/** True when the expression reads from route.query.* or route.params.*. */\nfunction readsUserInput(node: AstNode): boolean {\n if (node.type !== 'MemberExpression') return false;\n const object = node.object as AstNode;\n const property = node.property as AstNode;\n if (\n object.type === 'Identifier' &&\n USER_INPUT_ROOTS.has(object.name as string) &&\n property.type === 'Identifier' &&\n USER_INPUT_SEGMENTS.has(property.name as string)\n ) {\n return true;\n }\n return readsUserInput(object);\n}\n\nfunction templateReadsUserInput(node: AstNode): boolean {\n const expressions = node.expressions as AstNode[];\n return expressions.some((expr) => readsUserInput(expr));\n}\n\nfunction urlArgIsTainted(arg: AstNode | undefined): boolean {\n if (!arg) return false;\n if (arg.type === 'TemplateLiteral') return templateReadsUserInput(arg);\n if (arg.type === 'MemberExpression') return readsUserInput(arg);\n return false;\n}\n\nexport const noUserInputInFetchUrl = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const name = calleeName(node);\n if (name === undefined || !FETCH_CALLEES.has(name)) return;\n const urlArg = (node.arguments as AstNode[])[0];\n if (urlArgIsTainted(urlArg)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/components';\nconst MESSAGE = `Accessing window./document./navigator./localStorage./sessionStorage. without an import.meta.client or process.client guard causes SSR failures. Wrap with if (import.meta.client) { ... } or move to onMounted. See ${DOCS_URL}`;\n\nconst BROWSER_GLOBALS = new Set([\n 'window',\n 'document',\n 'navigator',\n 'localStorage',\n 'sessionStorage',\n]);\n\nfunction isImportMetaClientGuard(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'MemberExpression') return false;\n const obj = node.object as AstNode | undefined;\n if (obj?.type !== 'MetaProperty') return false;\n const meta = obj.meta as AstNode | undefined;\n const prop = obj.property as AstNode | undefined;\n if (meta?.type !== 'Identifier') return false;\n if ((meta as AstNode & { name: string }).name !== 'import') return false;\n if (prop?.type !== 'Identifier') return false;\n if ((prop as AstNode & { name: string }).name !== 'meta') return false;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return false;\n return (property as AstNode & { name: string }).name === 'client';\n}\n\nfunction isProcessClientGuard(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'MemberExpression') return false;\n const obj = node.object as AstNode | undefined;\n if (obj?.type !== 'Identifier') return false;\n if ((obj as AstNode & { name: string }).name !== 'process') return false;\n const property = node.property as AstNode | undefined;\n if (property?.type !== 'Identifier') return false;\n return (property as AstNode & { name: string }).name === 'client';\n}\n\nexport const clientOnlyForBrowserApis = defineRule({\n create(context: RuleContext) {\n const functionDepthStack: number[] = [];\n let isGuarded = false;\n\n return {\n ArrowFunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'ArrowFunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionDeclaration() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionDeclaration:exit'() {\n functionDepthStack.pop();\n },\n IfStatement(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n const test = node.test as AstNode | undefined;\n if (isImportMetaClientGuard(test) || isProcessClientGuard(test)) {\n isGuarded = true;\n }\n },\n 'IfStatement:exit'(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n const test = node.test as AstNode | undefined;\n if (isImportMetaClientGuard(test) || isProcessClientGuard(test)) {\n isGuarded = false;\n }\n },\n MemberExpression(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (isGuarded) return;\n const obj = node.object as AstNode | undefined;\n if (obj?.type !== 'Identifier') return;\n if (!BROWSER_GLOBALS.has(obj.name as string)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/components';\nconst MESSAGE = `Accessing document/window/navigator/localStorage at the top level of <script setup> causes a server-side crash (SSR). These browser globals are undefined on the server. Move access inside onMounted or guard with import.meta.client. See ${DOCS_URL}`;\n\nconst SSR_UNSAFE_GLOBALS = new Set([\n 'document',\n 'window',\n 'navigator',\n 'localStorage',\n 'sessionStorage',\n]);\n\nexport const noDocumentInSetup = defineRule({\n create(context: RuleContext) {\n const functionDepthStack: number[] = [];\n\n return {\n ArrowFunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'ArrowFunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionExpression() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionExpression:exit'() {\n functionDepthStack.pop();\n },\n FunctionDeclaration() {\n functionDepthStack.push(\n functionDepthStack.length > 0\n ? functionDepthStack[functionDepthStack.length - 1]! + 1\n : 1,\n );\n },\n 'FunctionDeclaration:exit'() {\n functionDepthStack.pop();\n },\n Identifier(node: AstNode) {\n if (functionDepthStack.length > 0) return;\n if (SSR_UNSAFE_GLOBALS.has(node.name as string)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://h3.unjs.io/guide/throw';\nconst MESSAGE = `throw new Error() leaks the call stack and exposes internal details. Use throw createError() from h3 for proper HTTP errors with no stack leak. See ${DOCS_URL}`;\n\nexport const createErrorOnFailure = defineRule({\n create(context: RuleContext) {\n let handlerDepth = 0;\n\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (\n (callee as AstNode & { name: string }).name !== 'defineEventHandler'\n )\n return;\n handlerDepth++;\n },\n 'CallExpression:exit'(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (\n (callee as AstNode & { name: string }).name !== 'defineEventHandler'\n )\n return;\n handlerDepth--;\n },\n ThrowStatement(node: AstNode) {\n if (handlerDepth === 0) return;\n const arg = node.argument as AstNode | undefined;\n if (!arg || arg.type !== 'NewExpression') return;\n const ctor = arg.callee as AstNode | undefined;\n if (ctor?.type !== 'Identifier') return;\n if ((ctor as AstNode & { name: string }).name !== 'Error') return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://h3.unjs.io/guide/typed';\nconst MESSAGE = `defineEventHandler handler param event lacks a type annotation. Add a generic: defineEventHandler<H3Event>(...) or type the event parameter explicitly. See ${DOCS_URL}`;\n\nfunction isFunction(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nexport const defineEventHandlerTyped = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if (\n (callee as AstNode & { name: string }).name !== 'defineEventHandler'\n )\n return;\n if (node.typeArguments) return;\n const args = node.arguments as AstNode[];\n if (args.length === 0) return;\n const handler = args[0];\n if (!isFunction(handler)) return;\n const params = (handler as AstNode & { params: AstNode[] }).params;\n if (!params || params.length === 0) return;\n const eventParam = params[0] as AstNode;\n if (eventParam.typeAnnotation) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/data-fetching';\nconst MESSAGE = `readBody() is the legacy H3 reader. In Nuxt 4 with h3 v2, use readValidatedBody to parse and validate the request body in one step. See ${DOCS_URL}`;\n\nexport const validateBodyWithH3V2 = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier') return;\n if ((callee as AstNode & { name: string }).name !== 'readBody') return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../define-rule.js';\nimport type { CoreRule } from '../../types.js';\nimport { noExplicitImportsOfAutoImported } from './ai-slop/no-explicit-imports-of-auto-imported.js';\nimport { noFetchInSetup } from './ai-slop/no-fetch-in-setup.js';\nimport { noProcessClientServer } from './ai-slop/no-process-client-server.js';\nimport { noUseStateForServerData } from './ai-slop/no-useState-for-server-data.js';\nimport { useAsyncDataKeyRequiredInLoop } from './data-fetching/useAsyncData-key-required-in-loop.js';\nimport { noUserInputInFetchUrl } from './security/no-user-input-in-fetch-url.js';\nimport { clientOnlyForBrowserApis } from './hydration/clientOnly-for-browser-apis.js';\nimport { noDocumentInSetup } from './hydration/no-document-in-setup.js';\nimport { createErrorOnFailure } from './server-routes/createError-on-failure.js';\nimport { defineEventHandlerTyped } from './server-routes/defineEventHandler-typed.js';\nimport { validateBodyWithH3V2 } from './server-routes/validate-body-with-h3-v2.js';\n\nfunction coreRule(\n id: string,\n category: CoreRule['category'],\n severity: CoreRule['severity'],\n recommended: boolean,\n rule: Omit<CoreRule, 'id' | 'category' | 'severity' | 'recommended'>,\n): CoreRule {\n return { id, category, severity, recommended, ...rule };\n}\n\nexport const NUXT_RULES: readonly CoreRule[] = [\n coreRule(\n 'ai-slop/no-process-client-server',\n 'ai-slop',\n 'error',\n true,\n defineRule(noProcessClientServer),\n ),\n coreRule(\n 'ai-slop/no-explicit-imports-of-auto-imported',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noExplicitImportsOfAutoImported),\n ),\n coreRule(\n 'ai-slop/no-useState-for-server-data',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noUseStateForServerData),\n ),\n coreRule(\n 'ai-slop/no-fetch-in-setup',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noFetchInSetup),\n ),\n coreRule(\n 'data-fetching/useAsyncData-key-required-in-loop',\n 'data-fetching',\n 'error',\n true,\n defineRule(useAsyncDataKeyRequiredInLoop),\n ),\n coreRule(\n 'server-routes/defineEventHandler-typed',\n 'server-routes',\n 'warn',\n true,\n defineRule(defineEventHandlerTyped),\n ),\n coreRule(\n 'server-routes/validate-body-with-h3-v2',\n 'server-routes',\n 'warn',\n true,\n defineRule(validateBodyWithH3V2),\n ),\n coreRule(\n 'server-routes/createError-on-failure',\n 'server-routes',\n 'warn',\n true,\n defineRule(createErrorOnFailure),\n ),\n coreRule(\n 'hydration/no-document-in-setup',\n 'hydration',\n 'error',\n true,\n defineRule(noDocumentInSetup),\n ),\n coreRule(\n 'hydration/clientOnly-for-browser-apis',\n 'hydration',\n 'error',\n true,\n defineRule(clientOnlyForBrowserApis),\n ),\n coreRule(\n 'security/no-user-input-in-fetch-url',\n 'security',\n 'warn',\n true,\n defineRule(noUserInputInFetchUrl),\n ),\n];\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/components/props.html#reactive-props-destructure';\nconst MESSAGE = `Destructuring props loses reactivity. Wrap with toRefs(...) to keep refs. See ${DOCS_URL}`;\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isDefinePropsCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n if (name === 'defineProps') return true;\n if (name === 'withDefaults') {\n const args = node.arguments as AstNode[] | undefined;\n return isDefinePropsCall(args?.[0]);\n }\n return false;\n}\n\nfunction isToRefsCall(node: AstNode | undefined): boolean {\n return node?.type === 'CallExpression' && calleeName(node) === 'toRefs';\n}\n\nexport const noDestructurePropsWithoutToRefs = defineRule({\n create(context: RuleContext) {\n const propsSources = new Set<string>();\n\n function registerSetupParam(fn: AstNode | undefined): void {\n const params = fn?.params as AstNode[] | undefined;\n const first = params?.[0];\n if (first?.type === 'Identifier') propsSources.add(first.name as string);\n }\n\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n const init = node.init as AstNode | undefined;\n if (id.type === 'Identifier' && isDefinePropsCall(init)) {\n propsSources.add(id.name as string);\n return;\n }\n if (id.type !== 'ObjectPattern' || !init) return;\n if (isToRefsCall(init)) return;\n const fromProps =\n isDefinePropsCall(init) ||\n (init.type === 'Identifier' && propsSources.has(init.name as string));\n if (fromProps) context.report({ node, message: MESSAGE });\n },\n Property(node: AstNode) {\n const key = node.key as AstNode | undefined;\n if (key?.type === 'Identifier' && key.name === 'setup') {\n registerSetupParam(node.value as AstNode);\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/essentials/reactivity-fundamentals.html#destructuring-reactive-state';\nconst MESSAGE = `Destructuring reactive state loses reactivity. Wrap with toRefs(...) or read single keys via toRef(state, 'key'). See ${DOCS_URL}`;\n\nconst REACTIVE_FACTORIES = new Set(['reactive', 'shallowReactive']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isReactiveCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n if (name && REACTIVE_FACTORIES.has(name)) return true;\n if (name === 'readonly') {\n const args = node.arguments as AstNode[] | undefined;\n return isReactiveCall(args?.[0]);\n }\n return false;\n}\n\nfunction isToRefsCall(node: AstNode | undefined): boolean {\n return node?.type === 'CallExpression' && calleeName(node) === 'toRefs';\n}\n\nexport const noDestructureReactiveWithoutToRefs = defineRule({\n create(context: RuleContext) {\n const reactiveSources = new Set<string>();\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n const init = node.init as AstNode | undefined;\n if (id.type === 'Identifier' && isReactiveCall(init)) {\n reactiveSources.add(id.name as string);\n return;\n }\n if (id.type !== 'ObjectPattern' || !init) return;\n if (isToRefsCall(init)) return;\n const fromReactive =\n isReactiveCall(init) ||\n (init.type === 'Identifier' &&\n reactiveSources.has(init.name as string));\n if (fromReactive) context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst EM_DASH = '\\u2014';\n\ninterface LiteralNode extends AstNode {\n type: 'Literal';\n value: unknown;\n}\n\nexport const noEmDashInString = defineRule({\n create(context: RuleContext) {\n return {\n Literal(node: AstNode) {\n const literal = node as LiteralNode;\n if (typeof literal.value !== 'string') return;\n if (!literal.value.includes(EM_DASH)) return;\n context.report({\n node,\n message:\n 'Em dash in string literal reads as AI-generated output; use comma, colon, or parentheses.',\n });\n },\n };\n },\n fix(node: AstNode) {\n const literal = node as LiteralNode;\n if (typeof literal.value !== 'string') return null;\n const raw = literal.raw;\n if (typeof raw !== 'string') return null;\n if (!raw.includes(EM_DASH)) return null;\n return raw.split(EM_DASH).join('-');\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\nimport { VUE_AUTO_IMPORTED } from '../../../shared/auto-imported-symbols.js';\n\nconst DOCS_URL = 'https://nuxt.com/docs/4.x/guide/concepts/auto-imports';\nconst WHOLE_MESSAGE = `The entire import from 'vue' can be removed — these names are auto-imported in this project. See ${DOCS_URL}`;\nconst SPECIFIER_MESSAGE = `This symbol is auto-imported in your project. Remove it from the 'vue' import — it is dead weight in the diff. See ${DOCS_URL}`;\n\nfunction isAutoImportedValueSpecifier(spec: AstNode): boolean {\n if (spec.importKind === 'type') return false;\n const imported = spec.imported as AstNode;\n return VUE_AUTO_IMPORTED.has(imported.name as string);\n}\n\nexport const noImportsFromVueWhenAutoImported = defineRule({\n create(context: RuleContext) {\n let gated = false;\n return {\n Program() {\n gated = context.capabilities?.has('auto-imports:vue') !== true;\n },\n ImportDeclaration(node: AstNode) {\n if (gated) return;\n if (node.importKind === 'type') return;\n const source = node.source as AstNode;\n if (source.value !== 'vue') return;\n const specifiers = node.specifiers as AstNode[];\n const named = specifiers.filter((s) => s.type === 'ImportSpecifier');\n if (named.length === 0) return;\n const offending = named.filter(isAutoImportedValueSpecifier);\n if (offending.length === 0) return;\n if (\n offending.length === named.length &&\n specifiers.length === named.length\n ) {\n context.report({ node, message: WHOLE_MESSAGE });\n return;\n }\n for (const spec of offending) {\n context.report({ node: spec, message: SPECIFIER_MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/typescript/composition-api.html#typing-ref';\nconst MESSAGE = `Non-null assertion on a ref's .value hides nullability. Add an explicit guard ('if (!r.value) return') or use optional chaining ('r.value?.x'). See ${DOCS_URL}`;\n\nconst REF_FACTORIES = new Set([\n 'ref',\n 'shallowRef',\n 'customRef',\n 'computed',\n 'useTemplateRef',\n]);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isRefFactoryCall(node: AstNode | undefined): boolean {\n if (!node || node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n return name !== undefined && REF_FACTORIES.has(name);\n}\n\nfunction isDotValue(node: AstNode | undefined): node is AstNode {\n if (!node || node.type !== 'MemberExpression') return false;\n const property = node.property as AstNode | undefined;\n return (\n node.computed !== true &&\n property?.type === 'Identifier' &&\n property.name === 'value'\n );\n}\n\nexport const noNonNullAssertionOnRefValue = defineRule({\n create(context: RuleContext) {\n const refSources = new Set<string>();\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n if (\n id.type === 'Identifier' &&\n isRefFactoryCall(node.init as AstNode)\n ) {\n refSources.add(id.name as string);\n }\n },\n TSNonNullExpression(node: AstNode) {\n const arg = node.expression as AstNode | undefined;\n if (!isDotValue(arg)) return;\n const object = arg.object as AstNode | undefined;\n if (object?.type !== 'Identifier') return;\n if (!refSources.has(object.name as string)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/typescript/composition-api.html#typing-component-props';\nconst MESSAGE = `This defineProps() call declares props with a runtime object, which discards static type information. Use the type-only generic form (defineProps<{ ... }>()) so props are fully typed. See ${DOCS_URL}`;\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nexport const definePropsTyped = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n if (calleeName(node) !== 'defineProps') return;\n const firstArg = (node.arguments as AstNode[])[0];\n if (firstArg?.type === 'ObjectExpression') {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://pinia.vuejs.org/core-concepts/#defining-a-store';\nconst MESSAGE = `This calls defineStore() inside a function (setup, a composable, or a component body), so a brand-new store definition is created on every call instead of one shared singleton. Call defineStore() once at module scope and call the returned useXxxStore() inside setup. See ${DOCS_URL}`;\n\nexport const noPiniaStoreInSetup = defineRule({\n create(context: RuleContext) {\n let functionDepth = 0;\n\n const enter = (): void => {\n functionDepth += 1;\n };\n const exit = (): void => {\n functionDepth -= 1;\n };\n\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier' || callee.name !== 'defineStore') {\n return;\n }\n if (functionDepth > 0) {\n context.report({ node, message: MESSAGE });\n }\n },\n FunctionDeclaration: enter,\n 'FunctionDeclaration:exit': exit,\n FunctionExpression: enter,\n 'FunctionExpression:exit': exit,\n ArrowFunctionExpression: enter,\n 'ArrowFunctionExpression:exit': exit,\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/api/sfc-script-setup.html';\nconst MESSAGE = `This component nests composition-API logic inside an options-object setup(). Use a <script setup> block instead — it removes the setup() boilerplate and exposes bindings to the template directly. See ${DOCS_URL}`;\n\nfunction isFunctionValue(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nfunction isSetupProperty(prop: AstNode): boolean {\n if (prop.type !== 'Property' || prop.computed === true) return false;\n if (prop.shorthand === true) return false;\n const key = prop.key as AstNode;\n if (key.type !== 'Identifier' || key.name !== 'setup') return false;\n return isFunctionValue(prop.value as AstNode | undefined);\n}\n\nexport const preferScriptSetupForNewFiles = defineRule({\n create(context: RuleContext) {\n return {\n ExportDefaultDeclaration(node: AstNode) {\n const declaration = node.declaration as AstNode | undefined;\n if (declaration?.type !== 'ObjectExpression') return;\n const properties = declaration.properties as AstNode[];\n if (properties.some(isSetupProperty)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/guide/components/async.html';\nconst MESSAGE = `This route record's \\`component:\\` field references the imported component directly, which forces a synchronous import of the route bundle. Use \\`() => import('./Foo.vue')\\` or \\`defineAsyncComponent(() => import('./Foo.vue'))\\` to lazy-load the route. See ${DOCS_URL}`;\n\nfunction keyName(key: AstNode): unknown {\n return key.type === 'Identifier' ? key.name : key.value;\n}\n\nexport const preferDefineAsyncComponentOnRoute = defineRule({\n create(context: RuleContext) {\n return {\n Property(node: AstNode) {\n if (node.computed === true || node.shorthand === true) return;\n if (keyName(node.key as AstNode) !== 'component') return;\n const value = node.value as AstNode;\n if (value.type === 'Identifier') {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/guide/best-practices/performance.html';\nconst MESSAGE = `This helper closes over nothing reactive (only its parameters, imports, and globals), yet it is re-created on every call of the enclosing function. Hoist it to module scope so a single function reference is shared across all component instances. See ${DOCS_URL}`;\n\nconst GLOBALS = new Set([\n 'console',\n 'Math',\n 'JSON',\n 'Object',\n 'Array',\n 'Number',\n 'String',\n 'Boolean',\n 'Date',\n 'RegExp',\n 'Map',\n 'Set',\n 'WeakMap',\n 'WeakSet',\n 'Promise',\n 'Symbol',\n 'BigInt',\n 'parseInt',\n 'parseFloat',\n 'isNaN',\n 'isFinite',\n 'encodeURIComponent',\n 'decodeURIComponent',\n 'structuredClone',\n 'undefined',\n 'NaN',\n 'Infinity',\n 'globalThis',\n]);\n\nconst SKIP_KEYS = new Set(['type', 'loc', 'start', 'end', 'range', 'parent']);\n\nfunction eachChild(node: AstNode, visit: (child: AstNode) => void): void {\n for (const key of Object.keys(node)) {\n if (SKIP_KEYS.has(key)) continue;\n const value = (node as Record<string, unknown>)[key];\n if (Array.isArray(value)) {\n for (const c of value) {\n if (c && typeof c === 'object' && 'type' in c) visit(c as AstNode);\n }\n } else if (value && typeof value === 'object' && 'type' in value) {\n visit(value as AstNode);\n }\n }\n}\n\nfunction collectPatternNames(pattern: AstNode, into: Set<string>): void {\n switch (pattern.type) {\n case 'Identifier':\n into.add(pattern.name as string);\n return;\n case 'AssignmentPattern':\n collectPatternNames(pattern.left as AstNode, into);\n return;\n case 'RestElement':\n collectPatternNames(pattern.argument as AstNode, into);\n return;\n case 'ArrayPattern':\n for (const el of pattern.elements as (AstNode | null)[]) {\n if (el) collectPatternNames(el, into);\n }\n return;\n case 'ObjectPattern':\n for (const prop of pattern.properties as AstNode[]) {\n if (prop.type === 'RestElement') {\n collectPatternNames(prop.argument as AstNode, into);\n } else {\n collectPatternNames(prop.value as AstNode, into);\n }\n }\n return;\n }\n}\n\nfunction collectBound(fn: AstNode, bound: Set<string>): void {\n for (const param of fn.params as AstNode[]) {\n collectPatternNames(param, bound);\n }\n if (fn.id && (fn.id as AstNode).type === 'Identifier') {\n bound.add((fn.id as AstNode).name as string);\n }\n const walk = (node: AstNode): void => {\n if (node.type === 'VariableDeclarator') {\n collectPatternNames(node.id as AstNode, bound);\n } else if (node.type === 'FunctionDeclaration' && node.id) {\n bound.add((node.id as AstNode).name as string);\n } else if (\n (node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression') &&\n node !== fn\n ) {\n for (const p of node.params as AstNode[]) {\n collectPatternNames(p, bound);\n }\n }\n eachChild(node, walk);\n };\n eachChild(fn, walk);\n}\n\nfunction collectFree(fn: AstNode, free: Set<string>): void {\n const visit = (node: AstNode, parent: AstNode | null, key: string): void => {\n if (node.type === 'Identifier') {\n const isMemberProp =\n parent?.type === 'MemberExpression' &&\n key === 'property' &&\n parent.computed !== true;\n const isPropKey =\n parent?.type === 'Property' &&\n key === 'key' &&\n parent.computed !== true;\n if (!isMemberProp && !isPropKey) free.add(node.name as string);\n return;\n }\n for (const k of Object.keys(node)) {\n if (SKIP_KEYS.has(k)) continue;\n const value = (node as Record<string, unknown>)[k];\n if (Array.isArray(value)) {\n for (const c of value) {\n if (c && typeof c === 'object' && 'type' in c) {\n visit(c as AstNode, node, k);\n }\n }\n } else if (value && typeof value === 'object' && 'type' in value) {\n visit(value as AstNode, node, k);\n }\n }\n };\n for (const stmt of bodyNodes(fn)) visit(stmt, fn, 'body');\n}\n\nfunction bodyNodes(fn: AstNode): AstNode[] {\n const body = fn.body as AstNode;\n if (body.type === 'BlockStatement') return body.body as AstNode[];\n return [body];\n}\n\nfunction isHoistable(fn: AstNode, imports: Set<string>): boolean {\n const bound = new Set<string>();\n collectBound(fn, bound);\n const free = new Set<string>();\n collectFree(fn, free);\n for (const name of free) {\n if (bound.has(name)) continue;\n if (imports.has(name)) continue;\n if (GLOBALS.has(name)) continue;\n return false;\n }\n return true;\n}\n\nexport const preferModuleScopePureFunction = defineRule({\n create(context: RuleContext) {\n const imports = new Set<string>();\n let functionDepth = 0;\n\n const enter = (): void => {\n functionDepth += 1;\n };\n const exit = (): void => {\n functionDepth -= 1;\n };\n\n const analyze = (fn: AstNode): void => {\n if (functionDepth < 1) return;\n if (isHoistable(fn, imports)) {\n context.report({ node: fn, message: MESSAGE });\n }\n };\n\n return {\n ImportDeclaration(node: AstNode): void {\n for (const spec of node.specifiers as AstNode[]) {\n const local = spec.local as AstNode;\n imports.add(local.name as string);\n }\n },\n VariableDeclaration(node: AstNode): void {\n if (functionDepth < 1) return;\n if (node.kind !== 'const') return;\n for (const decl of node.declarations as AstNode[]) {\n const init = decl.init as AstNode | undefined;\n if (\n init?.type === 'ArrowFunctionExpression' ||\n init?.type === 'FunctionExpression'\n ) {\n if (isHoistable(init, imports)) {\n context.report({ node: init, message: MESSAGE });\n }\n }\n }\n },\n FunctionDeclaration(node: AstNode): void {\n analyze(node);\n enter();\n },\n 'FunctionDeclaration:exit'(): void {\n exit();\n },\n ArrowFunctionExpression: enter,\n 'ArrowFunctionExpression:exit': exit,\n FunctionExpression: enter,\n 'FunctionExpression:exit': exit,\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/guide/best-practices/performance.html';\nconst MESSAGE = `This static array or object literal is declared inside a function, so a fresh copy is allocated on every call (including every component instantiation). Hoist it to module scope so the single frozen reference is shared. See ${DOCS_URL}`;\n\nconst LITERAL_TYPES = new Set([\n 'Literal',\n 'StringLiteral',\n 'NumericLiteral',\n 'BooleanLiteral',\n 'NullLiteral',\n 'BigIntLiteral',\n 'TemplateLiteral',\n]);\n\nfunction isStaticLiteral(node: AstNode | undefined): boolean {\n if (!node) return false;\n if (LITERAL_TYPES.has(node.type)) {\n if (node.type === 'TemplateLiteral') {\n return (node.expressions as AstNode[]).length === 0;\n }\n return true;\n }\n if (node.type === 'UnaryExpression') {\n return isStaticLiteral(node.argument as AstNode);\n }\n if (node.type === 'ArrayExpression') {\n const elements = node.elements as (AstNode | null)[];\n return (\n elements.length > 0 &&\n elements.every((el) => isStaticLiteral(el ?? undefined))\n );\n }\n if (node.type === 'ObjectExpression') {\n const props = node.properties as AstNode[];\n if (props.length === 0) return false;\n return props.every((p) => {\n if (p.type !== 'Property' || p.computed === true) return false;\n return isStaticLiteral(p.value as AstNode);\n });\n }\n return false;\n}\n\nfunction isHoistableSize(node: AstNode): boolean {\n // Caller guarantees node is an Array/Object expression.\n if (node.type === 'ArrayExpression') {\n return (node.elements as unknown[]).length > 1;\n }\n return (node.properties as unknown[]).length > 0;\n}\n\nexport const preferModuleScopeStaticValue = defineRule({\n create(context: RuleContext) {\n let functionDepth = 0;\n\n return {\n ArrowFunctionExpression(): void {\n functionDepth += 1;\n },\n 'ArrowFunctionExpression:exit'(): void {\n functionDepth -= 1;\n },\n FunctionExpression(): void {\n functionDepth += 1;\n },\n 'FunctionExpression:exit'(): void {\n functionDepth -= 1;\n },\n FunctionDeclaration(): void {\n functionDepth += 1;\n },\n 'FunctionDeclaration:exit'(): void {\n functionDepth -= 1;\n },\n VariableDeclarator(node: AstNode): void {\n if (functionDepth === 0) return;\n const init = node.init as AstNode | undefined;\n if (!init) return;\n if (\n init.type !== 'ArrayExpression' &&\n init.type !== 'ObjectExpression'\n ) {\n return;\n }\n if (!isHoistableSize(init)) return;\n if (!isStaticLiteral(init)) return;\n context.report({ node: init, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/guide/best-practices/performance.html';\nconst MESSAGE = `This computed falls back to a fresh empty array or object literal, so it returns a brand-new reference whenever the source is nullish. Downstream watchers, child props, and v-memo see an identity change every recompute. Hoist a single module-scope EMPTY constant and fall back to that. See ${DOCS_URL}`;\n\nfunction isEmptyLiteral(node: AstNode | undefined): boolean {\n if (node?.type === 'ArrayExpression') {\n return (node.elements as unknown[]).length === 0;\n }\n if (node?.type === 'ObjectExpression') {\n return (node.properties as unknown[]).length === 0;\n }\n return false;\n}\n\nfunction fallsBackToEmptyLiteral(node: AstNode): boolean {\n if (node.type === 'LogicalExpression') {\n const op = node.operator;\n if (op !== '??' && op !== '||') return false;\n return isEmptyLiteral(node.right as AstNode);\n }\n if (node.type === 'ConditionalExpression') {\n return (\n isEmptyLiteral(node.consequent as AstNode) ||\n isEmptyLiteral(node.alternate as AstNode)\n );\n }\n return false;\n}\n\nfunction getterBody(node: AstNode): AstNode | undefined {\n const first = (node.arguments as AstNode[])[0];\n if (\n first?.type !== 'ArrowFunctionExpression' &&\n first?.type !== 'FunctionExpression'\n ) {\n return undefined;\n }\n const body = first.body as AstNode;\n if (body.type !== 'BlockStatement') return body;\n const statements = body.body as AstNode[];\n for (const stmt of statements) {\n if (stmt.type === 'ReturnStatement') {\n return stmt.argument as AstNode | undefined;\n }\n }\n return undefined;\n}\n\nexport const preferStableEmptyFallback = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier' || callee.name !== 'computed') return;\n const returned = getterBody(node);\n if (returned && fallsBackToEmptyLiteral(returned)) {\n context.report({ node: returned, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/essentials/watchers.html#watch-source-types';\nconst MESSAGE = `This watch getter returns a freshly-constructed array or object literal, so Vue compares it by reference (Object.is) and the watcher re-fires on every reactive tick — even when nothing changed. Use the multi-source array form watch([a, b], cb) for several sources, or watch a primitive/ref directly. See ${DOCS_URL}`;\n\nfunction isFunction(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nfunction unwrap(node: AstNode | undefined): AstNode | undefined {\n // oxc wraps a concise arrow object body `() => ({...})` in a\n // ParenthesizedExpression; peel it (and any nesting) before checking shape.\n let current = node;\n while (current?.type === 'ParenthesizedExpression') {\n current = current.expression as AstNode | undefined;\n }\n return current;\n}\n\nfunction isFreshLiteral(node: AstNode | undefined): boolean {\n const inner = unwrap(node);\n return (\n inner?.type === 'ArrayExpression' || inner?.type === 'ObjectExpression'\n );\n}\n\nfunction getterReturnsFreshLiteral(fn: AstNode): boolean {\n const body = fn.body as AstNode;\n // Concise arrow body: `() => [a, b]` or `() => ({ a })`.\n if (body.type !== 'BlockStatement') return isFreshLiteral(body);\n // Block body: the getter's identity is its first top-level return. A return\n // nested inside an inner function is that function's, not this getter's.\n for (const stmt of body.body as AstNode[]) {\n if (stmt.type === 'ReturnStatement') {\n return isFreshLiteral(stmt.argument as AstNode | undefined);\n }\n }\n return false;\n}\n\nexport const noFreshDepsInWatch = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'Identifier' || callee.name !== 'watch') return;\n const source = (node.arguments as AstNode[])[0];\n if (!source || !isFunction(source)) return;\n if (getterReturnsFreshLiteral(source)) {\n context.report({ node: source, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/components/provide-inject.html#working-with-reactivity';\nconst MESSAGE = `Mutating an injected value from a consumer breaks one-way data flow and makes the source of changes hard to trace. Wrap the provided value in readonly() at the provide site and expose a dedicated mutator instead. See ${DOCS_URL}`;\n\nconst MUTATING_METHODS = new Set([\n 'push',\n 'pop',\n 'splice',\n 'shift',\n 'unshift',\n 'sort',\n 'reverse',\n]);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction memberObjectName(node: AstNode | undefined): string | undefined {\n if (!node || node.type !== 'MemberExpression') return undefined;\n const object = node.object as AstNode;\n if (object.type !== 'Identifier') return undefined;\n return object.name as string;\n}\n\nexport const preferReadonlyForInjected = defineRule({\n create(context: RuleContext) {\n const injectedSources = new Set<string>();\n return {\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n const init = node.init as AstNode | undefined;\n if (\n id.type === 'Identifier' &&\n init?.type === 'CallExpression' &&\n calleeName(init) === 'inject'\n ) {\n injectedSources.add(id.name as string);\n }\n },\n AssignmentExpression(node: AstNode) {\n const name = memberObjectName(node.left as AstNode);\n if (name !== undefined && injectedSources.has(name)) {\n context.report({ node, message: MESSAGE });\n }\n },\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'MemberExpression' || callee.computed === true) {\n return;\n }\n const name = memberObjectName(callee);\n if (name === undefined || !injectedSources.has(name)) return;\n const property = callee.property as AstNode;\n if (MUTATING_METHODS.has(property.name as string)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL = 'https://vuejs.org/api/reactivity-advanced.html#shallowref';\nconst MESSAGE = `This ref holds large or fetched data, so deep reactivity tracks every nested property and wastes memory and CPU. Use shallowRef() (and triggerRef on replacement) for large arrays, big objects, or server payloads. See ${DOCS_URL}`;\n\nconst ARRAY_LIMIT = 100;\nconst OBJECT_LIMIT = 50;\nconst FETCH_IDENTIFIERS = new Set(['$fetch', 'useFetch']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isAxiosGet(node: AstNode): boolean {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type !== 'MemberExpression' || callee.computed === true) {\n return false;\n }\n const object = callee.object as AstNode;\n const property = callee.property as AstNode;\n return (\n object.type === 'Identifier' &&\n object.name === 'axios' &&\n property.name === 'get'\n );\n}\n\nfunction isFetchSource(node: AstNode): boolean {\n if (node.type !== 'CallExpression') return false;\n const name = calleeName(node);\n if (name !== undefined && FETCH_IDENTIFIERS.has(name)) return true;\n return isAxiosGet(node);\n}\n\nfunction isLargeData(node: AstNode | undefined): boolean {\n if (!node) return false;\n const value =\n node.type === 'AwaitExpression' ? (node.argument as AstNode) : node;\n if (value.type === 'ArrayExpression') {\n return (value.elements as AstNode[]).length > ARRAY_LIMIT;\n }\n if (value.type === 'ObjectExpression') {\n return (value.properties as AstNode[]).length > OBJECT_LIMIT;\n }\n return isFetchSource(value);\n}\n\nexport const preferShallowRefForLargeData = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n if (calleeName(node) !== 'ref') return;\n const init = (node.arguments as AstNode[])[0];\n if (isLargeData(init)) context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://vuejs.org/guide/essentials/watchers.html#side-effect-cleanup';\nconst MESSAGE = `This watcher registers a listener, timer, or observer but never cleans it up, so it leaks across re-runs and hot reloads. Return a cleanup function (or call onWatcherCleanup) inside the watcher. See ${DOCS_URL}`;\n\nconst REGISTER_CALLS = new Set([\n 'addEventListener',\n 'setInterval',\n 'setTimeout',\n]);\nconst OBSERVERS = new Set([\n 'IntersectionObserver',\n 'MutationObserver',\n 'ResizeObserver',\n]);\nconst CLEANUP_CALLS = new Set(['onCleanup', 'onWatcherCleanup']);\n\ninterface WatchFrame {\n sourceCall: AstNode;\n isEffect: boolean;\n hasRegistration: boolean;\n hasCleanup: boolean;\n}\n\nfunction calleeIdentifierName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction calledMethodName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n if (callee?.type === 'MemberExpression' && callee.computed !== true) {\n const property = callee.property as AstNode;\n return property.name as string;\n }\n return undefined;\n}\n\nfunction isFunction(node: AstNode | undefined): boolean {\n return (\n node?.type === 'ArrowFunctionExpression' ||\n node?.type === 'FunctionExpression'\n );\n}\n\nexport const watchWithoutCleanup = defineRule({\n create(context: RuleContext) {\n const watchStack: WatchFrame[] = [];\n\n return {\n CallExpression(node: AstNode) {\n const name = calleeIdentifierName(node);\n if (name === 'watch' || name === 'watchEffect') {\n const isEffect = name === 'watchEffect';\n const args = node.arguments as AstNode[];\n const callback = args[isEffect ? 0 : 1];\n if (!isFunction(callback)) return;\n watchStack.push({\n sourceCall: node,\n isEffect,\n hasRegistration: false,\n hasCleanup: false,\n });\n return;\n }\n if (watchStack.length === 0) return;\n const top = watchStack[watchStack.length - 1]!;\n const method = calledMethodName(node);\n if (method !== undefined && REGISTER_CALLS.has(method)) {\n top.hasRegistration = true;\n }\n if (method !== undefined && CLEANUP_CALLS.has(method) && top.isEffect) {\n top.hasCleanup = true;\n }\n },\n NewExpression(node: AstNode) {\n if (watchStack.length === 0) return;\n const callee = node.callee as AstNode | undefined;\n if (\n callee?.type === 'Identifier' &&\n OBSERVERS.has(callee.name as string)\n ) {\n watchStack[watchStack.length - 1]!.hasRegistration = true;\n }\n },\n ReturnStatement(node: AstNode) {\n if (watchStack.length === 0) return;\n if (isFunction(node.argument as AstNode | undefined)) {\n watchStack[watchStack.length - 1]!.hasCleanup = true;\n }\n },\n 'CallExpression:exit'(node: AstNode) {\n if (watchStack.length === 0) return;\n const top = watchStack[watchStack.length - 1]!;\n if (top.sourceCall !== node) return;\n watchStack.pop();\n if (top.hasRegistration && !top.hasCleanup) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#local-storage';\nconst MESSAGE = `Persisting auth tokens/secrets in localStorage or sessionStorage exposes them to any XSS payload. Store them in an HttpOnly, Secure, SameSite cookie set by the server instead. See ${DOCS_URL}`;\n\nconst STORAGES = new Set(['localStorage', 'sessionStorage']);\nconst SENSITIVE_KEY =\n /token|jwt|secret|password|passwd|credential|api[-_]?key|bearer|private[-_]?key|auth/i;\n\nfunction stringValue(node: AstNode | undefined): string | undefined {\n if (node?.type === 'Literal' && typeof node.value === 'string') {\n return node.value;\n }\n return undefined;\n}\n\nfunction isStorageObject(node: AstNode | undefined): boolean {\n return node?.type === 'Identifier' && STORAGES.has(node.name as string);\n}\n\nfunction memberKey(node: AstNode): string | undefined {\n const property = node.property as AstNode;\n if (node.computed === true) return stringValue(property);\n return property.name as string;\n}\n\nexport const noAuthTokenInWebStorage = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const callee = node.callee as AstNode;\n if (callee.type !== 'MemberExpression') return;\n if (callee.computed === true) return;\n if (!isStorageObject(callee.object as AstNode | undefined)) return;\n const method = callee.property as AstNode;\n if (method.name !== 'setItem') return;\n const key = stringValue((node.arguments as AstNode[])[0]);\n if (key !== undefined && SENSITIVE_KEY.test(key)) {\n context.report({ node, message: MESSAGE });\n }\n },\n AssignmentExpression(node: AstNode) {\n const left = node.left as AstNode;\n if (left.type !== 'MemberExpression') return;\n if (!isStorageObject(left.object as AstNode | undefined)) return;\n const key = memberKey(left);\n if (key !== undefined && SENSITIVE_KEY.test(key)) {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_eval!';\nconst MESSAGE = `eval, new Function, and string-argument setTimeout/setInterval execute arbitrary code and are XSS/RCE vectors. Replace with explicit logic or JSON.parse for data. See ${DOCS_URL}`;\n\nconst STRING_TIMER_CALLEES = new Set(['setTimeout', 'setInterval']);\n\nfunction calleeName(node: AstNode): string | undefined {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier') return callee.name as string;\n return undefined;\n}\n\nfunction isStringArg(node: AstNode | undefined): boolean {\n if (!node) return false;\n if (node.type === 'Literal') return typeof node.value === 'string';\n return node.type === 'TemplateLiteral';\n}\n\nexport const noEvalLike = defineRule({\n create(context: RuleContext) {\n return {\n CallExpression(node: AstNode) {\n const name = calleeName(node);\n if (name === undefined) return;\n if (name === 'eval') {\n context.report({ node, message: MESSAGE });\n return;\n }\n if (STRING_TIMER_CALLEES.has(name)) {\n const args = node.arguments as AstNode[] | undefined;\n if (isStringArg(args?.[0])) {\n context.report({ node, message: MESSAGE });\n }\n }\n },\n NewExpression(node: AstNode) {\n const callee = node.callee as AstNode | undefined;\n if (callee?.type === 'Identifier' && callee.name === 'Function') {\n context.report({ node, message: MESSAGE });\n }\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#security_considerations';\nconst MESSAGE = `Assigning to innerHTML/outerHTML injects unsanitized markup and is a DOM-based XSS sink. Use textContent for text, or sanitize with DOMPurify before assigning. See ${DOCS_URL}`;\n\nconst HTML_SINKS = new Set(['innerHTML', 'outerHTML']);\n\nfunction isHtmlSinkTarget(node: AstNode): boolean {\n if (node.type !== 'MemberExpression') return false;\n if (node.computed === true) return false;\n const property = node.property as AstNode;\n return (\n property.type === 'Identifier' && HTML_SINKS.has(property.name as string)\n );\n}\n\nexport const noInnerHtml = defineRule({\n create(context: RuleContext) {\n return {\n AssignmentExpression(node: AstNode) {\n if (!isHtmlSinkTarget(node.left as AstNode)) return;\n context.report({ node, message: MESSAGE });\n },\n };\n },\n});\n","import { defineRule } from '../../../define-rule.js';\nimport type { AstNode, RuleContext } from '../../../types.js';\n\nconst DOCS_URL =\n 'https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html';\nconst MESSAGE = `Hardcoded secret in source. Committed secrets leak in the client bundle and git history. Move it to an environment variable or a server-only runtime config. See ${DOCS_URL}`;\n\n// High-signal secret token shapes. Conservative on purpose: each pattern is a\n// well-known credential prefix/format, not a generic \"looks long\" heuristic.\nconst SECRET_VALUE_PATTERNS: readonly RegExp[] = [\n /\\bsk-[A-Za-z0-9-]{10,}\\b/,\n /\\bghp_[A-Za-z0-9]{20,}\\b/,\n /\\bgithub_pat_[A-Za-z0-9_]{20,}\\b/,\n /\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b/,\n /\\bAKIA[0-9A-Z]{16}\\b/,\n /\\bAIza[0-9A-Za-z_-]{20,}\\b/,\n];\n\n// Identifier names that strongly imply a secret. Paired with a long string\n// literal value to avoid flagging env reads or short non-secret strings.\nconst SECRET_NAME =\n /^(api[-_]?secret|api[-_]?key|secret[-_]?key|private[-_]?key|access[-_]?token|auth[-_]?token|client[-_]?secret|password|passwd|jwt[-_]?secret)$/i;\nconst MIN_NAMED_SECRET_LENGTH = 8;\n\nfunction stringValue(node: AstNode | undefined): string | undefined {\n if (node?.type === 'Literal' && typeof node.value === 'string') {\n return node.value;\n }\n return undefined;\n}\n\nfunction isHighSignalSecret(value: string): boolean {\n return SECRET_VALUE_PATTERNS.some((pattern) => pattern.test(value));\n}\n\nexport const noSecretsInSource = defineRule({\n create(context: RuleContext) {\n const reported = new Set<AstNode>();\n\n function report(node: AstNode): void {\n if (reported.has(node)) return;\n reported.add(node);\n context.report({ node, message: MESSAGE });\n }\n\n function checkNamedAssignment(\n name: string | undefined,\n valueNode: AstNode | undefined,\n ): void {\n if (name === undefined || !SECRET_NAME.test(name)) return;\n if (!valueNode) return;\n const value = stringValue(valueNode);\n if (value === undefined || value.length < MIN_NAMED_SECRET_LENGTH) return;\n report(valueNode);\n }\n\n return {\n Literal(node: AstNode) {\n if (typeof node.value !== 'string') return;\n if (isHighSignalSecret(node.value)) report(node);\n },\n VariableDeclarator(node: AstNode) {\n const id = node.id as AstNode;\n if (id.type !== 'Identifier') return;\n checkNamedAssignment(\n id.name as string,\n node.init as AstNode | undefined,\n );\n },\n Property(node: AstNode) {\n const key = node.key as AstNode;\n const name =\n key.type === 'Identifier' ? (key.name as string) : stringValue(key);\n checkNamedAssignment(name, node.value as AstNode | undefined);\n },\n };\n },\n});\n","import { defineRule } from '../../define-rule.js';\nimport type { CoreRule } from '../../types.js';\nimport { noDestructurePropsWithoutToRefs } from './ai-slop/no-destructure-props-without-toRefs.js';\nimport { noDestructureReactiveWithoutToRefs } from './ai-slop/no-destructure-reactive-without-toRefs.js';\nimport { noEmDashInString } from './ai-slop/no-em-dash-in-string.js';\nimport { noImportsFromVueWhenAutoImported } from './ai-slop/no-imports-from-vue-when-auto-imported.js';\nimport { noNonNullAssertionOnRefValue } from './ai-slop/no-non-null-assertion-on-ref-value.js';\nimport { definePropsTyped } from './composition/defineProps-typed.js';\nimport { noPiniaStoreInSetup } from './composition/no-pinia-store-in-setup.js';\nimport { preferScriptSetupForNewFiles } from './composition/prefer-script-setup-for-new-files.js';\nimport { preferDefineAsyncComponentOnRoute } from './performance/prefer-defineAsyncComponent-on-route.js';\nimport { preferModuleScopePureFunction } from './performance/prefer-module-scope-pure-function.js';\nimport { preferModuleScopeStaticValue } from './performance/prefer-module-scope-static-value.js';\nimport { preferStableEmptyFallback } from './performance/prefer-stable-empty-fallback.js';\nimport { noFreshDepsInWatch } from './reactivity/no-fresh-deps-in-watch.js';\nimport { preferReadonlyForInjected } from './reactivity/prefer-readonly-for-injected.js';\nimport { preferShallowRefForLargeData } from './reactivity/prefer-shallowRef-for-large-data.js';\nimport { watchWithoutCleanup } from './reactivity/watch-without-cleanup.js';\nimport { noAuthTokenInWebStorage } from './security/no-auth-token-in-web-storage.js';\nimport { noEvalLike } from './security/no-eval-like.js';\nimport { noInnerHtml } from './security/no-inner-html.js';\nimport { noSecretsInSource } from './security/no-secrets-in-source.js';\n\nfunction coreRule(\n id: string,\n category: CoreRule['category'],\n severity: CoreRule['severity'],\n recommended: boolean,\n rule: Omit<CoreRule, 'id' | 'category' | 'severity' | 'recommended'>,\n): CoreRule {\n return { id, category, severity, recommended, ...rule };\n}\n\nexport const VUE_RULES: readonly CoreRule[] = [\n coreRule(\n 'no-em-dash-in-string',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noEmDashInString),\n ),\n coreRule(\n 'no-destructure-props-without-to-refs',\n 'ai-slop',\n 'error',\n true,\n defineRule(noDestructurePropsWithoutToRefs),\n ),\n coreRule(\n 'no-destructure-reactive-without-to-refs',\n 'ai-slop',\n 'error',\n true,\n defineRule(noDestructureReactiveWithoutToRefs),\n ),\n coreRule(\n 'no-non-null-assertion-on-ref-value',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noNonNullAssertionOnRefValue),\n ),\n coreRule(\n 'no-imports-from-vue-when-auto-imported',\n 'ai-slop',\n 'warn',\n true,\n defineRule(noImportsFromVueWhenAutoImported),\n ),\n coreRule(\n 'reactivity/watch-without-cleanup',\n 'reactivity',\n 'warn',\n true,\n defineRule(watchWithoutCleanup),\n ),\n coreRule(\n 'reactivity/prefer-shallowRef-for-large-data',\n 'reactivity',\n 'info',\n false,\n defineRule(preferShallowRefForLargeData),\n ),\n coreRule(\n 'reactivity/prefer-readonly-for-injected',\n 'reactivity',\n 'info',\n false,\n defineRule(preferReadonlyForInjected),\n ),\n coreRule(\n 'reactivity/no-fresh-deps-in-watch',\n 'reactivity',\n 'warn',\n true,\n defineRule(noFreshDepsInWatch),\n ),\n coreRule(\n 'composition/prefer-script-setup-for-new-files',\n 'composition',\n 'warn',\n true,\n defineRule(preferScriptSetupForNewFiles),\n ),\n coreRule(\n 'composition/defineProps-typed',\n 'composition',\n 'warn',\n true,\n defineRule(definePropsTyped),\n ),\n coreRule(\n 'composition/no-pinia-store-in-setup',\n 'composition',\n 'warn',\n true,\n defineRule(noPiniaStoreInSetup),\n ),\n coreRule(\n 'performance/prefer-defineAsyncComponent-on-route',\n 'performance',\n 'info',\n false,\n defineRule(preferDefineAsyncComponentOnRoute),\n ),\n coreRule(\n 'performance/prefer-module-scope-static-value',\n 'performance',\n 'info',\n false,\n defineRule(preferModuleScopeStaticValue),\n ),\n coreRule(\n 'performance/prefer-module-scope-pure-function',\n 'performance',\n 'info',\n false,\n defineRule(preferModuleScopePureFunction),\n ),\n coreRule(\n 'performance/prefer-stable-empty-fallback',\n 'performance',\n 'warn',\n true,\n defineRule(preferStableEmptyFallback),\n ),\n coreRule(\n 'security/no-inner-html',\n 'security',\n 'error',\n true,\n defineRule(noInnerHtml),\n ),\n coreRule(\n 'security/no-eval-like',\n 'security',\n 'error',\n true,\n defineRule(noEvalLike),\n ),\n coreRule(\n 'security/no-auth-token-in-web-storage',\n 'security',\n 'warn',\n true,\n defineRule(noAuthTokenInWebStorage),\n ),\n coreRule(\n 'security/no-secrets-in-source',\n 'security',\n 'warn',\n true,\n defineRule(noSecretsInSource),\n ),\n];\n"],"mappings":";AAEA,SAAgB,WAAW,MAAkB;CAC3C,MAAM,UAAU,KAAK;CACrB,IAAI,CAAC,SAAS,OAAO;CACrB,OAAO;EACL,GAAG;EACH,MAAM;GAAE,GAAG,KAAK;GAAM,SAAS;EAAO;EACtC,OAAO,SAAsB;GAC3B,MAAM,UAAuB;IAC3B,GAAG;IACH,OAAO,YAAY;KACjB,MAAM,cAAc,QAAQ,WAAW,IAAI;KAC3C,IAAI,gBAAgB,MAAM;MACxB,QAAQ,OAAO,UAAU;MACzB;KACF;KACA,QAAQ,OAAO;MACb,GAAG;MACH,MAAM,UAAU,MAAM,YAAY,WAAW,MAAM,WAAW;KAChE,CAAC;IACH;GACF;GACA,OAAO,KAAK,OAAO,OAAO;EAC5B;CACF;AACF;;;AC1BA,MAAa,oBAAyC,IAAI,IAAI;CAC5D;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;AACF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C7B;CACA,SACE,wCACA,WACA,SACA,MACA,WAAW,+BAA+B,CAC5C;CACA,SACE,2CACA,WACA,SACA,MACA,WAAW,kCAAkC,CAC/C;CACA,SACE,sCACA,WACA,QACA,MACA,WAAW,4BAA4B,CACzC;CACA,SACE,0CACA,WACA,QACA,MACA,WAAW,gCAAgC,CAC7C;CACA,SACE,oCACA,cACA,QACA,MACA,WAAW,mBAAmB,CAChC;CACA,SACE,+CACA,cACA,QACA,OACA,WAAW,4BAA4B,CACzC;CACA,SACE,2CACA,cACA,QACA,OACA,WAAW,yBAAyB,CACtC;CACA,SACE,qCACA,cACA,QACA,MACA,WAAW,kBAAkB,CAC/B;CACA,SACE,iDACA,eACA,QACA,MACA,WAAW,4BAA4B,CACzC;CACA,SACE,iCACA,eACA,QACA,MACA,WAAW,gBAAgB,CAC7B;CACA,SACE,uCACA,eACA,QACA,MACA,WAAW,mBAAmB,CAChC;CACA,SACE,oDACA,eACA,QACA,OACA,WAAW,iCAAiC,CAC9C;CACA,SACE,gDACA,eACA,QACA,OACA,WAAW,4BAA4B,CACzC;CACA,SACE,iDACA,eACA,QACA,OACA,WAAW,6BAA6B,CAC1C;CACA,SACE,4CACA,eACA,QACA,MACA,WAAW,yBAAyB,CACtC;CACA,SACE,0BACA,YACA,SACA,MACA,WAAW,WAAW,CACxB;CACA,SACE,yBACA,YACA,SACA,MACA,WAAW,UAAU,CACvB;CACA,SACE,yCACA,YACA,QACA,MACA,WAAW,uBAAuB,CACpC;CACA,SACE,iCACA,YACA,QACA,MACA,WAAW,iBAAiB,CAC9B;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoql/doctor-rule-core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "description": "Linter-neutral rule cores shared by @geoql/oxlint-plugin-vue-doctor, @geoql/oxlint-plugin-nuxt-doctor, and the future ESLint plugin. ESTree/JS-AST only.",
6
6
  "keywords": [
@@ -41,8 +41,8 @@
41
41
  "access": "public"
42
42
  },
43
43
  "devDependencies": {
44
- "@types/node": "^25.9.3",
45
- "oxc-parser": "0.133.0",
44
+ "@types/node": "^25.9.4",
45
+ "oxc-parser": "^0.137.0",
46
46
  "typescript": "^6.0.3",
47
47
  "vitest": "^4.1.9"
48
48
  },