@geoql/doctor-rule-core 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +74 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -455,6 +455,50 @@ const SSR_UNSAFE_GLOBALS = new Set([
|
|
|
455
455
|
"localStorage",
|
|
456
456
|
"sessionStorage"
|
|
457
457
|
]);
|
|
458
|
+
const TYPE_PARENT_TYPES = new Set([
|
|
459
|
+
"TSInterfaceBody",
|
|
460
|
+
"TSTypeLiteral",
|
|
461
|
+
"TSPropertySignature",
|
|
462
|
+
"TSTypeAnnotation",
|
|
463
|
+
"TSTypeReference"
|
|
464
|
+
]);
|
|
465
|
+
function isInsideTypeContext(node) {
|
|
466
|
+
let current = node.parent;
|
|
467
|
+
while (current) {
|
|
468
|
+
if (TYPE_PARENT_TYPES.has(current.type)) return true;
|
|
469
|
+
current = current.parent;
|
|
470
|
+
}
|
|
471
|
+
return false;
|
|
472
|
+
}
|
|
473
|
+
function isImportMetaClientExpression(node) {
|
|
474
|
+
if (node.type !== "MemberExpression") return false;
|
|
475
|
+
if (node.property.name !== "client") return false;
|
|
476
|
+
const object = node.object;
|
|
477
|
+
return object.type === "MetaProperty" && object.meta?.name === "import" && object.property?.name === "meta";
|
|
478
|
+
}
|
|
479
|
+
function containsImportMetaClient(node) {
|
|
480
|
+
if (isImportMetaClientExpression(node)) return true;
|
|
481
|
+
for (const key of Object.keys(node)) {
|
|
482
|
+
if (key === "parent" || key === "loc") continue;
|
|
483
|
+
const value = node[key];
|
|
484
|
+
const children = Array.isArray(value) ? value : [value];
|
|
485
|
+
for (const child of children) if (child && typeof child === "object" && child.type) {
|
|
486
|
+
if (containsImportMetaClient(child)) return true;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
function isGuardedByImportMetaClient(node) {
|
|
492
|
+
let current = node.parent;
|
|
493
|
+
while (current) {
|
|
494
|
+
if (current.type === "IfStatement" || current.type === "ConditionalExpression") {
|
|
495
|
+
const test = current.test;
|
|
496
|
+
if (test && containsImportMetaClient(test)) return true;
|
|
497
|
+
}
|
|
498
|
+
current = current.parent;
|
|
499
|
+
}
|
|
500
|
+
return false;
|
|
501
|
+
}
|
|
458
502
|
const noDocumentInSetup = defineRule({ create(context) {
|
|
459
503
|
const functionDepthStack = [];
|
|
460
504
|
return {
|
|
@@ -478,7 +522,10 @@ const noDocumentInSetup = defineRule({ create(context) {
|
|
|
478
522
|
},
|
|
479
523
|
Identifier(node) {
|
|
480
524
|
if (functionDepthStack.length > 0) return;
|
|
481
|
-
if (SSR_UNSAFE_GLOBALS.has(node.name))
|
|
525
|
+
if (!SSR_UNSAFE_GLOBALS.has(node.name)) return;
|
|
526
|
+
if (isInsideTypeContext(node)) return;
|
|
527
|
+
if (isGuardedByImportMetaClient(node)) return;
|
|
528
|
+
context.report({
|
|
482
529
|
node,
|
|
483
530
|
message: MESSAGE$21
|
|
484
531
|
});
|
|
@@ -602,11 +649,31 @@ function isToRefsCall$1(node) {
|
|
|
602
649
|
}
|
|
603
650
|
const noDestructurePropsWithoutToRefs = defineRule({ create(context) {
|
|
604
651
|
const propsSources = /* @__PURE__ */ new Set();
|
|
652
|
+
const functionStack = [];
|
|
653
|
+
let pendingSetupFn;
|
|
605
654
|
function registerSetupParam(fn) {
|
|
606
655
|
const first = (fn?.params)?.[0];
|
|
607
656
|
if (first?.type === "Identifier") propsSources.add(first.name);
|
|
608
657
|
}
|
|
658
|
+
function enterFunction(node) {
|
|
659
|
+
const isSetup = node === pendingSetupFn;
|
|
660
|
+
if (isSetup) pendingSetupFn = void 0;
|
|
661
|
+
functionStack.push({ isSetup });
|
|
662
|
+
}
|
|
663
|
+
function exitFunction() {
|
|
664
|
+
functionStack.pop();
|
|
665
|
+
}
|
|
666
|
+
function isOneTimeContext() {
|
|
667
|
+
const top = functionStack[functionStack.length - 1];
|
|
668
|
+
return top === void 0 || top.isSetup;
|
|
669
|
+
}
|
|
609
670
|
return {
|
|
671
|
+
FunctionExpression: enterFunction,
|
|
672
|
+
"FunctionExpression:exit": exitFunction,
|
|
673
|
+
ArrowFunctionExpression: enterFunction,
|
|
674
|
+
"ArrowFunctionExpression:exit": exitFunction,
|
|
675
|
+
FunctionDeclaration: enterFunction,
|
|
676
|
+
"FunctionDeclaration:exit": exitFunction,
|
|
610
677
|
VariableDeclarator(node) {
|
|
611
678
|
const id = node.id;
|
|
612
679
|
const init = node.init;
|
|
@@ -616,14 +683,18 @@ const noDestructurePropsWithoutToRefs = defineRule({ create(context) {
|
|
|
616
683
|
}
|
|
617
684
|
if (id.type !== "ObjectPattern" || !init) return;
|
|
618
685
|
if (isToRefsCall$1(init)) return;
|
|
619
|
-
if (isDefinePropsCall(init) || init.type === "Identifier" && propsSources.has(init.name)) context.report({
|
|
686
|
+
if ((isDefinePropsCall(init) || init.type === "Identifier" && propsSources.has(init.name)) && isOneTimeContext()) context.report({
|
|
620
687
|
node,
|
|
621
688
|
message: MESSAGE$17
|
|
622
689
|
});
|
|
623
690
|
},
|
|
624
691
|
Property(node) {
|
|
625
692
|
const key = node.key;
|
|
626
|
-
if (key?.type === "Identifier" && key.name === "setup")
|
|
693
|
+
if (key?.type === "Identifier" && key.name === "setup") {
|
|
694
|
+
const fn = node.value;
|
|
695
|
+
registerSetupParam(fn);
|
|
696
|
+
pendingSetupFn = fn;
|
|
697
|
+
}
|
|
627
698
|
}
|
|
628
699
|
};
|
|
629
700
|
} });
|
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","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,CAAC;AAED,MAAa,qBAA0C,IAAI,IAAI;CAC7D,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;AC3DD,MAAMA,aAAW;AACjB,MAAMC,kBAAgB,qFAAqFD;AAC3G,MAAME,sBAAoB,qGAAqGF;AAE/H,MAAM,sBAAsB,IAAI,IAAI;CAAC;CAAO;CAAY;CAAc;AAAM,CAAC;AAE7E,SAASG,+BAA6B,MAAwB;CAC5D,IAAI,KAAK,eAAe,QAAQ,OAAO;CACvC,MAAM,WAAW,KA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tC;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"}
|
|
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\nconst TYPE_PARENT_TYPES = new Set([\n 'TSInterfaceBody',\n 'TSTypeLiteral',\n 'TSPropertySignature',\n 'TSTypeAnnotation',\n 'TSTypeReference',\n]);\n\nfunction isInsideTypeContext(node: AstNode): boolean {\n let current: AstNode | undefined = node.parent;\n while (current) {\n if (TYPE_PARENT_TYPES.has(current.type)) return true;\n current = current.parent;\n }\n return false;\n}\n\nfunction isImportMetaClientExpression(node: AstNode): boolean {\n if (node.type !== 'MemberExpression') return false;\n if ((node.property as { name?: string }).name !== 'client') return false;\n const object = node.object as AstNode;\n return (\n object.type === 'MetaProperty' &&\n (object as { meta?: { name?: string } }).meta?.name === 'import' &&\n (object as { property?: { name?: string } }).property?.name === 'meta'\n );\n}\n\nfunction containsImportMetaClient(node: AstNode): boolean {\n if (isImportMetaClientExpression(node)) return true;\n for (const key of Object.keys(node)) {\n if (key === 'parent' || key === 'loc') continue;\n const value = node[key];\n const children = Array.isArray(value) ? value : [value];\n for (const child of children) {\n if (child && typeof child === 'object' && (child as AstNode).type) {\n if (containsImportMetaClient(child as AstNode)) return true;\n }\n }\n }\n return false;\n}\n\nfunction isGuardedByImportMetaClient(node: AstNode): boolean {\n let current: AstNode | undefined = node.parent;\n while (current) {\n if (\n current.type === 'IfStatement' ||\n current.type === 'ConditionalExpression'\n ) {\n const test = (current as { test?: AstNode }).test;\n if (test && containsImportMetaClient(test)) return true;\n }\n current = current.parent;\n }\n return false;\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)) return;\n if (isInsideTypeContext(node)) return;\n if (isGuardedByImportMetaClient(node)) 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/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 const functionStack: { isSetup: boolean }[] = [];\n let pendingSetupFn: AstNode | undefined;\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 function enterFunction(node: AstNode): void {\n const isSetup = node === pendingSetupFn;\n if (isSetup) pendingSetupFn = undefined;\n functionStack.push({ isSetup });\n }\n\n function exitFunction(): void {\n functionStack.pop();\n }\n\n // Reactivity is lost only for a one-time destructure: module scope\n // (`<script setup>`) or the setup() body. Nested in a re-running function\n // (computed/watch/handler) props.* is re-read each call, so it stays reactive.\n function isOneTimeContext(): boolean {\n const top = functionStack[functionStack.length - 1];\n return top === undefined || top.isSetup;\n }\n\n return {\n FunctionExpression: enterFunction,\n 'FunctionExpression:exit': exitFunction,\n ArrowFunctionExpression: enterFunction,\n 'ArrowFunctionExpression:exit': exitFunction,\n FunctionDeclaration: enterFunction,\n 'FunctionDeclaration:exit': exitFunction,\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 && isOneTimeContext())\n 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 const fn = node.value as AstNode;\n registerSetupParam(fn);\n pendingSetupFn = fn;\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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,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.2.
|
|
3
|
+
"version": "1.2.1",
|
|
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": [
|