@ai-i18n/eslint-plugin 1.0.0-alpha.26 → 1.0.0-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -417,6 +417,5 @@ export default [
|
|
|
417
417
|
|
|
418
418
|
插件不会自动修改宿主 ESLint 配置。
|
|
419
419
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
检测。
|
|
420
|
+
诊断默认按当前 Node locale 选择语言:中文 locale 使用中文,其他 locale 回退英文。设置
|
|
421
|
+
`AI_I18N_DIAGNOSTIC_LOCALE=zh-CN` 或 `en-US` 可以固定语言,`auto` 恢复自动检测。
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { AI_I18N_VIRTUAL_MODULE_ID, Analyzer, diagnosticMessage, extractMessages, findInvalidDefineI18nMessagesReferences, findTranslationCalls, findUnboundCalls, validateRecommendedUsage } from "@ai-i18n/analyzer";
|
|
2
|
+
import { AI_I18N_VIRTUAL_MODULE_ID, Analyzer, diagnosticMessage, extractMessages, findInvalidDefineI18nMessagesReferences, findRuntimeTypedLocalTranslationCalls, findTranslationCalls, findUnboundCalls, validateRecommendedUsage } from "@ai-i18n/analyzer";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createFilesMatcher, createPathsMatcher, parseTsconfig } from "get-tsconfig";
|
|
@@ -323,7 +323,7 @@ function analyzeStaticSource(code, filename, tsconfigPath, lang, autoImport = fa
|
|
|
323
323
|
return {
|
|
324
324
|
warnings: (recommended.length ? [
|
|
325
325
|
...extraction.warnings.filter((warning) => warning.code === "parse-error"),
|
|
326
|
-
...extraction.warnings.filter((warning) => warning.code === "static-candidate-limit"),
|
|
326
|
+
...extraction.warnings.filter((warning) => warning.code === "static-candidate-limit" || warning.code === "unrecognized-runtime-t-binding"),
|
|
327
327
|
...recommended
|
|
328
328
|
] : extraction.warnings).map(({ code: warningCode, line, column, message }) => ({
|
|
329
329
|
code: warningCode,
|
|
@@ -358,7 +358,7 @@ function hasTranslationCandidate(module, autoImports) {
|
|
|
358
358
|
if (autoImports.tRef) unbound.push("tRef");
|
|
359
359
|
if (autoImports.tComputed) unbound.push("tComputed");
|
|
360
360
|
if (autoImports.useI18n) unbound.push("useI18n");
|
|
361
|
-
return module.imports.some((item) => !item.typeOnly && (item.specifier === AI_I18N_VIRTUAL_MODULE_ID || item.name === "t" || item.name === "tRef" || item.name === "tComputed" || item.name === "useI18n")) || findInvalidDefineI18nMessagesReferences(module).length > 0 || findUnboundCalls(module, new Set(unbound)).length > 0;
|
|
361
|
+
return module.imports.some((item) => !item.typeOnly && (item.specifier === AI_I18N_VIRTUAL_MODULE_ID || item.name === "t" || item.name === "tRef" || item.name === "tComputed" || item.name === "useI18n")) || findInvalidDefineI18nMessagesReferences(module).length > 0 || findRuntimeTypedLocalTranslationCalls(module).length > 0 || findUnboundCalls(module, new Set(unbound)).length > 0;
|
|
362
362
|
}
|
|
363
363
|
function translationHooks(autoImports) {
|
|
364
364
|
return [{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isFile","normalizeAutoImports","normalizeAutoImports","isDirectOptionsFunction","isDirectOptionsFunction","RUNTIME_MODULE","isDirectOptionsFunction","RUNTIME_MODULE","findVariable","container"],"sources":["../src/auto-imports.ts","../src/tsconfig-projects.ts","../src/resolve-import.ts","../src/analyze.ts","../src/vue-sfc.ts","../src/rule-analysis.ts","../src/rules/common/translation-call.ts","../src/rules/common/ast-context.ts","../src/rules/vue/options.ts","../src/rules/common/no-eager-translation.ts","../src/rules/common/no-embedded-markup.ts","../src/rules/common/no-redundant-auto-import.ts","../src/rules/vue/runtime-state.ts","../src/rules/common/no-unsubscribed-runtime-state.ts","../src/rules/react/no-unsubscribed-t.ts","../src/rules/vue/instance-member.ts","../src/rules/vue/no-unsubscribed-t.ts","../src/rules/common/no-unsubscribed-t.ts","../src/rules/common/static-candidate-limit.ts","../src/rules/common/t-static-args.ts","../src/index.ts"],"sourcesContent":["export const RUNTIME_AUTO_IMPORTS = [\n 't',\n 'setLang',\n 'getLang',\n 'getLangs',\n 'getLangLoadState',\n 'subscribe',\n] as const;\n\nexport const VUE_AUTO_IMPORTS = [\n 'useI18n',\n ...RUNTIME_AUTO_IMPORTS,\n 'tRef',\n 'i18nComputed',\n 'tComputed',\n] as const;\n\nexport const REACT_AUTO_IMPORTS = ['useI18n', ...RUNTIME_AUTO_IMPORTS] as const;\n\nexport const ALL_AUTO_IMPORT_APIS = [...VUE_AUTO_IMPORTS] as const;\n\nexport type AutoImportApi = (typeof ALL_AUTO_IMPORT_APIS)[number];\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport {\n createFilesMatcher,\n createPathsMatcher,\n parseTsconfig,\n type FileMatcher,\n type PathsMatcher,\n type TsConfigResult,\n} from 'get-tsconfig';\nimport picomatch from 'picomatch';\n\nconst PROJECT_CACHE_TTL_MS = 250;\nconst MAX_PROJECT_CACHE_ENTRIES = 1_000;\nconst READ_FILE_CACHE_PREFIX = 'readFileSync:';\nconst READ_FILE_CACHE_SUFFIX = ':utf8';\n\ninterface TsConfigProject {\n config: TsConfigResult;\n filesMatcher: FileMatcher;\n pathsMatcher: PathsMatcher | null;\n}\n\ninterface CachedProjectGraph {\n expiresAt: number;\n projects: TsConfigProject[];\n stamps: Map<string, string | null>;\n}\n\ninterface CachedDiscovery {\n expiresAt: number;\n configPath: string | null;\n}\n\nconst projectGraphCache = new Map<string, CachedProjectGraph>();\nconst discoveryCache = new Map<string, CachedDiscovery>();\n\nexport function createTsconfigResolver(tsconfigPath?: string) {\n const explicitRoot = tsconfigPath\n ? path.normalize(path.resolve(tsconfigPath))\n : undefined;\n\n return (specifier: string, importer: string): readonly string[] => {\n const rootConfig = explicitRoot ?? findNearestProjectConfig(importer);\n if (!rootConfig) return [];\n const project = selectProject(loadProjectGraph(rootConfig), importer);\n return project?.pathsMatcher?.(specifier) ?? [];\n };\n}\n\nfunction findNearestProjectConfig(importer: string): string | null {\n let directory = path.dirname(path.resolve(importer));\n const now = Date.now();\n const cached = discoveryCache.get(directory);\n if (cached && cached.expiresAt > now) return cached.configPath;\n const visited: string[] = [];\n\n for (;;) {\n visited.push(directory);\n for (const filename of ['tsconfig.json', 'jsconfig.json']) {\n const candidate = path.join(directory, filename);\n if (isFile(candidate)) {\n cacheDiscovery(visited, candidate, now);\n return candidate;\n }\n }\n const parent = path.dirname(directory);\n if (parent === directory) {\n cacheDiscovery(visited, null, now);\n return null;\n }\n directory = parent;\n }\n}\n\nfunction cacheDiscovery(\n directories: readonly string[],\n configPath: string | null,\n now: number,\n) {\n if (discoveryCache.size >= MAX_PROJECT_CACHE_ENTRIES) {\n discoveryCache.clear();\n }\n for (const directory of directories) {\n discoveryCache.set(directory, {\n expiresAt: now + PROJECT_CACHE_TTL_MS,\n configPath,\n });\n }\n}\n\nfunction loadProjectGraph(rootConfig: string): readonly TsConfigProject[] {\n const cached = projectGraphCache.get(rootConfig);\n if (cached && projectGraphIsFresh(cached)) return cached.projects;\n\n const projects: TsConfigProject[] = [];\n const stamps = new Map<string, string | null>();\n const parsingCache = new Map<string, string>();\n const visited = new Set<string>();\n visitProject(rootConfig, projects, stamps, parsingCache, visited);\n\n if (projectGraphCache.size >= MAX_PROJECT_CACHE_ENTRIES) {\n projectGraphCache.clear();\n }\n projectGraphCache.set(rootConfig, {\n expiresAt: Date.now() + PROJECT_CACHE_TTL_MS,\n projects,\n stamps,\n });\n return projects;\n}\n\nfunction visitProject(\n filename: string,\n projects: TsConfigProject[],\n stamps: Map<string, string | null>,\n parsingCache: Map<string, string>,\n visited: Set<string>,\n) {\n filename = path.normalize(path.resolve(filename));\n if (visited.has(filename)) return;\n visited.add(filename);\n stamps.set(filename, readFileStamp(filename));\n\n let config: TsConfigResult;\n try {\n config = {\n path: filename,\n config: parseTsconfig(filename, parsingCache),\n };\n captureParsedConfigStamps(parsingCache, stamps);\n } catch {\n return;\n }\n\n // references 按声明顺序优先于 solution config 本身,匹配具体项目后再回退根配置。\n for (const reference of config.config.references ?? []) {\n const referenced = resolveReference(filename, reference.path);\n if (referenced) {\n visitProject(referenced, projects, stamps, parsingCache, visited);\n }\n }\n\n try {\n projects.push({\n config,\n filesMatcher: createProjectFilesMatcher(config),\n pathsMatcher: createCompatiblePathsMatcher(config),\n });\n } catch {\n // 无效的 include、exclude 或 paths 与当前项目不提供 alias 等价。\n }\n}\n\nfunction createProjectFilesMatcher(config: TsConfigResult): FileMatcher {\n if (\n path.basename(config.path).toLowerCase() !== 'jsconfig.json' ||\n config.config.compilerOptions?.allowJs !== undefined\n ) {\n return createFilesMatcher(config);\n }\n return createFilesMatcher({\n ...config,\n config: {\n ...config.config,\n compilerOptions: {\n ...config.config.compilerOptions,\n allowJs: true,\n },\n },\n });\n}\n\nfunction captureParsedConfigStamps(\n parsingCache: ReadonlyMap<string, unknown>,\n stamps: Map<string, string | null>,\n) {\n // get-tsconfig 的共享缓存会列出 extends 链读取过的文件,一并纳入失效判断。\n for (const key of parsingCache.keys()) {\n if (\n !key.startsWith(READ_FILE_CACHE_PREFIX) ||\n !key.endsWith(READ_FILE_CACHE_SUFFIX)\n ) {\n continue;\n }\n const filename = key.slice(\n READ_FILE_CACHE_PREFIX.length,\n -READ_FILE_CACHE_SUFFIX.length,\n );\n stamps.set(filename, readFileStamp(filename));\n }\n}\n\nfunction createCompatiblePathsMatcher(\n config: TsConfigResult,\n): PathsMatcher | null {\n const compilerOptions = config.config.compilerOptions;\n const paths = compilerOptions?.paths;\n if (!paths || compilerOptions.baseUrl) return createPathsMatcher(config);\n\n // TS 5.x/6.x 接受无 baseUrl 时不带 \"./\" 的 target;get-tsconfig 默认更严格。\n const compatiblePaths = Object.fromEntries(\n Object.entries(paths).map(([pattern, targets]) => [\n pattern,\n targets.map((target) =>\n path.isAbsolute(target) || target.startsWith('.')\n ? target\n : `./${target}`,\n ),\n ]),\n );\n return createPathsMatcher({\n path: config.path,\n config: {\n ...config.config,\n compilerOptions: {\n ...compilerOptions,\n paths: compatiblePaths,\n },\n },\n });\n}\n\nfunction resolveReference(\n ownerConfig: string,\n referencePath: string,\n): string | null {\n const candidate = path.resolve(path.dirname(ownerConfig), referencePath);\n const attempts = [\n candidate,\n candidate.endsWith('.json') ? candidate : `${candidate}.json`,\n path.join(candidate, 'tsconfig.json'),\n ];\n return attempts.find(isFile) ?? null;\n}\n\nfunction selectProject(\n projects: readonly TsConfigProject[],\n importer: string,\n): TsConfigProject | undefined {\n const absoluteImporter = path.resolve(importer);\n return projects.find((project) =>\n projectMatchesImporter(project, absoluteImporter),\n );\n}\n\nfunction projectMatchesImporter(\n project: TsConfigProject,\n importer: string,\n): boolean {\n if (path.extname(importer) !== '.vue') {\n return Boolean(project.filesMatcher(importer));\n }\n return matchesExplicitVueInput(project.config, importer);\n}\n\nfunction matchesExplicitVueInput(\n { config, path: configPath }: TsConfigResult,\n importer: string,\n): boolean {\n const directory = path.dirname(configPath);\n const relative = normalizePath(path.relative(directory, importer));\n if (relative.startsWith('../')) return false;\n\n if (\n config.files?.some(\n (file) => path.resolve(directory, file) === path.resolve(importer),\n )\n ) {\n return true;\n }\n if (config.exclude?.some((pattern) => matchesExclude(relative, pattern))) {\n return false;\n }\n return Boolean(\n config.include?.some(\n (pattern) =>\n pattern.includes('.vue') &&\n picomatch.isMatch(relative, normalizePath(pattern), { dot: true }),\n ),\n );\n}\n\nfunction matchesExclude(relative: string, pattern: string): boolean {\n pattern = normalizePath(pattern).replace(/\\/+$/, '');\n return (\n picomatch.isMatch(relative, pattern, { dot: true }) ||\n picomatch.isMatch(relative, `${pattern}/**`, { dot: true })\n );\n}\n\nfunction projectGraphIsFresh(cached: CachedProjectGraph): boolean {\n if (cached.expiresAt <= Date.now()) return false;\n for (const [filename, stamp] of cached.stamps) {\n if (readFileStamp(filename) !== stamp) return false;\n }\n return true;\n}\n\nfunction readFileStamp(filename: string): string | null {\n try {\n const stat = fs.statSync(filename);\n return stat.isFile()\n ? `${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`\n : null;\n } catch {\n return null;\n }\n}\n\nfunction isFile(filename: string): boolean {\n try {\n return fs.statSync(filename).isFile();\n } catch {\n return false;\n }\n}\n\nfunction normalizePath(filename: string): string {\n return filename.replaceAll('\\\\', '/');\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport { createTsconfigResolver } from './tsconfig-projects.js';\n\nconst SOURCE_EXTENSIONS = [\n '',\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.mts',\n '.mjs',\n] as const;\nconst DIRECTORY_STAMP_TTL_MS = 250;\nconst MAX_PROBE_CACHE_ENTRIES = 10_000;\n\ninterface CachedDirectoryStamp {\n expiresAt: number;\n value: string | null;\n}\n\ninterface CachedProbe {\n candidateDirectory: string | null;\n expiresAt: number;\n parentDirectory: string | null;\n resolved: string | null;\n}\n\nconst directoryStampCache = new Map<string, CachedDirectoryStamp>();\nconst probeCache = new Map<string, CachedProbe>();\n\nexport type ImportAlias = Readonly<Record<string, string>>;\n\ninterface AliasEntry {\n find: string;\n replacement: string;\n}\n\nexport function createImportResolver(\n tsconfigPath?: string,\n alias?: ImportAlias,\n) {\n const aliases = normalizeAliases(alias);\n const resolveTsconfig = createTsconfigResolver(tsconfigPath);\n\n return (specifier: string, importer: string): string | null => {\n if (specifier === 'virtual:ai-i18n') return specifier;\n const aliasCandidate = resolveAlias(specifier, aliases);\n if (aliasCandidate) return probeSource(aliasCandidate);\n if (specifier.startsWith('.')) {\n return probeSource(path.resolve(path.dirname(importer), specifier));\n }\n for (const candidate of resolveTsconfig(specifier, importer)) {\n const resolved = probeSource(candidate);\n if (resolved) return resolved;\n }\n return null;\n };\n}\n\nfunction normalizeAliases(\n alias: ImportAlias | undefined,\n): readonly AliasEntry[] {\n return Object.entries(alias ?? {}).map(([find, replacement]) => {\n if (!find) {\n throw new TypeError(\n diagnosticMessage(\n 'ai-i18n alias 的匹配键不能为空。',\n 'The ai-i18n alias match key must not be empty.',\n ),\n );\n }\n if (typeof replacement !== 'string' || !path.isAbsolute(replacement)) {\n throw new TypeError(\n diagnosticMessage(\n `ai-i18n alias \"${find}\" 的 replacement 必须是绝对路径。`,\n `The replacement for ai-i18n alias \"${find}\" must be an absolute path.`,\n ),\n );\n }\n return { find, replacement };\n });\n}\n\nfunction resolveAlias(\n specifier: string,\n aliases: readonly AliasEntry[],\n): string | null {\n for (const { find, replacement } of aliases) {\n if (specifier === find || specifier.startsWith(`${find}/`)) {\n return path.normalize(`${replacement}${specifier.slice(find.length)}`);\n }\n }\n return null;\n}\n\nfunction probeSource(candidate: string): string | null {\n candidate = path.normalize(candidate);\n if (/\\.(?:cjs|cts)$/i.test(candidate)) return null;\n const cached = probeCache.get(candidate);\n if (\n cached &&\n (cached.resolved !== null || cached.expiresAt > Date.now()) &&\n cached.parentDirectory === readDirectoryStamp(path.dirname(candidate)) &&\n cached.candidateDirectory === readDirectoryStamp(candidate)\n ) {\n return cached.resolved;\n }\n\n let resolved: string | null = null;\n for (const extension of SOURCE_EXTENSIONS) {\n const file = `${candidate}${extension}`;\n if (isFile(file)) {\n resolved = path.normalize(file);\n break;\n }\n }\n if (!resolved) {\n for (const extension of SOURCE_EXTENSIONS.slice(1)) {\n const file = path.join(candidate, `index${extension}`);\n if (isFile(file)) {\n resolved = path.normalize(file);\n break;\n }\n }\n }\n if (probeCache.size >= MAX_PROBE_CACHE_ENTRIES) probeCache.clear();\n probeCache.set(candidate, {\n parentDirectory: readDirectoryStamp(path.dirname(candidate)),\n candidateDirectory: readDirectoryStamp(candidate),\n expiresAt: Date.now() + DIRECTORY_STAMP_TTL_MS,\n resolved,\n });\n return resolved;\n}\n\nfunction isFile(file: string) {\n try {\n return fs.statSync(file).isFile();\n } catch {\n return false;\n }\n}\n\nfunction readDirectoryStamp(directory: string): string | null {\n const now = Date.now();\n const cached = directoryStampCache.get(directory);\n if (cached && cached.expiresAt > now) return cached.value;\n let value: string | null = null;\n try {\n const stat = fs.statSync(directory);\n if (stat.isDirectory()) {\n value = `${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`;\n }\n } catch {\n // 不存在的目录也要缓存,避免重复的失败探测。\n }\n if (directoryStampCache.size >= MAX_PROBE_CACHE_ENTRIES) {\n directoryStampCache.clear();\n }\n directoryStampCache.set(directory, {\n expiresAt: now + DIRECTORY_STAMP_TTL_MS,\n value,\n });\n return value;\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport {\n AI_I18N_VIRTUAL_MODULE_ID,\n Analyzer,\n extractMessages,\n findInvalidDefineI18nMessagesReferences,\n findTranslationCalls,\n findUnboundCalls,\n validateRecommendedUsage,\n type Module,\n type ExtractWarningCode,\n type ExtractedMessage,\n type RecommendedUsageCode,\n type AnalysisLanguage,\n type TranslationCall,\n type TranslationHookBinding,\n type TranslationRuntimeApi,\n} from '@ai-i18n/analyzer';\nimport { createImportResolver, type ImportAlias } from './resolve-import.js';\n\nexport interface StaticArgsWarning {\n code: ExtractWarningCode | RecommendedUsageCode;\n line: number;\n column: number;\n message: string;\n}\n\nexport interface StaticAnalysisResult {\n warnings: StaticArgsWarning[];\n translationCalls: TranslationCall[];\n messages: ExtractedMessage[];\n}\n\nexport type AutoImportApi = 't' | 'tRef' | 'tComputed' | 'useI18n';\nexport type AutoImportOption = boolean | readonly AutoImportApi[];\n\ninterface AutoImportBindings {\n t: boolean;\n tRef: boolean;\n tComputed: boolean;\n useI18n: boolean;\n}\n\nconst POTENTIAL_TRANSLATION_RE =\n /virtual:ai-i18n|\\b(?:t|tRef|tComputed|useI18n|defineI18nMessages)\\b/;\n\nexport function analyzeStaticArgs(\n code: string,\n filename: string,\n tsconfigPath?: string,\n lang?: AnalysisLanguage,\n autoImport: AutoImportOption = false,\n maxStaticCandidates = Number.POSITIVE_INFINITY,\n alias?: ImportAlias,\n): StaticArgsWarning[] {\n return analyzeStaticSource(\n code,\n filename,\n tsconfigPath,\n lang,\n autoImport,\n maxStaticCandidates,\n alias,\n ).warnings;\n}\n\nexport function analyzeStaticSource(\n code: string,\n filename: string,\n tsconfigPath?: string,\n lang?: AnalysisLanguage,\n autoImport: AutoImportOption = false,\n maxStaticCandidates = Number.POSITIVE_INFINITY,\n alias?: ImportAlias,\n): StaticAnalysisResult {\n if (!hasPotentialTranslationCandidate(code)) {\n return { warnings: [], translationCalls: [], messages: [] };\n }\n const autoImports = normalizeAutoImports(autoImport);\n const translationAutoImports = runtimeAutoImports(autoImports);\n const resolve = createImportResolver(tsconfigPath, alias);\n const analyzer = new Analyzer({ resolve });\n analyzer.addFile(\n AI_I18N_VIRTUAL_MODULE_ID,\n 'export function t(source) { return source } export function tRef(source) { return source } export function tComputed(source) { return source }',\n );\n const entryPath = normalizeFilename(filename);\n const entry = analyzer.addFile(entryPath, code, lang ? { lang } : undefined);\n if (!hasTranslationCandidate(entry, autoImports)) {\n return { warnings: [], translationCalls: [], messages: [] };\n }\n loadDependencies(analyzer, entry, resolve);\n analyzer.link();\n const hooks = translationHooks(autoImports);\n const extraction = extractMessages(\n entry,\n AI_I18N_VIRTUAL_MODULE_ID,\n hooks,\n translationAutoImports,\n maxStaticCandidates,\n );\n const recommended = validateRecommendedUsage(\n entry,\n AI_I18N_VIRTUAL_MODULE_ID,\n hooks,\n translationAutoImports,\n );\n const warnings = recommended.length\n ? [\n ...extraction.warnings.filter(\n (warning) => warning.code === 'parse-error',\n ),\n ...extraction.warnings.filter(\n (warning) => warning.code === 'static-candidate-limit',\n ),\n ...recommended,\n ]\n : extraction.warnings;\n return {\n warnings: warnings.map(({ code: warningCode, line, column, message }) => ({\n code: warningCode,\n line,\n column,\n message,\n })),\n translationCalls: findTranslationCalls(\n entry,\n AI_I18N_VIRTUAL_MODULE_ID,\n hooks,\n translationAutoImports,\n ),\n messages: extraction.messages,\n };\n}\n\nexport function hasPotentialTranslationCandidate(code: string): boolean {\n return POTENTIAL_TRANSLATION_RE.test(code);\n}\n\nexport function normalizeAutoImports(\n autoImport: AutoImportOption | undefined,\n): AutoImportBindings {\n if (typeof autoImport === 'boolean') {\n // boolean 保留跨框架语义;Vue-only API 由 Vue preset 显式声明。\n return {\n t: autoImport,\n tRef: false,\n tComputed: false,\n useI18n: autoImport,\n };\n }\n return {\n t: autoImport?.includes('t') ?? false,\n tRef: autoImport?.includes('tRef') ?? false,\n tComputed: autoImport?.includes('tComputed') ?? false,\n useI18n: autoImport?.includes('useI18n') ?? false,\n };\n}\n\nfunction hasTranslationCandidate(\n module: Module,\n autoImports: AutoImportBindings,\n): boolean {\n const unbound = ['defineI18nMessages'];\n if (autoImports.t) unbound.push('t');\n if (autoImports.tRef) unbound.push('tRef');\n if (autoImports.tComputed) unbound.push('tComputed');\n if (autoImports.useI18n) unbound.push('useI18n');\n return (\n module.imports.some(\n (item) =>\n !item.typeOnly &&\n (item.specifier === AI_I18N_VIRTUAL_MODULE_ID ||\n item.name === 't' ||\n item.name === 'tRef' ||\n item.name === 'tComputed' ||\n item.name === 'useI18n'),\n ) ||\n findInvalidDefineI18nMessagesReferences(module).length > 0 ||\n findUnboundCalls(module, new Set(unbound)).length > 0\n );\n}\n\nfunction translationHooks(\n autoImports: AutoImportBindings,\n): readonly TranslationHookBinding[] {\n return [\n {\n module: AI_I18N_VIRTUAL_MODULE_ID,\n hook: 'useI18n',\n property: 't',\n autoImport: autoImports.useI18n,\n },\n ];\n}\n\nfunction runtimeAutoImports(\n autoImports: AutoImportBindings,\n): ReadonlySet<TranslationRuntimeApi> {\n const names = new Set<TranslationRuntimeApi>();\n if (autoImports.t) names.add('t');\n if (autoImports.tRef) names.add('tRef');\n if (autoImports.tComputed) names.add('tComputed');\n return names;\n}\n\nfunction loadDependencies(\n analyzer: Analyzer,\n entry: Module,\n resolve: (specifier: string, importer: string) => string | null,\n) {\n const queue = [entry];\n const visited = new Set<string>();\n while (queue.length) {\n const module = queue.shift()!;\n if (visited.has(module.path)) continue;\n visited.add(module.path);\n for (const item of module.imports) {\n const resolved = resolve(item.specifier, module.path);\n if (!resolved || resolved === AI_I18N_VIRTUAL_MODULE_ID) continue;\n let dependency = analyzer.module(resolved);\n if (!dependency) {\n try {\n dependency = analyzer.addFile(\n resolved,\n fs.readFileSync(resolved, 'utf8'),\n );\n } catch {\n continue;\n }\n }\n queue.push(dependency);\n }\n }\n}\n\nfunction normalizeFilename(filename: string) {\n return filename.startsWith('<')\n ? path.resolve('eslint-input.ts')\n : path.resolve(filename);\n}\n","import { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport {\n analyzeVueSource,\n type VueAnalysisSource,\n type VueCompiler,\n} from '@ai-i18n/analyzer/vue';\n\ninterface VueParserServices {\n getDocumentFragment?: () => unknown;\n}\n\ntype Require = ReturnType<typeof createRequire>;\ntype NodeVueCompiler = VueCompiler & {\n registerTS?: (loadTypeScript: () => unknown) => void;\n};\n\nconst packageRequire = createRequire(import.meta.url);\n\nexport function createVueAnalysisSource(\n source: string,\n filename: string,\n parserServices: VueParserServices,\n): VueAnalysisSource {\n if (!parserServices.getDocumentFragment?.()) {\n throw new Error(\n diagnosticMessage(\n '检查 .vue 文件需要配置 vue-eslint-parser。',\n 'Configure vue-eslint-parser to lint .vue files.',\n ),\n );\n }\n\n try {\n // Vue preset 真正处理 SFC 时才加载编译器,不影响 React/Vanilla 项目。\n const compiler = loadVueCompiler(filename);\n return analyzeVueSource(source, filename, compiler);\n } catch (error) {\n if (isMissingVueCompiler(error)) {\n throw new Error(\n diagnosticMessage(\n '检查 .vue 文件需要安装 @vue/compiler-sfc。',\n 'Install @vue/compiler-sfc to lint .vue files.',\n ),\n );\n }\n throw error;\n }\n}\n\nfunction loadVueCompiler(filename: string): VueCompiler {\n const hostRequire = createRequire(path.resolve(filename));\n // 优先复用宿主 Vue 的 Node wrapper,它会为 imported types 注册 TypeScript。\n const compiler = (tryRequire(hostRequire, 'vue/compiler-sfc') ??\n tryRequire(packageRequire, 'vue/compiler-sfc') ??\n tryRequire(hostRequire, '@vue/compiler-sfc') ??\n packageRequire('@vue/compiler-sfc')) as NodeVueCompiler;\n compiler.registerTS?.(() => {\n const typescript =\n tryResolve(hostRequire, 'typescript') ??\n tryResolve(packageRequire, 'typescript');\n return packageRequire(typescript ?? 'typescript');\n });\n return compiler;\n}\n\nfunction tryRequire(require: Require, id: string): unknown {\n const resolved = tryResolve(require, id);\n return resolved ? require(resolved) : null;\n}\n\nfunction tryResolve(require: Require, id: string): string | null {\n try {\n return require.resolve(id);\n } catch (error) {\n if (isMissingVueCompiler(error)) return null;\n throw error;\n }\n}\n\nfunction isMissingVueCompiler(error: unknown): boolean {\n return (\n error instanceof Error &&\n 'code' in error &&\n (error.code === 'MODULE_NOT_FOUND' ||\n error.code === 'ERR_PACKAGE_PATH_NOT_EXPORTED')\n );\n}\n","import type { Rule } from 'eslint';\nimport {\n analyzeStaticSource,\n hasPotentialTranslationCandidate,\n normalizeAutoImports,\n type AutoImportOption,\n type StaticAnalysisResult,\n type StaticArgsWarning,\n} from './analyze.js';\nimport {\n diagnosticMessage,\n type ExtractedMessage,\n type TranslationCall,\n} from '@ai-i18n/analyzer';\nimport { createVueAnalysisSource } from './vue-sfc.js';\nimport type { ImportAlias } from './resolve-import.js';\n\ninterface RuleAnalysisOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\ninterface CachedAnalysis {\n source: ReturnType<typeof createAnalysisSource>;\n analyses: Map<string, StaticAnalysisResult>;\n}\n\nconst DEFAULT_CANDIDATE_LIMIT = 1_000;\nconst cache = new WeakMap<object, CachedAnalysis>();\nconst reportedAnalysisFailures = new WeakSet<object>();\nconst EMPTY_ANALYSIS: StaticAnalysisResult = {\n warnings: [],\n translationCalls: [],\n messages: [],\n};\n\nexport function analyzeRuleContext(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n maxStaticCandidates = Number.POSITIVE_INFINITY,\n): StaticArgsWarning[] {\n return analyzeRuleContextResult(context, options, maxStaticCandidates)\n .warnings;\n}\n\nexport function analyzeTranslationCalls(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n): TranslationCall[] {\n return analyzeRuleContextResult(context, options, DEFAULT_CANDIDATE_LIMIT)\n .translationCalls;\n}\n\nexport function analyzeTranslationMessages(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n): ExtractedMessage[] {\n return analyzeRuleContextResult(context, options, Number.POSITIVE_INFINITY)\n .messages;\n}\n\nexport function reportAnalysisFailureOnce(\n context: Rule.RuleContext,\n node: Rule.Node,\n error: unknown,\n): void {\n if (reportedAnalysisFailures.has(context.sourceCode)) return;\n reportedAnalysisFailures.add(context.sourceCode);\n const detail = error instanceof Error ? error.message : String(error);\n context.report({\n node,\n message: diagnosticMessage(\n `静态分析失败:${detail}`,\n `Static analysis failed: ${detail}`,\n ),\n });\n}\n\nfunction analyzeRuleContextResult(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n maxStaticCandidates: number,\n): StaticAnalysisResult {\n if (!hasPotentialTranslationCandidate(context.sourceCode.text)) {\n return EMPTY_ANALYSIS;\n }\n const cached: CachedAnalysis = cache.get(context.sourceCode) ?? {\n source: createAnalysisSource(context),\n analyses: new Map<string, StaticAnalysisResult>(),\n };\n cache.set(context.sourceCode, cached);\n const alias = readImportAlias(context);\n\n const analyze = (limit: number) => {\n const autoImports = normalizeAutoImports(options.autoImport);\n const key = JSON.stringify([\n options.tsconfigPath ?? null,\n autoImports.t,\n autoImports.tRef,\n autoImports.tComputed,\n autoImports.useI18n,\n Object.entries(alias ?? {}),\n limit,\n ]);\n const existing = cached.analyses.get(key);\n if (existing) return existing;\n const result = analyzeStaticSource(\n cached.source.code,\n context.filename,\n options.tsconfigPath,\n cached.source.lang,\n options.autoImport,\n limit,\n alias,\n );\n const analysis = {\n warnings: result.warnings.map((warning) => ({\n ...warning,\n ...cached.source.mapLocation(warning),\n })),\n translationCalls: result.translationCalls.map((call) => ({\n ...call,\n ...cached.source.mapLocation(call),\n })),\n messages: result.messages.map((message) => ({\n ...message,\n locations: message.locations.map((location) => ({\n ...location,\n ...cached.source.mapLocation(location),\n })),\n })),\n };\n cached.analyses.set(key, analysis);\n return analysis;\n };\n\n if (Number.isFinite(maxStaticCandidates)) {\n return analyze(maxStaticCandidates);\n }\n const preflight = analyze(DEFAULT_CANDIDATE_LIMIT);\n return preflight.warnings.some(\n (warning) => warning.code === 'static-candidate-limit',\n )\n ? analyze(Number.POSITIVE_INFINITY)\n : preflight;\n}\n\nfunction readImportAlias(context: Rule.RuleContext): ImportAlias | undefined {\n const settings = context.settings['ai-i18n'];\n if (!settings || typeof settings !== 'object' || Array.isArray(settings)) {\n return undefined;\n }\n const alias = (settings as { alias?: unknown }).alias;\n if (alias === undefined) return undefined;\n if (!alias || typeof alias !== 'object' || Array.isArray(alias)) {\n throw new TypeError(\n diagnosticMessage(\n 'ai-i18n settings.alias 必须是字符串到绝对路径的对象。',\n 'ai-i18n settings.alias must be an object mapping strings to absolute paths.',\n ),\n );\n }\n return alias as ImportAlias;\n}\n\nfunction createAnalysisSource(context: Rule.RuleContext) {\n return context.filename.endsWith('.vue')\n ? createVueAnalysisSource(\n context.sourceCode.text,\n context.filename,\n context.sourceCode.parserServices,\n )\n : {\n code: context.sourceCode.text,\n lang: undefined,\n mapLocation: (location: { line: number; column: number }) => location,\n };\n}\n","import type { TranslationCall } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport type { AutoImportOption } from '../../analyze.js';\nimport { analyzeTranslationCalls } from '../../rule-analysis.js';\n\nexport interface TranslationRuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\nexport interface TranslationCandidate {\n kind: TranslationCall['kind'];\n node: Rule.Node;\n}\n\nexport interface MatchedTranslationCall extends TranslationCandidate {\n call: TranslationCall;\n}\n\nexport function matchTranslationCalls(\n context: Rule.RuleContext,\n options: TranslationRuleOptions,\n candidates: readonly TranslationCandidate[],\n): MatchedTranslationCall[] {\n const calls = new Map(\n analyzeTranslationCalls(context, options).map((call) => [\n locationKey(call.line, call.column, call.kind),\n call,\n ]),\n );\n return candidates.flatMap((candidate) => {\n const location = candidate.node.loc?.start;\n if (!location) return [];\n const call = calls.get(\n locationKey(location.line, location.column, candidate.kind),\n );\n return call ? [{ ...candidate, call }] : [];\n });\n}\n\nfunction locationKey(\n line: number,\n column: number,\n kind: TranslationCall['kind'],\n): string {\n return `${kind}:${line}:${column}`;\n}\n","import type { Rule } from 'eslint';\n\n// 这里只保留跨框架共用的 AST 上下文判定。\nconst FUNCTION_TYPES = new Set([\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n]);\nconst IMMEDIATE_CONSOLE_METHODS = new Set([\n 'debug',\n 'error',\n 'info',\n 'log',\n 'warn',\n]);\n\nexport interface ParentNode {\n type: string;\n parent: ParentNode | null;\n expression?: unknown;\n}\n\nexport function isFunctionNode(node: { type: string }): boolean {\n return FUNCTION_TYPES.has(node.type);\n}\n\nexport function nearestFunction(node: Rule.Node): ParentNode | null {\n let current = node as unknown as ParentNode;\n while (current.parent) {\n current = current.parent;\n if (isFunctionNode(current)) return current;\n }\n return null;\n}\n\nexport function isImmediateConsoleEffect(node: Rule.Node): boolean {\n const call = (node as unknown as ParentNode).parent as CallNode | null;\n if (\n call?.type !== 'CallExpression' ||\n call.parent?.type !== 'ExpressionStatement' ||\n !call.arguments.some((argument) => argument === node) ||\n call.callee.type !== 'MemberExpression' ||\n call.callee.object.type !== 'Identifier' ||\n call.callee.object.name !== 'console'\n ) {\n return false;\n }\n const property = call.callee.property;\n const method =\n !call.callee.computed && property.type === 'Identifier'\n ? (property.name ?? null)\n : call.callee.computed &&\n property.type === 'Literal' &&\n typeof property.value === 'string'\n ? property.value\n : null;\n return method !== null && IMMEDIATE_CONSOLE_METHODS.has(method);\n}\n\nexport function isVueTemplateEventHandler(node: Rule.Node): boolean {\n let current = node as unknown as ParentNode;\n while (current.parent) {\n current = current.parent;\n if (current.type === 'VOnExpression') return true;\n }\n return false;\n}\n\ninterface CallNode extends ParentNode {\n arguments: readonly unknown[];\n callee: {\n type: string;\n computed: boolean;\n object: { type: string; name?: string };\n property: { type: string; name?: string; value?: unknown };\n };\n}\n","import type { Rule } from 'eslint';\nimport {\n isFunctionNode,\n nearestFunction,\n type ParentNode,\n} from '../common/ast-context.js';\n\nexport function isOptionsComputedValue(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n let value = node as unknown as ParentNode;\n while (\n value.parent &&\n isTransparentExpression(value.parent) &&\n expressionChild(value.parent) === value\n ) {\n value = value.parent;\n }\n const entry = value.parent as PropertyNode | null;\n if (entry?.type !== 'Property' || entry.value !== value) return false;\n const entries = entry.parent;\n if (entries?.type !== 'ObjectExpression') return false;\n const computed = entries.parent as PropertyNode | null;\n return (\n computed?.type === 'Property' &&\n computed.value === entries &&\n propertyName(computed.key) === 'computed' &&\n computed.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(computed.parent, context)\n );\n}\n\nexport function isOptionsComputedSpread(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n const value = unwrapTransparentParent(node as unknown as ParentNode);\n const spread = value.parent as SpreadNode | null;\n if (spread?.type !== 'SpreadElement' || spread.argument !== value) {\n return false;\n }\n const entries = spread.parent;\n if (entries?.type !== 'ObjectExpression') return false;\n const computed = entries.parent as PropertyNode | null;\n return (\n computed?.type === 'Property' &&\n computed.value === entries &&\n propertyName(computed.key) === 'computed' &&\n computed.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(computed.parent, context)\n );\n}\n\nexport function isInsideOptionsComputedGetter(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n const owner = nearestFunction(node);\n if (!owner) return false;\n let current: ParentNode | null = owner;\n while (current?.parent) {\n const parent = current.parent as PropertyNode;\n if (\n current.type === 'ObjectExpression' &&\n parent.type === 'Property' &&\n parent.value === current &&\n propertyName(parent.key) === 'computed' &&\n parent.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(parent.parent, context)\n ) {\n return true;\n }\n current = current.parent;\n if (current && current !== owner && isFunctionNode(current)) {\n return false;\n }\n }\n return false;\n}\n\nexport function vueOptionsSection(\n node: Rule.Node,\n context: Rule.RuleContext,\n): string | null {\n let current = node as unknown as ParentNode;\n while (current.parent) {\n const property = current.parent as PropertyNode;\n if (\n property.type === 'Property' &&\n property.value === current &&\n property.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(property.parent, context)\n ) {\n return propertyName(property.key) ?? null;\n }\n current = current.parent;\n }\n return null;\n}\n\nexport function isDirectOptionsFunction(\n node: ParentNode,\n context: Rule.RuleContext,\n name: string,\n allowBareExportDefault = true,\n): boolean {\n const value = unwrapTransparentParent(node);\n const property = value.parent as PropertyNode | null;\n if (\n property?.type !== 'Property' ||\n property.value !== value ||\n propertyName(property.key) !== name\n ) {\n return false;\n }\n const options = property.parent;\n return (\n options?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(options, context, allowBareExportDefault)\n );\n}\n\nexport function isVueComponentSetup(\n node: ParentNode,\n context: Rule.RuleContext,\n isVueSfc: boolean,\n): boolean {\n const value = unwrapTransparentParent(node);\n const directOwner = value.parent as OwnerNode | null;\n if (\n directOwner?.type === 'CallExpression' &&\n directOwner.arguments?.[0] === value\n ) {\n return isImportedVueDefineComponent(directOwner.callee, context);\n }\n\n const property = value.parent as PropertyNode | null;\n if (\n property?.type !== 'Property' ||\n property.value !== value ||\n property.computed ||\n propertyName(property.key) !== 'setup'\n ) {\n return false;\n }\n\n const options = property.parent;\n if (options?.type !== 'ObjectExpression') return false;\n const owner = options.parent as OwnerNode | null;\n if (\n isVueSfc &&\n owner?.type === 'ExportDefaultDeclaration' &&\n owner.declaration === options\n ) {\n return true;\n }\n return (\n owner?.type === 'CallExpression' &&\n owner.arguments?.[0] === options &&\n isImportedVueDefineComponent(owner.callee, context)\n );\n}\n\nexport function isVueScriptSetupNode(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n if (!context.filename.toLowerCase().endsWith('.vue') || !node.range) {\n return false;\n }\n const source = context.sourceCode.text;\n const before = source.slice(0, node.range[0]);\n const opening = before.lastIndexOf('<script');\n if (opening <= before.lastIndexOf('</script>')) return false;\n const closing = source.indexOf('>', opening);\n if (closing < 0 || closing >= node.range[0]) return false;\n return /\\bsetup(?:\\s|=|>)/u.test(source.slice(opening, closing + 1));\n}\n\nexport function isImportedVueDefineComponent(\n node: unknown,\n context: Rule.RuleContext,\n): boolean {\n const callee = node as {\n computed?: boolean;\n object?: unknown;\n property?: unknown;\n type?: string;\n };\n if (callee?.type === 'Identifier') {\n return isVueImport(callee, context, 'ImportSpecifier');\n }\n return (\n callee?.type === 'MemberExpression' &&\n !callee.computed &&\n propertyName(callee.property) === 'defineComponent' &&\n isVueImport(callee.object, context, 'ImportNamespaceSpecifier')\n );\n}\n\nexport function propertyName(node: unknown): string | undefined {\n const key = node as { name?: string; type?: string; value?: unknown };\n if (key?.type === 'Identifier') return key.name;\n return key?.type === 'Literal' && typeof key.value === 'string'\n ? key.value\n : undefined;\n}\n\nfunction isVueComponentOptionsObject(\n options: ParentNode,\n context: Rule.RuleContext,\n allowBareExportDefault = true,\n): boolean {\n const value = unwrapTransparentParent(options);\n const owner = value.parent as OwnerNode | null;\n if (\n allowBareExportDefault &&\n owner?.type === 'ExportDefaultDeclaration' &&\n owner.declaration === value\n ) {\n return true;\n }\n return (\n owner?.type === 'CallExpression' &&\n owner.arguments?.[0] === value &&\n isImportedVueDefineComponent(owner.callee, context)\n );\n}\n\nfunction isVueImport(\n node: unknown,\n context: Rule.RuleContext,\n specifierType: 'ImportNamespaceSpecifier' | 'ImportSpecifier',\n): boolean {\n const identifier = node as Rule.Node & { name?: string };\n if (identifier?.type !== 'Identifier' || !identifier.name) return false;\n\n let scope = context.sourceCode.getScope(identifier);\n while (true) {\n const variable = scope.set.get(identifier.name);\n if (!variable) {\n if (!scope.upper) return false;\n scope = scope.upper;\n continue;\n }\n return variable.defs.some((definition) => {\n if (\n definition.type !== 'ImportBinding' ||\n definition.node.type !== specifierType ||\n definition.parent.source.value !== 'vue'\n ) {\n return false;\n }\n return (\n specifierType === 'ImportNamespaceSpecifier' ||\n propertyName((definition.node as { imported?: unknown }).imported) ===\n 'defineComponent'\n );\n });\n }\n}\n\nfunction unwrapTransparentParent(node: ParentNode): ParentNode {\n let value = node;\n while (\n value.parent &&\n isTransparentExpression(value.parent) &&\n expressionChild(value.parent) === value\n ) {\n value = value.parent;\n }\n return value;\n}\n\nfunction isTransparentExpression(node: ParentNode): boolean {\n return (\n node.type === 'TSAsExpression' ||\n node.type === 'TSSatisfiesExpression' ||\n node.type === 'TSNonNullExpression' ||\n node.type === 'TypeCastExpression'\n );\n}\n\nfunction expressionChild(node: ParentNode): unknown {\n return node.expression;\n}\n\ninterface PropertyNode extends ParentNode {\n computed?: boolean;\n key?: unknown;\n value?: unknown;\n}\n\ninterface OwnerNode extends ParentNode {\n arguments?: unknown[];\n callee?: unknown;\n declaration?: unknown;\n}\n\ninterface SpreadNode extends ParentNode {\n argument?: unknown;\n}\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport { reportAnalysisFailureOnce } from '../../rule-analysis.js';\nimport {\n matchTranslationCalls,\n type TranslationCandidate,\n type TranslationRuleOptions,\n} from './translation-call.js';\nimport { isFunctionNode } from './ast-context.js';\nimport {\n isDirectOptionsFunction,\n isVueComponentSetup,\n} from '../vue/options.js';\n\ninterface RuleOptions extends TranslationRuleOptions {\n framework?: 'vue';\n}\n\nexport const noEagerTranslation: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '警告不会随语言切换更新的提前求值翻译结果',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n framework: { enum: ['vue'] },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n eagerTranslation: diagnosticMessage(\n '初始化期间保存的 t() 结果不会随语言切换更新。请改为函数或 Getter,在使用时调用 t();Vue setup 中使用 tRef(),纯 Options API 的 computed 使用 tComputed()。',\n 'A t() result stored during initialization will not update when the language changes. Evaluate it lazily in a function or getter; use tRef() in Vue setup and tComputed() in pure Options API computed.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n const isVueSfc = context.filename.toLowerCase().endsWith('.vue');\n const candidates: TranslationCandidate[] = [];\n return {\n CallExpression(node) {\n candidates.push({ kind: 'call', node });\n },\n TaggedTemplateExpression(node) {\n candidates.push({ kind: 'tagged-template', node });\n },\n 'Program:exit'(program) {\n let matches;\n try {\n matches = matchTranslationCalls(context, options, candidates);\n } catch (error) {\n reportAnalysisFailureOnce(context, program as Rule.Node, error);\n return;\n }\n for (const { call, node } of matches) {\n if (call.origin === 'vue-ref' || call.origin === 'vue-computed') {\n continue;\n }\n if (\n !storesOutsideFunction(\n node,\n context,\n isVueSfc,\n options.framework === 'vue',\n )\n ) {\n continue;\n }\n context.report({ node, messageId: 'eagerTranslation' });\n }\n },\n };\n },\n};\n\nfunction storesOutsideFunction(\n node: Rule.Node,\n context: Rule.RuleContext,\n isVueSfc: boolean,\n isVueFramework: boolean,\n): boolean {\n let current = node as ParentNode;\n let storesResult = false;\n while (current.parent) {\n const parent = current.parent;\n if (isFunctionNode(parent)) {\n // 普通 setup() 与 <script setup> 一样只执行一次;其他函数仍视为延迟求值。\n const returnsExpression =\n parent.type === 'ArrowFunctionExpression' && parent.body === current;\n return (\n (isVueComponentSetup(parent, context, isVueSfc) ||\n isDirectOptionsFunction(\n parent,\n context,\n 'data',\n isVueSfc || isVueFramework,\n )) &&\n (storesResult || returnsExpression)\n );\n }\n if (storesTranslationResult(parent, current)) storesResult = true;\n if (parent.type === 'Program') return storesResult;\n current = parent;\n }\n return storesResult;\n}\n\nfunction storesTranslationResult(\n parent: ParentNode,\n child: ParentNode,\n): boolean {\n if (\n (parent as { type: string }).type === 'AccessorProperty' &&\n parent.value === child\n ) {\n return true;\n }\n switch (parent.type) {\n case 'VariableDeclarator':\n return parent.init === child;\n case 'AssignmentExpression':\n case 'AssignmentPattern':\n return parent.right === child;\n case 'PropertyDefinition':\n return parent.value === child;\n case 'ReturnStatement':\n return parent.argument === child;\n case 'ExportDefaultDeclaration':\n return parent.declaration === child;\n default:\n return false;\n }\n}\n\ntype ParentNode = Rule.Node & {\n arguments?: unknown[];\n argument?: unknown;\n body?: unknown;\n callee?: unknown;\n computed?: boolean;\n parent: ParentNode | null;\n declaration?: unknown;\n init?: unknown;\n key?: unknown;\n right?: unknown;\n value?: unknown;\n};\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n defaultTreeAdapter,\n parse,\n parseFragment,\n type DefaultTreeAdapterTypes,\n} from 'parse5';\nimport type { AutoImportOption } from '../../analyze.js';\nimport {\n analyzeTranslationMessages,\n reportAnalysisFailureOnce,\n} from '../../rule-analysis.js';\n\ninterface RuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\nexport const noEmbeddedMarkup: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: '警告翻译源文中内嵌的静态 HTML 或 SVG 结构',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n embeddedMarkup: diagnosticMessage(\n '翻译源文包含静态 HTML 或 SVG 结构。请保留完整的自然语言,并将 markup 移出翻译调用或作为占位符传入。',\n 'The translation source contains static HTML or SVG structure. Keep the complete natural-language message, and move markup outside the translation call or pass it as a placeholder.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n return {\n 'Program:exit'(program) {\n let messages;\n try {\n messages = analyzeTranslationMessages(context, options);\n } catch (error) {\n reportAnalysisFailureOnce(context, program as Rule.Node, error);\n return;\n }\n\n const reported = new Set<string>();\n for (const message of messages) {\n if (!containsEmbeddedMarkup(message.source)) continue;\n for (const location of message.locations) {\n const key = `${location.line}:${location.column}`;\n if (reported.has(key)) continue;\n reported.add(key);\n context.report({\n node: program as Rule.Node,\n loc: {\n start: location,\n end: { line: location.line, column: location.column + 1 },\n },\n messageId: 'embeddedMarkup',\n });\n }\n }\n },\n };\n },\n};\n\nfunction containsEmbeddedMarkup(source: string): boolean {\n if (!source.includes('<')) return false;\n const options = { sourceCodeLocationInfo: true } as const;\n // fragment 保留 table 等局部标签;document 补充识别显式 html/body 包装标签。\n return (\n containsLocatedMarkup(parseFragment(source, options)) ||\n containsLocatedMarkup(parse(source, options))\n );\n}\n\nfunction containsLocatedMarkup(\n parent: DefaultTreeAdapterTypes.ParentNode,\n): boolean {\n return parent.childNodes.some((node) => {\n if (\n (defaultTreeAdapter.isElementNode(node) ||\n defaultTreeAdapter.isCommentNode(node)) &&\n node.sourceCodeLocation\n ) {\n return true;\n }\n return (\n defaultTreeAdapter.isElementNode(node) && containsLocatedMarkup(node)\n );\n });\n}\n","import type { Rule } from 'eslint';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport {\n ALL_AUTO_IMPORT_APIS,\n type AutoImportApi,\n} from '../../auto-imports.js';\n\nconst RUNTIME_MODULE = 'virtual:ai-i18n';\n\ninterface RuleOptions {\n autoImport: readonly AutoImportApi[];\n}\n\ntype ImportSpecifierNode = Extract<Rule.Node, { type: 'ImportSpecifier' }> & {\n importKind?: 'type' | 'value';\n};\n\ntype ImportDeclarationNode = Extract<\n Rule.Node,\n { type: 'ImportDeclaration' }\n> & {\n importKind?: 'type' | 'value';\n};\n\nexport const noRedundantAutoImport: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: '禁止显式导入已由 ai-i18n autoImport 注入的 Runtime API',\n },\n fixable: 'code',\n schema: [\n {\n type: 'object',\n properties: {\n autoImport: {\n type: 'array',\n items: { enum: ALL_AUTO_IMPORT_APIS },\n minItems: 1,\n uniqueItems: true,\n },\n },\n required: ['autoImport'],\n additionalProperties: false,\n },\n ],\n messages: {\n redundantImport: diagnosticMessage(\n 'ai-i18n autoImport 已注入以下 API:{{names}}。请删除来自 virtual:ai-i18n 的冗余导入。',\n 'ai-i18n autoImport injects these APIs: {{names}}. Remove the redundant imports from virtual:ai-i18n.',\n ),\n },\n },\n create(context) {\n const enabled = new Set(\n ((context.options[0] as RuleOptions | undefined)?.autoImport ??\n []) as readonly string[],\n );\n return {\n ImportDeclaration(rawNode) {\n const node = rawNode as ImportDeclarationNode;\n if (\n node.importKind === 'type' ||\n node.source.value !== RUNTIME_MODULE\n ) {\n return;\n }\n const named = node.specifiers.filter(\n (specifier): specifier is ImportSpecifierNode =>\n specifier.type === 'ImportSpecifier',\n );\n const redundant = named.filter((specifier) => {\n const imported = importedName(specifier);\n return (\n specifier.importKind !== 'type' &&\n imported !== null &&\n imported === specifier.local.name &&\n enabled.has(imported)\n );\n });\n if (!redundant.length) return;\n\n const names = redundant\n .map((specifier) => importedName(specifier))\n .filter((name): name is string => name !== null);\n const fix = createFix(context, node, named, redundant);\n context.report({\n node,\n messageId: 'redundantImport',\n data: { names: names.join(', ') },\n fix,\n });\n },\n };\n },\n};\n\nfunction importedName(specifier: ImportSpecifierNode): string | null {\n if (\n specifier.imported.type === 'Identifier' &&\n 'name' in specifier.imported\n ) {\n return specifier.imported.name;\n }\n return typeof specifier.imported.value === 'string'\n ? specifier.imported.value\n : null;\n}\n\nfunction createFix(\n context: Rule.RuleContext,\n node: ImportDeclarationNode,\n named: ImportSpecifierNode[],\n redundant: ImportSpecifierNode[],\n): Rule.ReportFixer | undefined {\n // import 内部注释可能携带迁移说明,自动修复时不能静默丢弃。\n if (context.sourceCode.getCommentsInside(node).length) return undefined;\n const redundantSet = new Set<unknown>(redundant);\n const remaining = node.specifiers.filter(\n (specifier) => !redundantSet.has(specifier),\n );\n if (!remaining.length) {\n return (fixer) => fixer.remove(node);\n }\n\n const remainingNamed = named.filter(\n (specifier) => !redundantSet.has(specifier),\n );\n const firstNamed = named[0];\n const lastNamed = named.at(-1);\n if (!firstNamed || !lastNamed) return undefined;\n const openBrace = context.sourceCode.getTokenBefore(firstNamed);\n const closeBrace = context.sourceCode.getTokenAfter(lastNamed);\n if (openBrace?.value !== '{' || closeBrace?.value !== '}') return undefined;\n\n if (remainingNamed.length) {\n const [, openEnd] = context.sourceCode.getRange(openBrace);\n const [closeStart] = context.sourceCode.getRange(closeBrace);\n const replacement = remainingNamed\n .map((specifier) => context.sourceCode.getText(specifier))\n .join(', ');\n return (fixer) =>\n fixer.replaceTextRange([openEnd, closeStart], ` ${replacement} `);\n }\n\n const beforeOpen = context.sourceCode.getTokenBefore(openBrace);\n if (beforeOpen?.value !== ',') return undefined;\n const [commaStart] = context.sourceCode.getRange(beforeOpen);\n const [, closeEnd] = context.sourceCode.getRange(closeBrace);\n return (fixer) => fixer.removeRange([commaStart, closeEnd]);\n}\n","import type { Rule } from 'eslint';\nimport { nearestFunction, type ParentNode } from '../common/ast-context.js';\nimport {\n isDirectOptionsFunction,\n isVueComponentSetup,\n isVueScriptSetupNode,\n vueOptionsSection,\n} from './options.js';\n\nexport type VueInitializationKind = 'data' | 'setup';\ntype RuntimeStateApi = 'getLang' | 'getLangLoadState';\n\nexport function misplacedI18nComputed(\n node: Rule.Node,\n context: Rule.RuleContext,\n inTemplate: boolean,\n isVueSfc: boolean,\n): boolean {\n if (inTemplate || isVueScriptSetupNode(node, context)) return true;\n if (vueOptionsSection(node, context) !== null) return true;\n const owner = nearestFunction(node);\n return Boolean(owner && isVueComponentSetup(owner, context, isVueSfc));\n}\n\nexport function vueInitializationSnapshotKind(\n node: Rule.Node,\n owner: ParentNode,\n context: Rule.RuleContext,\n isVueSfc: boolean,\n): VueInitializationKind | null {\n const kind = isVueComponentSetup(owner, context, isVueSfc)\n ? 'setup'\n : isDirectOptionsFunction(owner, context, 'data')\n ? 'data'\n : null;\n if (!kind || !storesResultBeforeOwner(node, owner)) return null;\n return kind;\n}\n\nexport function reportVueInitializationSnapshot(\n context: Rule.RuleContext,\n node: Rule.Node,\n api: RuntimeStateApi,\n kind: VueInitializationKind,\n): void {\n context.report({\n node,\n messageId: kind === 'data' ? 'optionsDataSnapshot' : 'vueSetupSnapshot',\n data: {\n api,\n replacement: api === 'getLang' ? 'currentLang' : 'langLoadState',\n },\n });\n}\n\nfunction storesResultBeforeOwner(node: Rule.Node, owner: ParentNode): boolean {\n let current = node as unknown as StoredValueNode;\n let storesResult = false;\n while (current.parent && current.parent !== owner) {\n const parent = current.parent as StoredValueNode;\n if (\n (parent.type === 'VariableDeclarator' && parent.init === current) ||\n ((parent.type === 'AssignmentExpression' ||\n parent.type === 'AssignmentPattern') &&\n parent.right === current) ||\n (parent.type === 'PropertyDefinition' && parent.value === current) ||\n (parent.type === 'ReturnStatement' && parent.argument === current)\n ) {\n storesResult = true;\n }\n current = parent;\n }\n // 箭头函数直接返回对象时没有 ReturnStatement,需要单独判断函数体。\n return (\n storesResult ||\n (owner.type === 'ArrowFunctionExpression' &&\n (owner as StoredValueNode).body === current)\n );\n}\n\ninterface StoredValueNode extends ParentNode {\n argument?: unknown;\n body?: unknown;\n init?: unknown;\n right?: unknown;\n value?: unknown;\n}\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n isImmediateConsoleEffect,\n isVueTemplateEventHandler,\n nearestFunction,\n type ParentNode,\n} from './ast-context.js';\nimport {\n isInsideOptionsComputedGetter,\n isOptionsComputedSpread,\n} from '../vue/options.js';\nimport {\n misplacedI18nComputed,\n reportVueInitializationSnapshot,\n vueInitializationSnapshotKind,\n} from '../vue/runtime-state.js';\n\nconst RUNTIME_MODULE = 'virtual:ai-i18n';\nconst STATE_APIS = ['getLang', 'getLangLoadState'] as const;\nconst VUE_COMPUTED_API = 'i18nComputed';\nconst TRACKED_APIS = [...STATE_APIS, VUE_COMPUTED_API] as const;\n\ntype RuntimeStateApi = (typeof STATE_APIS)[number];\ntype TrackedApi = (typeof TRACKED_APIS)[number];\n\ninterface RuleOptions {\n autoImport?: boolean | readonly TrackedApi[];\n framework?: 'react' | 'vue';\n}\n\nexport const noUnsubscribedRuntimeState: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '检查初始化、模块和组件渲染路径中的 Runtime 状态快照',\n },\n schema: [\n {\n type: 'object',\n properties: {\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: TRACKED_APIS },\n uniqueItems: true,\n },\n ],\n },\n framework: { enum: ['react', 'vue'] },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n moduleSnapshot: diagnosticMessage(\n '模块顶层调用 {{api}}() 只会保存初始化时的状态快照,后续语言状态变化不会更新该值。请在需要时调用,或通过 subscribe() / useI18n() 建立订阅。',\n 'Calling {{api}}() at module scope stores only the initialization snapshot, which will not update after language state changes. Read it when needed, or subscribe through subscribe() / useI18n().',\n ),\n renderSnapshot: diagnosticMessage(\n '组件渲染期间调用 {{api}}() 不会订阅语言状态。请使用 useI18n() 返回的 {{replacement}}。',\n 'Calling {{api}}() while rendering a component does not subscribe to language state. Use {{replacement}} from useI18n().',\n ),\n vueRenderSnapshot: diagnosticMessage(\n 'Vue 渲染期间调用 {{api}}() 不会订阅语言状态。Composition API 请使用 useI18n() 返回的 {{replacement}};纯 Options API 请在 computed 中展开 ...i18nComputed() 后使用 {{replacement}}。',\n 'Calling {{api}}() while rendering Vue does not subscribe to language state. With the Composition API, use {{replacement}} from useI18n(); with the pure Options API, spread ...i18nComputed() into computed and use {{replacement}}.',\n ),\n optionsComputedSnapshot: diagnosticMessage(\n '纯 Options API 的 computed 中调用 {{api}}() 仍然只会读取快照。请改为在 computed 中展开 ...i18nComputed(),并直接使用响应式的 {{replacement}}。',\n 'Calling {{api}}() inside a pure Options API computed getter still reads only a snapshot. Spread ...i18nComputed() into computed and use the reactive {{replacement}} instead.',\n ),\n vueSetupSnapshot: diagnosticMessage(\n 'Vue setup 中保存 {{api}}() 只会保留初始化快照。请使用 useI18n() 返回的响应式 {{replacement}}。',\n 'Storing {{api}}() in Vue setup keeps only the initialization snapshot. Use the reactive {{replacement}} returned by useI18n().',\n ),\n optionsDataSnapshot: diagnosticMessage(\n '纯 Options API 的 data 中保存 {{api}}() 只会保留初始化快照。请在 computed 中展开 ...i18nComputed(),并使用响应式的 {{replacement}}。',\n 'Storing {{api}}() in pure Options API data keeps only the initialization snapshot. Spread ...i18nComputed() into computed and use the reactive {{replacement}}.',\n ),\n misplacedI18nComputed: diagnosticMessage(\n 'i18nComputed() 只应直接展开到纯 Options API 的 computed,例如 computed: { ...i18nComputed() }。',\n 'Spread i18nComputed() directly into pure Options API computed, for example computed: { ...i18nComputed() }.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n const autoImports = normalizeAutoImports(options.autoImport);\n const importedBindings = new Map<string, TrackedApi>();\n const jsxOwners = new Set<ParentNode>();\n const templateCalls = new Set<Rule.Node>();\n const candidates: Rule.Node[] = [];\n const isVueSfc = context.filename.toLowerCase().endsWith('.vue');\n const collectJsxOwner = (node: Rule.Node) => {\n const owner = nearestFunction(node);\n if (owner) jsxOwners.add(owner);\n };\n const collectCall = (node: Rule.Node) => {\n candidates.push(node);\n };\n const scriptVisitor: Rule.RuleListener = {\n CallExpression: collectCall,\n ImportDeclaration(node) {\n if (node.source.value !== RUNTIME_MODULE) return;\n for (const specifier of node.specifiers) {\n if (specifier.type !== 'ImportSpecifier') continue;\n const imported =\n specifier.imported.type === 'Identifier'\n ? specifier.imported.name\n : typeof specifier.imported.value === 'string'\n ? specifier.imported.value\n : null;\n if (TRACKED_APIS.includes(imported as TrackedApi)) {\n importedBindings.set(specifier.local.name, imported as TrackedApi);\n }\n }\n },\n JSXElement: collectJsxOwner,\n JSXFragment: collectJsxOwner,\n 'Program:exit'() {\n for (const node of candidates) {\n const api = runtimeStateApi(\n context,\n node,\n autoImports,\n importedBindings,\n templateCalls.has(node),\n );\n if (!api) continue;\n if (api === VUE_COMPUTED_API) {\n if (\n options.framework === 'vue' &&\n !isOptionsComputedSpread(node, context) &&\n misplacedI18nComputed(\n node,\n context,\n templateCalls.has(node),\n isVueSfc,\n )\n ) {\n context.report({ node, messageId: 'misplacedI18nComputed' });\n }\n continue;\n }\n if (templateCalls.has(node)) {\n if (!isVueTemplateEventHandler(node)) {\n reportRenderSnapshot(context, node, api, true);\n }\n continue;\n }\n const owner = nearestFunction(node);\n if (!owner) {\n context.report({\n node,\n messageId: 'moduleSnapshot',\n data: { api },\n });\n continue;\n }\n if (\n options.framework === 'vue' &&\n isInsideOptionsComputedGetter(node, context)\n ) {\n reportOptionsComputedSnapshot(context, node, api);\n continue;\n }\n const initializationKind =\n options.framework === 'vue'\n ? vueInitializationSnapshotKind(node, owner, context, isVueSfc)\n : null;\n if (initializationKind) {\n reportVueInitializationSnapshot(\n context,\n node,\n api,\n initializationKind,\n );\n continue;\n }\n if (jsxOwners.has(owner) && !isImmediateConsoleEffect(node)) {\n reportRenderSnapshot(\n context,\n node,\n api,\n options.framework === 'vue',\n );\n }\n }\n },\n };\n const parserServices = context.sourceCode\n .parserServices as VueParserServices;\n if (!parserServices.defineTemplateBodyVisitor) return scriptVisitor;\n return parserServices.defineTemplateBodyVisitor(\n {\n CallExpression(node) {\n candidates.push(node);\n templateCalls.add(node);\n },\n },\n scriptVisitor,\n { templateBodyTriggerSelector: 'Program' },\n );\n },\n};\n\nfunction normalizeAutoImports(\n option: RuleOptions['autoImport'],\n): ReadonlySet<TrackedApi> {\n if (option === true) return new Set(TRACKED_APIS);\n if (!option) return new Set();\n return new Set(option);\n}\n\nfunction runtimeStateApi(\n context: Rule.RuleContext,\n rawNode: Rule.Node,\n autoImports: ReadonlySet<TrackedApi>,\n importedBindings: ReadonlyMap<string, TrackedApi>,\n inTemplate: boolean,\n): TrackedApi | null {\n if (rawNode.type !== 'CallExpression') return null;\n const callee = rawNode.callee;\n if (callee.type !== 'Identifier') return null;\n if (inTemplate) {\n if (isTemplateLocalIdentifier(callee as unknown as ParentNode)) return null;\n const imported = importedBindings.get(callee.name);\n if (imported) return imported;\n if (hasTopLevelScriptBinding(context, callee.name)) return null;\n return autoImports.has(callee.name as TrackedApi)\n ? (callee.name as TrackedApi)\n : null;\n }\n const variable = findVariable(\n context.sourceCode.getScope(\n callee as unknown as Rule.Node,\n ) as unknown as ScopeLike,\n callee.name,\n );\n if (variable?.defs.length) {\n const imported = importedRuntimeStateApi(variable);\n return imported;\n }\n return autoImports.has(callee.name as TrackedApi)\n ? (callee.name as TrackedApi)\n : null;\n}\n\nfunction importedRuntimeStateApi(variable: VariableLike): TrackedApi | null {\n for (const definition of variable.defs) {\n if (definition.type !== 'ImportBinding') continue;\n const specifier = definition.node as ImportSpecifierNode;\n const declaration = specifier.parent;\n if (\n specifier.type !== 'ImportSpecifier' ||\n declaration?.type !== 'ImportDeclaration' ||\n declaration.source.value !== RUNTIME_MODULE\n ) {\n continue;\n }\n const imported =\n specifier.imported.type === 'Identifier'\n ? specifier.imported.name\n : typeof specifier.imported.value === 'string'\n ? specifier.imported.value\n : null;\n return TRACKED_APIS.includes(imported as TrackedApi)\n ? (imported as TrackedApi)\n : null;\n }\n // ESLint globals 没有 definition;只有显式开启 autoImport 时才由调用方接纳。\n return null;\n}\n\nfunction hasTopLevelScriptBinding(\n context: Rule.RuleContext,\n name: string,\n): boolean {\n return context.sourceCode.scopeManager.scopes.some(\n (scope) =>\n (scope.type === 'global' || scope.type === 'module') &&\n scope.variables.some(\n (variable) => variable.name === name && variable.defs.length > 0,\n ),\n );\n}\n\nfunction isTemplateLocalIdentifier(identifier: ParentNode): boolean {\n let current: TemplateTraversableNode | null =\n identifier as unknown as TemplateTraversableNode;\n while (current) {\n if (current.type === 'VExpressionContainer') {\n const container = current as unknown as TemplateExpressionContainer;\n return container.references.some(\n (reference) =>\n reference.id === identifier && reference.variable !== null,\n );\n }\n current = current.parent;\n }\n return false;\n}\n\nfunction findVariable(scope: ScopeLike, name: string): VariableLike | null {\n let current: ScopeLike | null = scope;\n while (current) {\n const variable = current.variables.find((item) => item.name === name);\n if (variable) return variable;\n current = current.upper;\n }\n return null;\n}\n\nfunction reportRenderSnapshot(\n context: Rule.RuleContext,\n node: Rule.Node,\n api: RuntimeStateApi,\n isVue: boolean,\n) {\n context.report({\n node,\n messageId: isVue ? 'vueRenderSnapshot' : 'renderSnapshot',\n data: {\n api,\n replacement: api === 'getLang' ? 'currentLang' : 'langLoadState',\n },\n });\n}\n\nfunction reportOptionsComputedSnapshot(\n context: Rule.RuleContext,\n node: Rule.Node,\n api: RuntimeStateApi,\n) {\n context.report({\n node,\n messageId: 'optionsComputedSnapshot',\n data: {\n api,\n replacement: api === 'getLang' ? 'currentLang' : 'langLoadState',\n },\n });\n}\n\ntype ImportSpecifierNode = Extract<Rule.Node, { type: 'ImportSpecifier' }> & {\n parent: ParentNode | null;\n};\n\ninterface DefinitionLike {\n type: string;\n node: unknown;\n}\n\ninterface VariableLike {\n name: string;\n defs: readonly DefinitionLike[];\n}\n\ninterface ScopeLike {\n variables: readonly VariableLike[];\n upper: ScopeLike | null;\n}\n\ninterface TemplateTraversableNode {\n type: string;\n parent: TemplateTraversableNode | null;\n}\n\ninterface TemplateExpressionContainer {\n references: Array<{\n id: unknown;\n variable: unknown | null;\n }>;\n}\n\ninterface VueParserServices {\n defineTemplateBodyVisitor?(\n templateBodyVisitor: Record<string, (node: Rule.Node) => void>,\n scriptVisitor: Rule.RuleListener,\n options: { templateBodyTriggerSelector: 'Program' | 'Program:exit' },\n ): Rule.RuleListener;\n}\n","import type { TranslationCall } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n isImmediateConsoleEffect,\n nearestFunction,\n type ParentNode,\n} from '../common/ast-context.js';\n\nexport function reportReactUnsubscribedT(\n context: Rule.RuleContext,\n call: TranslationCall,\n node: Rule.Node,\n jsxOwners: ReadonlySet<ParentNode>,\n): void {\n if (call.origin !== 'runtime') return;\n // React 只能通过 useI18n() 订阅,因此只检查 JSX 渲染拥有者。\n const owner = nearestFunction(node);\n if (!owner || !jsxOwners.has(owner) || isImmediateConsoleEffect(node)) {\n return;\n }\n context.report({ node, messageId: 'unsubscribedT' });\n}\n","import type { Rule } from 'eslint';\nimport { isImportedVueDefineComponent, propertyName } from './options.js';\n\nconst RUNTIME_MODULE = 'virtual:ai-i18n';\nconst TRANSPARENT_EXPRESSIONS = new Set([\n 'TSAsExpression',\n 'TSSatisfiesExpression',\n 'TSNonNullExpression',\n 'TypeCastExpression',\n]);\nconst STATIC_INSTANCE_SOURCES = new Set(['computed', 'inject', 'props']);\nconst RETURNED_INSTANCE_SOURCES = new Set(['data', 'setup']);\nconst UNCERTAIN_INSTANCE_SOURCES = new Set(['extends', 'mixins']);\n\nexport type VueInstanceMemberOrigin =\n 'ai-i18n' | 'local' | 'missing' | 'unknown' | 'not-component';\n\nexport function resolveVueInstanceMemberOrigin(\n context: Rule.RuleContext,\n node: Rule.Node,\n name: 't' | '$t',\n inTemplate: boolean,\n): VueInstanceMemberOrigin {\n const options = inTemplate\n ? defaultComponentOptions(context)\n : enclosingComponentOptions(node, context);\n if (options === 'unknown') return 'unknown';\n if (!options) return inTemplate ? 'missing' : 'not-component';\n if (!inTemplate && !usesComponentThis(node, options)) {\n return 'not-component';\n }\n return resolveOptionsMember(options, name, context);\n}\n\nfunction resolveOptionsMember(\n options: AstNode,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): VueInstanceMemberOrigin {\n let methods: AstNode | 'unknown' | null = null;\n let localSource = false;\n let uncertainSource = false;\n\n for (const entry of options.properties ?? []) {\n if (entry.type === 'SpreadElement') {\n methods = 'unknown';\n uncertainSource = true;\n continue;\n }\n if (entry.type !== 'Property') continue;\n const key = staticPropertyName(entry);\n if (key === null) {\n methods = 'unknown';\n uncertainSource = true;\n continue;\n }\n if (key === 'methods') {\n const value = unwrapExpression(entry.value);\n methods = value?.type === 'ObjectExpression' ? value : 'unknown';\n continue;\n }\n if (STATIC_INSTANCE_SOURCES.has(key)) {\n const origin = resolveStaticSourceMember(entry.value, name, context);\n if (origin === 'local') localSource = true;\n if (origin === 'unknown') uncertainSource = true;\n continue;\n }\n if (RETURNED_INSTANCE_SOURCES.has(key)) {\n const origin = resolveReturnedSourceMember(entry.value, name, context);\n if (origin === 'local') localSource = true;\n if (origin === 'unknown') uncertainSource = true;\n continue;\n }\n if (UNCERTAIN_INSTANCE_SOURCES.has(key)) uncertainSource = true;\n }\n\n if (methods === 'unknown') return 'unknown';\n const methodOrigin = methods\n ? resolveObjectMember(methods, name, context)\n : 'missing';\n if (methodOrigin === 'local' || localSource) return 'local';\n if (methodOrigin === 'unknown' || uncertainSource) return 'unknown';\n return methodOrigin;\n}\n\nfunction resolveStaticSourceMember(\n rawValue: AstNode | undefined,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): 'local' | 'missing' | 'unknown' {\n const value = unwrapExpression(rawValue);\n if (!value) return 'unknown';\n if (value.type === 'ObjectExpression') {\n const origin = resolveObjectMember(value, name, context);\n return origin === 'missing'\n ? 'missing'\n : origin === 'unknown'\n ? 'unknown'\n : 'local';\n }\n if (value.type !== 'ArrayExpression') return 'unknown';\n for (const element of value.elements ?? []) {\n if (propertyName(element) === name) return 'local';\n if (element.type !== 'Literal') return 'unknown';\n }\n return 'missing';\n}\n\nfunction resolveReturnedSourceMember(\n rawValue: AstNode | undefined,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): 'local' | 'missing' | 'unknown' {\n const fn = unwrapExpression(rawValue);\n if (\n !fn ||\n (fn.type !== 'FunctionExpression' && fn.type !== 'ArrowFunctionExpression')\n ) {\n return 'unknown';\n }\n const rawBody = fn.body as unknown as AstNode | undefined;\n if (!rawBody) return 'unknown';\n if (rawBody.type === 'ObjectExpression') {\n return localObjectMemberOrigin(rawBody, name, context);\n }\n if (rawBody.type !== 'BlockStatement') return 'unknown';\n\n const statements = rawBody.body ?? [];\n const returned = statements.at(-1);\n if (\n returned?.type !== 'ReturnStatement' ||\n statements\n .slice(0, -1)\n .some((statement) => !isStraightLineStatement(statement))\n ) {\n return 'unknown';\n }\n const value = unwrapExpression(returned.argument);\n return value?.type === 'ObjectExpression'\n ? localObjectMemberOrigin(value, name, context)\n : 'unknown';\n}\n\nfunction localObjectMemberOrigin(\n object: AstNode,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): 'local' | 'missing' | 'unknown' {\n const origin = resolveObjectMember(object, name, context);\n return origin === 'missing'\n ? 'missing'\n : origin === 'unknown'\n ? 'unknown'\n : 'local';\n}\n\nfunction isStraightLineStatement(node: AstNode): boolean {\n return (\n node.type === 'ExpressionStatement' ||\n node.type === 'FunctionDeclaration' ||\n node.type === 'VariableDeclaration'\n );\n}\n\nfunction resolveObjectMember(\n object: AstNode,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): Exclude<VueInstanceMemberOrigin, 'not-component'> {\n let origin: Exclude<VueInstanceMemberOrigin, 'not-component'> = 'missing';\n for (const entry of object.properties ?? []) {\n if (entry.type === 'SpreadElement') {\n origin = 'unknown';\n continue;\n }\n if (entry.type !== 'Property') continue;\n const key = staticPropertyName(entry);\n if (key === null) {\n origin = 'unknown';\n continue;\n }\n if (key !== name) continue;\n origin = methodValueOrigin(entry.value, context);\n }\n return origin;\n}\n\nfunction methodValueOrigin(\n rawValue: AstNode | undefined,\n context: Rule.RuleContext,\n): 'ai-i18n' | 'local' | 'unknown' {\n const value = unwrapExpression(rawValue);\n if (!value) return 'unknown';\n if (value.type !== 'Identifier' || !value.name) return 'local';\n const variable = findVariable(context, value);\n if (!variable) return 'unknown';\n return variable.defs.some(isRuntimeTImport) ? 'ai-i18n' : 'local';\n}\n\nfunction findVariable(\n context: Rule.RuleContext,\n identifier: AstNode,\n): ScopeVariable | null {\n let scope: ScopeLike | null = context.sourceCode.getScope(\n identifier as unknown as Rule.Node,\n ) as unknown as ScopeLike;\n while (scope) {\n const variable = scope.set.get(identifier.name!);\n if (variable) return variable;\n scope = scope.upper;\n }\n return null;\n}\n\nfunction isRuntimeTImport(definition: ScopeDefinition): boolean {\n if (definition.type !== 'ImportBinding') return false;\n const specifier = definition.node;\n const declaration = specifier.parent;\n return (\n specifier.type === 'ImportSpecifier' &&\n declaration?.type === 'ImportDeclaration' &&\n declaration.source?.value === RUNTIME_MODULE &&\n propertyName(specifier.imported) === 't'\n );\n}\n\nfunction enclosingComponentOptions(\n node: Rule.Node,\n context: Rule.RuleContext,\n): AstNode | null {\n let current = node as unknown as AstNode;\n while (current.parent) {\n current = current.parent;\n if (\n current.type === 'ObjectExpression' &&\n isComponentOptions(current, context)\n ) {\n return current;\n }\n }\n return null;\n}\n\nfunction defaultComponentOptions(\n context: Rule.RuleContext,\n): AstNode | 'unknown' | null {\n const program = context.sourceCode.ast as unknown as AstNode;\n const owner = program.body?.find(\n (entry) => entry.type === 'ExportDefaultDeclaration',\n );\n if (!owner) return null;\n const declaration = unwrapExpression(owner.declaration);\n if (!declaration) return 'unknown';\n if (declaration.type === 'ObjectExpression') return declaration;\n if (\n declaration.type !== 'CallExpression' ||\n !isImportedVueDefineComponent(declaration.callee, context)\n ) {\n return 'unknown';\n }\n const options = unwrapExpression(declaration.arguments?.[0]);\n return options?.type === 'ObjectExpression' ? options : 'unknown';\n}\n\nfunction isComponentOptions(\n options: AstNode,\n context: Rule.RuleContext,\n): boolean {\n const value = unwrapParent(options);\n const owner = value.parent;\n if (\n owner?.type === 'ExportDefaultDeclaration' &&\n owner.declaration === value\n ) {\n return true;\n }\n return (\n owner?.type === 'CallExpression' &&\n owner.arguments?.[0] === value &&\n isImportedVueDefineComponent(owner.callee, context)\n );\n}\n\nfunction usesComponentThis(node: Rule.Node, options: AstNode): boolean {\n let current = node as unknown as AstNode;\n while (current.parent && current.parent !== options) {\n current = current.parent;\n if (\n current.type === 'FunctionDeclaration' ||\n current.type === 'FunctionExpression'\n ) {\n return isDirectOptionsFunction(current, options);\n }\n }\n return false;\n}\n\nfunction isDirectOptionsFunction(fn: AstNode, options: AstNode): boolean {\n const property = fn.parent;\n if (\n property?.type !== 'Property' ||\n unwrapExpression(property.value) !== fn\n ) {\n return false;\n }\n if (property.parent === options) return true;\n const section = property.parent;\n const sectionProperty = section?.parent;\n return (\n section?.type === 'ObjectExpression' &&\n sectionProperty?.type === 'Property' &&\n unwrapExpression(sectionProperty.value) === section &&\n sectionProperty.parent === options\n );\n}\n\nfunction staticPropertyName(property: AstNode): string | null {\n return propertyName(property.key) ?? null;\n}\n\nfunction unwrapExpression(node: AstNode | undefined): AstNode | undefined {\n let value = node;\n while (value && TRANSPARENT_EXPRESSIONS.has(value.type)) {\n value = value.expression;\n }\n return value;\n}\n\nfunction unwrapParent(node: AstNode): AstNode {\n let value = node;\n while (\n value.parent &&\n TRANSPARENT_EXPRESSIONS.has(value.parent.type) &&\n value.parent.expression === value\n ) {\n value = value.parent;\n }\n return value;\n}\n\ninterface AstNode {\n type: string;\n arguments?: AstNode[];\n argument?: AstNode;\n body?: AstNode[];\n callee?: AstNode;\n computed?: boolean;\n declaration?: AstNode;\n expression?: AstNode;\n elements?: AstNode[];\n imported?: AstNode;\n key?: AstNode;\n name?: string;\n parent: AstNode | null;\n properties?: AstNode[];\n source?: { value?: unknown };\n value?: AstNode;\n}\n\ninterface ScopeDefinition {\n type: string;\n node: AstNode;\n}\n\ninterface ScopeVariable {\n defs: ScopeDefinition[];\n}\n\ninterface ScopeLike {\n set: Map<string, ScopeVariable>;\n upper: ScopeLike | null;\n}\n","import type { TranslationCall } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n isVueTemplateEventHandler,\n nearestFunction,\n type ParentNode,\n} from '../common/ast-context.js';\nimport { resolveVueInstanceMemberOrigin } from './instance-member.js';\nimport { isOptionsComputedValue, vueOptionsSection } from './options.js';\n\nexport function reportVueTranslationLifecycle(\n context: Rule.RuleContext,\n call: TranslationCall,\n node: Rule.Node,\n templateNodes: ReadonlySet<Rule.Node>,\n jsxOwners: ReadonlySet<ParentNode>,\n): boolean {\n if (call.origin === 'vue-computed') {\n if (!isOptionsComputedValue(node, context)) {\n context.report({ node, messageId: 'misplacedTComputed' });\n }\n return true;\n }\n if (call.origin !== 'vue-ref') return false;\n if (templateNodes.has(node)) {\n if (!isVueTemplateEventHandler(node)) {\n context.report({ node, messageId: 'renderTRef' });\n }\n return true;\n }\n const section = vueOptionsSection(node, context);\n if (section === 'computed' || section === 'data' || section === 'methods') {\n context.report({ node, messageId: 'optionsTRef' });\n return true;\n }\n if (section === 'render') {\n context.report({ node, messageId: 'renderTRef' });\n return true;\n }\n const owner = nearestFunction(node);\n if (owner && jsxOwners.has(owner)) {\n context.report({ node, messageId: 'renderTRef' });\n }\n return true;\n}\n\nexport function reportUnsupportedVueInstanceTranslation(\n context: Rule.RuleContext,\n node: Rule.Node,\n isVueFramework: boolean,\n inTemplate: boolean,\n): void {\n if (!isVueFramework) return;\n const name = vueInstanceTranslationMemberName(node);\n if (!name) return;\n const origin = resolveVueInstanceMemberOrigin(\n context,\n node,\n name,\n inTemplate,\n );\n if (\n origin === 'local' ||\n origin === 'unknown' ||\n origin === 'not-component'\n ) {\n return;\n }\n context.report({ node, messageId: 'unsupportedInstanceTranslation' });\n}\n\nfunction vueInstanceTranslationMemberName(node: Rule.Node): 't' | '$t' | null {\n if (\n node.type !== 'MemberExpression' ||\n node.object.type !== 'ThisExpression'\n ) {\n return null;\n }\n const name =\n !node.computed && node.property.type === 'Identifier'\n ? node.property.name\n : node.computed &&\n node.property.type === 'Literal' &&\n typeof node.property.value === 'string'\n ? node.property.value\n : null;\n return name === 't' || name === '$t' ? name : null;\n}\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport { reportAnalysisFailureOnce } from '../../rule-analysis.js';\nimport {\n matchTranslationCalls,\n type TranslationCandidate,\n type TranslationRuleOptions,\n} from './translation-call.js';\nimport { nearestFunction, type ParentNode } from './ast-context.js';\nimport { reportReactUnsubscribedT } from '../react/no-unsubscribed-t.js';\nimport {\n reportUnsupportedVueInstanceTranslation,\n reportVueTranslationLifecycle,\n} from '../vue/no-unsubscribed-t.js';\n\ninterface RuleOptions extends TranslationRuleOptions {\n framework?: 'react' | 'vue';\n}\n\nexport const noUnsubscribedT: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '检查组件渲染路径中的翻译 API 生命周期',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n framework: { enum: ['react', 'vue'] },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n unsubscribedT: diagnosticMessage(\n '组件渲染期间使用顶层 t 不会订阅语言状态,语言切换不会主动刷新,缓存的渲染结果也可能继续使用旧译文。请使用 useI18n() 返回的 t。',\n 'Top-level t does not subscribe the component to language updates, so language changes do not trigger a render and cached render results may remain stale. Use the t returned by useI18n().',\n ),\n renderTRef: diagnosticMessage(\n '不要在组件渲染或 template 中调用 tRef(),否则每次渲染都会创建新的 computed。请在 setup 中创建一次并使用返回的 Ref;Vue 渲染函数中请直接调用 t。',\n 'Do not call tRef() during component rendering or in a template because each render creates a new computed. Create it once in setup and use the returned Ref; call t directly in Vue render functions.',\n ),\n misplacedTComputed: diagnosticMessage(\n 'tComputed() 只应直接作为纯 Options API 的 computed 属性值使用,例如 computed: { label: tComputed(\"保存\") }。setup 中请使用 tRef(),template 或 render 中请直接使用 t()。',\n 'Use tComputed() only as the direct value of a pure Options API computed property, for example computed: { label: tComputed(\"Save\") }. Use tRef() in setup, and call t() directly in templates or render functions.',\n ),\n optionsTRef: diagnosticMessage(\n '不要在纯 Options API 的 computed、data 或 methods 中调用 tRef()。computed 请直接使用 tComputed(),methods 请在执行时调用 t();tRef() 仅用于 setup 或 composable。',\n 'Do not call tRef() in pure Options API computed, data, or methods. Use tComputed() directly in computed properties, call t() when a method runs, and reserve tRef() for setup or composables.',\n ),\n unsupportedInstanceTranslation: diagnosticMessage(\n 'ai-i18n 不支持把 Vue 组件实例成员 this.t / this.$t 当作翻译 API。请直接调用词法作用域中的 t();开启自动导入时无需 import,关闭时请从 virtual:ai-i18n 显式导入。',\n 'ai-i18n does not support Vue instance members this.t or this.$t as translation APIs. Call lexical t() directly; no import is needed with auto import enabled, otherwise import it from virtual:ai-i18n.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n const candidates: TranslationCandidate[] = [];\n const jsxOwners = new Set<ParentNode>();\n const templateNodes = new Set<Rule.Node>();\n const collectJsxOwner = (node: Rule.Node) => {\n const owner = nearestFunction(node);\n if (owner) jsxOwners.add(owner);\n };\n const scriptVisitor: Rule.RuleListener = {\n CallExpression(node) {\n candidates.push({ kind: 'call', node });\n },\n TaggedTemplateExpression(node) {\n candidates.push({ kind: 'tagged-template', node });\n },\n MemberExpression(node) {\n reportUnsupportedVueInstanceTranslation(\n context,\n node,\n options.framework === 'vue',\n false,\n );\n },\n JSXElement: collectJsxOwner,\n JSXFragment: collectJsxOwner,\n 'Program:exit'(program) {\n let matches;\n try {\n matches = matchTranslationCalls(context, options, candidates);\n } catch (error) {\n reportAnalysisFailureOnce(context, program as Rule.Node, error);\n return;\n }\n for (const { call, node } of matches) {\n if (\n reportVueTranslationLifecycle(\n context,\n call,\n node,\n templateNodes,\n jsxOwners,\n )\n ) {\n continue;\n }\n if (call.origin !== 'runtime') continue;\n if (options.framework === 'vue') continue;\n if (templateNodes.has(node)) {\n // Vue 模式的顶层 t 会读取 adapter revision,模板渲染时会建立响应式依赖。\n continue;\n }\n reportReactUnsubscribedT(context, call, node, jsxOwners);\n }\n },\n };\n const parserServices = context.sourceCode\n .parserServices as VueParserServices;\n if (!parserServices.defineTemplateBodyVisitor) return scriptVisitor;\n return parserServices.defineTemplateBodyVisitor(\n {\n CallExpression(node) {\n candidates.push({ kind: 'call', node });\n templateNodes.add(node);\n },\n TaggedTemplateExpression(node) {\n candidates.push({ kind: 'tagged-template', node });\n templateNodes.add(node);\n },\n MemberExpression(node) {\n reportUnsupportedVueInstanceTranslation(\n context,\n node,\n options.framework === 'vue',\n true,\n );\n },\n },\n scriptVisitor,\n // 模板默认在 Program:exit 才遍历;提前到 Program,确保汇总前已收集候选。\n { templateBodyTriggerSelector: 'Program' },\n );\n },\n};\n\ninterface VueParserServices {\n defineTemplateBodyVisitor?(\n templateBodyVisitor: Record<string, (node: Rule.Node) => void>,\n scriptVisitor: Rule.RuleListener,\n options: { templateBodyTriggerSelector: 'Program' | 'Program:exit' },\n ): Rule.RuleListener;\n}\n","import type { Rule } from 'eslint';\nimport type { AutoImportOption } from '../../analyze.js';\nimport {\n analyzeRuleContext,\n reportAnalysisFailureOnce,\n} from '../../rule-analysis.js';\n\ninterface RuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n maxStaticCandidates?: number;\n}\n\nexport const staticCandidateLimit: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: '警告单个翻译调用展开的静态候选数量过多',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n maxStaticCandidates: {\n type: 'integer',\n minimum: 1,\n maximum: Number.MAX_SAFE_INTEGER,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n candidateLimit: '{{reason}}',\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n return {\n 'Program:exit'(node) {\n try {\n const warnings = analyzeRuleContext(\n context,\n options,\n options.maxStaticCandidates ?? 1_000,\n );\n for (const warning of warnings) {\n if (warning.code !== 'static-candidate-limit') continue;\n context.report({\n node,\n loc: {\n start: warning,\n end: { line: warning.line, column: warning.column + 1 },\n },\n messageId: 'candidateLimit',\n data: { reason: warning.message },\n });\n }\n } catch (error) {\n reportAnalysisFailureOnce(context, node as Rule.Node, error);\n }\n },\n };\n },\n};\n","import type { Rule } from 'eslint';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { AutoImportOption } from '../../analyze.js';\nimport {\n analyzeRuleContext,\n reportAnalysisFailureOnce,\n} from '../../rule-analysis.js';\n\ninterface RuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\nexport const tStaticArgs: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '要求 virtual:ai-i18n 的翻译 API 参数可被静态提取',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n analysisFailed: '{{reason}}',\n dynamicArg: '{{reason}}',\n invalidUsage: '{{reason}}',\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n return {\n 'Program:exit'(node) {\n let warnings;\n try {\n warnings = analyzeRuleContext(context, options);\n } catch (error) {\n reportAnalysisFailureOnce(context, node as Rule.Node, error);\n return;\n }\n for (const warning of warnings) {\n const analysisFailed = warning.code === 'parse-error';\n const invalidUsage =\n warning.code !== 'dynamic-argument' &&\n warning.code !== 'unresolved-argument' &&\n !analysisFailed;\n context.report({\n node,\n loc: {\n start: warning,\n end: { line: warning.line, column: warning.column + 1 },\n },\n messageId: analysisFailed\n ? 'analysisFailed'\n : invalidUsage\n ? 'invalidUsage'\n : 'dynamicArg',\n data: {\n reason: analysisFailed\n ? diagnosticMessage(\n `静态分析失败:${warning.message}`,\n `Static analysis failed: ${warning.message}`,\n )\n : invalidUsage\n ? warning.message\n : diagnosticMessage(\n '翻译调用的参数无法静态提取。source 请使用静态字符串,options 请使用只包含 comment 的静态对象。',\n 'The translation-call arguments cannot be statically extracted. Use a static string for source and a static object containing only comment for options.',\n ),\n },\n });\n }\n },\n };\n },\n};\n","import { createRequire } from 'node:module';\nimport type { ESLint } from 'eslint';\nimport {\n REACT_AUTO_IMPORTS,\n RUNTIME_AUTO_IMPORTS,\n VUE_AUTO_IMPORTS,\n} from './auto-imports.js';\nimport { noEagerTranslation } from './rules/common/no-eager-translation.js';\nimport { noEmbeddedMarkup } from './rules/common/no-embedded-markup.js';\nimport { noRedundantAutoImport } from './rules/common/no-redundant-auto-import.js';\nimport { noUnsubscribedRuntimeState } from './rules/common/no-unsubscribed-runtime-state.js';\nimport { noUnsubscribedT } from './rules/common/no-unsubscribed-t.js';\nimport { staticCandidateLimit } from './rules/common/static-candidate-limit.js';\nimport { tStaticArgs } from './rules/common/t-static-args.js';\n\nconst { version } = createRequire(import.meta.url)('../package.json') as {\n version: string;\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: '@ai-i18n/eslint-plugin',\n version,\n namespace: 'ai-i18n',\n },\n rules: {\n 'no-embedded-markup': noEmbeddedMarkup,\n 'no-eager-translation': noEagerTranslation,\n 'no-redundant-auto-import': noRedundantAutoImport,\n 'no-unsubscribed-runtime-state': noUnsubscribedRuntimeState,\n 'no-unsubscribed-t': noUnsubscribedT,\n 'static-candidate-limit': staticCandidateLimit,\n 't-static-args': tStaticArgs,\n },\n configs: {},\n};\n\n// 规则集必须由使用者显式引入,不会修改宿主项目的 ESLint 配置。\nplugin.configs!.recommended = [\n {\n ignores: ['**/*.{vue,cjs,cts}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: { defineI18nMessages: 'readonly' },\n },\n rules: {\n 'ai-i18n/t-static-args': 'error',\n 'ai-i18n/no-embedded-markup': 'warn',\n 'ai-i18n/no-eager-translation': 'warn',\n 'ai-i18n/no-unsubscribed-runtime-state': 'warn',\n 'ai-i18n/no-unsubscribed-t': 'warn',\n 'ai-i18n/static-candidate-limit': 'warn',\n },\n },\n];\n\nplugin.configs!.vue = [\n {\n files: ['**/*.{js,mjs,ts,mts,jsx,tsx,vue}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: { defineI18nMessages: 'readonly' },\n },\n rules: {\n 'ai-i18n/t-static-args': 'error',\n 'ai-i18n/no-embedded-markup': 'warn',\n 'ai-i18n/no-eager-translation': ['warn', { framework: 'vue' }],\n 'ai-i18n/no-unsubscribed-runtime-state': ['warn', { framework: 'vue' }],\n 'ai-i18n/no-unsubscribed-t': ['warn', { framework: 'vue' }],\n 'ai-i18n/static-candidate-limit': 'warn',\n },\n },\n];\n\n// 自动导入 preset 必须与 Vite 各模式实际注入的 API 一一对应。\nplugin.configs!['vanilla-auto-import'] = [\n {\n files: ['**/*.{js,mjs,ts,mts}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: {\n ...Object.fromEntries(\n RUNTIME_AUTO_IMPORTS.map((name) => [name, 'readonly']),\n ),\n defineI18nMessages: 'readonly',\n },\n },\n rules: {\n 'ai-i18n/t-static-args': ['error', { autoImport: ['t'] }],\n 'ai-i18n/no-embedded-markup': ['warn', { autoImport: ['t'] }],\n 'ai-i18n/no-eager-translation': ['warn', { autoImport: ['t'] }],\n 'ai-i18n/no-unsubscribed-runtime-state': [\n 'warn',\n { autoImport: ['getLang', 'getLangLoadState'] },\n ],\n 'ai-i18n/static-candidate-limit': ['warn', { autoImport: ['t'] }],\n },\n },\n];\n\nplugin.configs!['vue-auto-import'] = [\n {\n files: ['**/*.{js,mjs,ts,mts,jsx,tsx,vue}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: {\n ...Object.fromEntries(\n VUE_AUTO_IMPORTS.map((name) => [name, 'readonly']),\n ),\n defineI18nMessages: 'readonly',\n },\n },\n rules: {\n 'ai-i18n/t-static-args': [\n 'error',\n { autoImport: ['t', 'tRef', 'tComputed', 'useI18n'] },\n ],\n 'ai-i18n/no-embedded-markup': [\n 'warn',\n { autoImport: ['t', 'tRef', 'tComputed', 'useI18n'] },\n ],\n 'ai-i18n/no-eager-translation': [\n 'warn',\n {\n autoImport: ['t', 'tRef', 'tComputed', 'useI18n'],\n framework: 'vue',\n },\n ],\n 'ai-i18n/no-unsubscribed-runtime-state': [\n 'warn',\n {\n autoImport: ['getLang', 'getLangLoadState', 'i18nComputed'],\n framework: 'vue',\n },\n ],\n 'ai-i18n/no-unsubscribed-t': [\n 'warn',\n {\n autoImport: ['t', 'tRef', 'tComputed', 'useI18n'],\n framework: 'vue',\n },\n ],\n 'ai-i18n/static-candidate-limit': [\n 'warn',\n { autoImport: ['t', 'tRef', 'tComputed', 'useI18n'] },\n ],\n },\n },\n];\n\nplugin.configs!['react-auto-import'] = [\n {\n files: ['**/*.{js,mjs,ts,mts,jsx,tsx}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: {\n ...Object.fromEntries(\n REACT_AUTO_IMPORTS.map((name) => [name, 'readonly']),\n ),\n defineI18nMessages: 'readonly',\n },\n },\n rules: {\n 'ai-i18n/t-static-args': ['error', { autoImport: ['t', 'useI18n'] }],\n 'ai-i18n/no-embedded-markup': ['warn', { autoImport: ['t', 'useI18n'] }],\n 'ai-i18n/no-eager-translation': [\n 'warn',\n { autoImport: ['t', 'useI18n'] },\n ],\n 'ai-i18n/no-unsubscribed-runtime-state': [\n 'warn',\n { autoImport: ['getLang', 'getLangLoadState'] },\n ],\n 'ai-i18n/no-unsubscribed-t': ['warn', { autoImport: ['t', 'useI18n'] }],\n 'ai-i18n/static-candidate-limit': [\n 'warn',\n { autoImport: ['t', 'useI18n'] },\n ],\n },\n },\n];\n\nexport {\n noEmbeddedMarkup,\n noEagerTranslation,\n noRedundantAutoImport,\n noUnsubscribedRuntimeState,\n noUnsubscribedT,\n staticCandidateLimit,\n tStaticArgs,\n};\nexport default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F;EACA,yCAAyC,CACvC,QACA;GACE,YAAY;IAAC;IAAW;IAAoB;GAAc;GAC1D,WAAW;EACb,CACF;EACA,6BAA6B,CAC3B,QACA;GACE,YAAY;IAAC;IAAK;IAAQ;IAAa;GAAS;GAChD,WAAW;EACb,CACF;EACA,kCAAkC,CAChC,QACA,EAAE,YAAY;GAAC;GAAK;GAAQ;GAAa;EAAS,EAAE,CACtD;CACF;AACF,CACF;AAEA,OAAO,QAAS,uBAAuB,CACrC;CACE,OAAO,CAAC,8BAA8B;CACtC,SAAS,EAAE,WAAW,OAAO;CAC7B,iBAAiB,EACf,SAAS;EACP,GAAG,OAAO,YACR,mBAAmB,KAAK,SAAS,CAAC,MAAM,UAAU,CAAC,CACrD;EACA,oBAAoB;CACtB,EACF;CACA,OAAO;EACL,yBAAyB,CAAC,SAAS,EAAE,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;EACnE,8BAA8B,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;EACvE,gCAAgC,CAC9B,QACA,EAAE,YAAY,CAAC,KAAK,SAAS,EAAE,CACjC;EACA,yCAAyC,CACvC,QACA,EAAE,YAAY,CAAC,WAAW,kBAAkB,EAAE,CAChD;EACA,6BAA6B,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;EACtE,kCAAkC,CAChC,QACA,EAAE,YAAY,CAAC,KAAK,SAAS,EAAE,CACjC;CACF;AACF,CACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["isFile","normalizeAutoImports","normalizeAutoImports","isDirectOptionsFunction","isDirectOptionsFunction","RUNTIME_MODULE","isDirectOptionsFunction","RUNTIME_MODULE","findVariable","container"],"sources":["../src/auto-imports.ts","../src/tsconfig-projects.ts","../src/resolve-import.ts","../src/analyze.ts","../src/vue-sfc.ts","../src/rule-analysis.ts","../src/rules/common/translation-call.ts","../src/rules/common/ast-context.ts","../src/rules/vue/options.ts","../src/rules/common/no-eager-translation.ts","../src/rules/common/no-embedded-markup.ts","../src/rules/common/no-redundant-auto-import.ts","../src/rules/vue/runtime-state.ts","../src/rules/common/no-unsubscribed-runtime-state.ts","../src/rules/react/no-unsubscribed-t.ts","../src/rules/vue/instance-member.ts","../src/rules/vue/no-unsubscribed-t.ts","../src/rules/common/no-unsubscribed-t.ts","../src/rules/common/static-candidate-limit.ts","../src/rules/common/t-static-args.ts","../src/index.ts"],"sourcesContent":["export const RUNTIME_AUTO_IMPORTS = [\n 't',\n 'setLang',\n 'getLang',\n 'getLangs',\n 'getLangLoadState',\n 'subscribe',\n] as const;\n\nexport const VUE_AUTO_IMPORTS = [\n 'useI18n',\n ...RUNTIME_AUTO_IMPORTS,\n 'tRef',\n 'i18nComputed',\n 'tComputed',\n] as const;\n\nexport const REACT_AUTO_IMPORTS = ['useI18n', ...RUNTIME_AUTO_IMPORTS] as const;\n\nexport const ALL_AUTO_IMPORT_APIS = [...VUE_AUTO_IMPORTS] as const;\n\nexport type AutoImportApi = (typeof ALL_AUTO_IMPORT_APIS)[number];\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport {\n createFilesMatcher,\n createPathsMatcher,\n parseTsconfig,\n type FileMatcher,\n type PathsMatcher,\n type TsConfigResult,\n} from 'get-tsconfig';\nimport picomatch from 'picomatch';\n\nconst PROJECT_CACHE_TTL_MS = 250;\nconst MAX_PROJECT_CACHE_ENTRIES = 1_000;\nconst READ_FILE_CACHE_PREFIX = 'readFileSync:';\nconst READ_FILE_CACHE_SUFFIX = ':utf8';\n\ninterface TsConfigProject {\n config: TsConfigResult;\n filesMatcher: FileMatcher;\n pathsMatcher: PathsMatcher | null;\n}\n\ninterface CachedProjectGraph {\n expiresAt: number;\n projects: TsConfigProject[];\n stamps: Map<string, string | null>;\n}\n\ninterface CachedDiscovery {\n expiresAt: number;\n configPath: string | null;\n}\n\nconst projectGraphCache = new Map<string, CachedProjectGraph>();\nconst discoveryCache = new Map<string, CachedDiscovery>();\n\nexport function createTsconfigResolver(tsconfigPath?: string) {\n const explicitRoot = tsconfigPath\n ? path.normalize(path.resolve(tsconfigPath))\n : undefined;\n\n return (specifier: string, importer: string): readonly string[] => {\n const rootConfig = explicitRoot ?? findNearestProjectConfig(importer);\n if (!rootConfig) return [];\n const project = selectProject(loadProjectGraph(rootConfig), importer);\n return project?.pathsMatcher?.(specifier) ?? [];\n };\n}\n\nfunction findNearestProjectConfig(importer: string): string | null {\n let directory = path.dirname(path.resolve(importer));\n const now = Date.now();\n const cached = discoveryCache.get(directory);\n if (cached && cached.expiresAt > now) return cached.configPath;\n const visited: string[] = [];\n\n for (;;) {\n visited.push(directory);\n for (const filename of ['tsconfig.json', 'jsconfig.json']) {\n const candidate = path.join(directory, filename);\n if (isFile(candidate)) {\n cacheDiscovery(visited, candidate, now);\n return candidate;\n }\n }\n const parent = path.dirname(directory);\n if (parent === directory) {\n cacheDiscovery(visited, null, now);\n return null;\n }\n directory = parent;\n }\n}\n\nfunction cacheDiscovery(\n directories: readonly string[],\n configPath: string | null,\n now: number,\n) {\n if (discoveryCache.size >= MAX_PROJECT_CACHE_ENTRIES) {\n discoveryCache.clear();\n }\n for (const directory of directories) {\n discoveryCache.set(directory, {\n expiresAt: now + PROJECT_CACHE_TTL_MS,\n configPath,\n });\n }\n}\n\nfunction loadProjectGraph(rootConfig: string): readonly TsConfigProject[] {\n const cached = projectGraphCache.get(rootConfig);\n if (cached && projectGraphIsFresh(cached)) return cached.projects;\n\n const projects: TsConfigProject[] = [];\n const stamps = new Map<string, string | null>();\n const parsingCache = new Map<string, string>();\n const visited = new Set<string>();\n visitProject(rootConfig, projects, stamps, parsingCache, visited);\n\n if (projectGraphCache.size >= MAX_PROJECT_CACHE_ENTRIES) {\n projectGraphCache.clear();\n }\n projectGraphCache.set(rootConfig, {\n expiresAt: Date.now() + PROJECT_CACHE_TTL_MS,\n projects,\n stamps,\n });\n return projects;\n}\n\nfunction visitProject(\n filename: string,\n projects: TsConfigProject[],\n stamps: Map<string, string | null>,\n parsingCache: Map<string, string>,\n visited: Set<string>,\n) {\n filename = path.normalize(path.resolve(filename));\n if (visited.has(filename)) return;\n visited.add(filename);\n stamps.set(filename, readFileStamp(filename));\n\n let config: TsConfigResult;\n try {\n config = {\n path: filename,\n config: parseTsconfig(filename, parsingCache),\n };\n captureParsedConfigStamps(parsingCache, stamps);\n } catch {\n return;\n }\n\n // references 按声明顺序优先于 solution config 本身,匹配具体项目后再回退根配置。\n for (const reference of config.config.references ?? []) {\n const referenced = resolveReference(filename, reference.path);\n if (referenced) {\n visitProject(referenced, projects, stamps, parsingCache, visited);\n }\n }\n\n try {\n projects.push({\n config,\n filesMatcher: createProjectFilesMatcher(config),\n pathsMatcher: createCompatiblePathsMatcher(config),\n });\n } catch {\n // 无效的 include、exclude 或 paths 与当前项目不提供 alias 等价。\n }\n}\n\nfunction createProjectFilesMatcher(config: TsConfigResult): FileMatcher {\n if (\n path.basename(config.path).toLowerCase() !== 'jsconfig.json' ||\n config.config.compilerOptions?.allowJs !== undefined\n ) {\n return createFilesMatcher(config);\n }\n return createFilesMatcher({\n ...config,\n config: {\n ...config.config,\n compilerOptions: {\n ...config.config.compilerOptions,\n allowJs: true,\n },\n },\n });\n}\n\nfunction captureParsedConfigStamps(\n parsingCache: ReadonlyMap<string, unknown>,\n stamps: Map<string, string | null>,\n) {\n // get-tsconfig 的共享缓存会列出 extends 链读取过的文件,一并纳入失效判断。\n for (const key of parsingCache.keys()) {\n if (\n !key.startsWith(READ_FILE_CACHE_PREFIX) ||\n !key.endsWith(READ_FILE_CACHE_SUFFIX)\n ) {\n continue;\n }\n const filename = key.slice(\n READ_FILE_CACHE_PREFIX.length,\n -READ_FILE_CACHE_SUFFIX.length,\n );\n stamps.set(filename, readFileStamp(filename));\n }\n}\n\nfunction createCompatiblePathsMatcher(\n config: TsConfigResult,\n): PathsMatcher | null {\n const compilerOptions = config.config.compilerOptions;\n const paths = compilerOptions?.paths;\n if (!paths || compilerOptions.baseUrl) return createPathsMatcher(config);\n\n // TS 5.x/6.x 接受无 baseUrl 时不带 \"./\" 的 target;get-tsconfig 默认更严格。\n const compatiblePaths = Object.fromEntries(\n Object.entries(paths).map(([pattern, targets]) => [\n pattern,\n targets.map((target) =>\n path.isAbsolute(target) || target.startsWith('.')\n ? target\n : `./${target}`,\n ),\n ]),\n );\n return createPathsMatcher({\n path: config.path,\n config: {\n ...config.config,\n compilerOptions: {\n ...compilerOptions,\n paths: compatiblePaths,\n },\n },\n });\n}\n\nfunction resolveReference(\n ownerConfig: string,\n referencePath: string,\n): string | null {\n const candidate = path.resolve(path.dirname(ownerConfig), referencePath);\n const attempts = [\n candidate,\n candidate.endsWith('.json') ? candidate : `${candidate}.json`,\n path.join(candidate, 'tsconfig.json'),\n ];\n return attempts.find(isFile) ?? null;\n}\n\nfunction selectProject(\n projects: readonly TsConfigProject[],\n importer: string,\n): TsConfigProject | undefined {\n const absoluteImporter = path.resolve(importer);\n return projects.find((project) =>\n projectMatchesImporter(project, absoluteImporter),\n );\n}\n\nfunction projectMatchesImporter(\n project: TsConfigProject,\n importer: string,\n): boolean {\n if (path.extname(importer) !== '.vue') {\n return Boolean(project.filesMatcher(importer));\n }\n return matchesExplicitVueInput(project.config, importer);\n}\n\nfunction matchesExplicitVueInput(\n { config, path: configPath }: TsConfigResult,\n importer: string,\n): boolean {\n const directory = path.dirname(configPath);\n const relative = normalizePath(path.relative(directory, importer));\n if (relative.startsWith('../')) return false;\n\n if (\n config.files?.some(\n (file) => path.resolve(directory, file) === path.resolve(importer),\n )\n ) {\n return true;\n }\n if (config.exclude?.some((pattern) => matchesExclude(relative, pattern))) {\n return false;\n }\n return Boolean(\n config.include?.some(\n (pattern) =>\n pattern.includes('.vue') &&\n picomatch.isMatch(relative, normalizePath(pattern), { dot: true }),\n ),\n );\n}\n\nfunction matchesExclude(relative: string, pattern: string): boolean {\n pattern = normalizePath(pattern).replace(/\\/+$/, '');\n return (\n picomatch.isMatch(relative, pattern, { dot: true }) ||\n picomatch.isMatch(relative, `${pattern}/**`, { dot: true })\n );\n}\n\nfunction projectGraphIsFresh(cached: CachedProjectGraph): boolean {\n if (cached.expiresAt <= Date.now()) return false;\n for (const [filename, stamp] of cached.stamps) {\n if (readFileStamp(filename) !== stamp) return false;\n }\n return true;\n}\n\nfunction readFileStamp(filename: string): string | null {\n try {\n const stat = fs.statSync(filename);\n return stat.isFile()\n ? `${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`\n : null;\n } catch {\n return null;\n }\n}\n\nfunction isFile(filename: string): boolean {\n try {\n return fs.statSync(filename).isFile();\n } catch {\n return false;\n }\n}\n\nfunction normalizePath(filename: string): string {\n return filename.replaceAll('\\\\', '/');\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport { createTsconfigResolver } from './tsconfig-projects.js';\n\nconst SOURCE_EXTENSIONS = [\n '',\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.mts',\n '.mjs',\n] as const;\nconst DIRECTORY_STAMP_TTL_MS = 250;\nconst MAX_PROBE_CACHE_ENTRIES = 10_000;\n\ninterface CachedDirectoryStamp {\n expiresAt: number;\n value: string | null;\n}\n\ninterface CachedProbe {\n candidateDirectory: string | null;\n expiresAt: number;\n parentDirectory: string | null;\n resolved: string | null;\n}\n\nconst directoryStampCache = new Map<string, CachedDirectoryStamp>();\nconst probeCache = new Map<string, CachedProbe>();\n\nexport type ImportAlias = Readonly<Record<string, string>>;\n\ninterface AliasEntry {\n find: string;\n replacement: string;\n}\n\nexport function createImportResolver(\n tsconfigPath?: string,\n alias?: ImportAlias,\n) {\n const aliases = normalizeAliases(alias);\n const resolveTsconfig = createTsconfigResolver(tsconfigPath);\n\n return (specifier: string, importer: string): string | null => {\n if (specifier === 'virtual:ai-i18n') return specifier;\n const aliasCandidate = resolveAlias(specifier, aliases);\n if (aliasCandidate) return probeSource(aliasCandidate);\n if (specifier.startsWith('.')) {\n return probeSource(path.resolve(path.dirname(importer), specifier));\n }\n for (const candidate of resolveTsconfig(specifier, importer)) {\n const resolved = probeSource(candidate);\n if (resolved) return resolved;\n }\n return null;\n };\n}\n\nfunction normalizeAliases(\n alias: ImportAlias | undefined,\n): readonly AliasEntry[] {\n return Object.entries(alias ?? {}).map(([find, replacement]) => {\n if (!find) {\n throw new TypeError(\n diagnosticMessage(\n 'ai-i18n alias 的匹配键不能为空。',\n 'The ai-i18n alias match key must not be empty.',\n ),\n );\n }\n if (typeof replacement !== 'string' || !path.isAbsolute(replacement)) {\n throw new TypeError(\n diagnosticMessage(\n `ai-i18n alias \"${find}\" 的 replacement 必须是绝对路径。`,\n `The replacement for ai-i18n alias \"${find}\" must be an absolute path.`,\n ),\n );\n }\n return { find, replacement };\n });\n}\n\nfunction resolveAlias(\n specifier: string,\n aliases: readonly AliasEntry[],\n): string | null {\n for (const { find, replacement } of aliases) {\n if (specifier === find || specifier.startsWith(`${find}/`)) {\n return path.normalize(`${replacement}${specifier.slice(find.length)}`);\n }\n }\n return null;\n}\n\nfunction probeSource(candidate: string): string | null {\n candidate = path.normalize(candidate);\n if (/\\.(?:cjs|cts)$/i.test(candidate)) return null;\n const cached = probeCache.get(candidate);\n if (\n cached &&\n (cached.resolved !== null || cached.expiresAt > Date.now()) &&\n cached.parentDirectory === readDirectoryStamp(path.dirname(candidate)) &&\n cached.candidateDirectory === readDirectoryStamp(candidate)\n ) {\n return cached.resolved;\n }\n\n let resolved: string | null = null;\n for (const extension of SOURCE_EXTENSIONS) {\n const file = `${candidate}${extension}`;\n if (isFile(file)) {\n resolved = path.normalize(file);\n break;\n }\n }\n if (!resolved) {\n for (const extension of SOURCE_EXTENSIONS.slice(1)) {\n const file = path.join(candidate, `index${extension}`);\n if (isFile(file)) {\n resolved = path.normalize(file);\n break;\n }\n }\n }\n if (probeCache.size >= MAX_PROBE_CACHE_ENTRIES) probeCache.clear();\n probeCache.set(candidate, {\n parentDirectory: readDirectoryStamp(path.dirname(candidate)),\n candidateDirectory: readDirectoryStamp(candidate),\n expiresAt: Date.now() + DIRECTORY_STAMP_TTL_MS,\n resolved,\n });\n return resolved;\n}\n\nfunction isFile(file: string) {\n try {\n return fs.statSync(file).isFile();\n } catch {\n return false;\n }\n}\n\nfunction readDirectoryStamp(directory: string): string | null {\n const now = Date.now();\n const cached = directoryStampCache.get(directory);\n if (cached && cached.expiresAt > now) return cached.value;\n let value: string | null = null;\n try {\n const stat = fs.statSync(directory);\n if (stat.isDirectory()) {\n value = `${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`;\n }\n } catch {\n // 不存在的目录也要缓存,避免重复的失败探测。\n }\n if (directoryStampCache.size >= MAX_PROBE_CACHE_ENTRIES) {\n directoryStampCache.clear();\n }\n directoryStampCache.set(directory, {\n expiresAt: now + DIRECTORY_STAMP_TTL_MS,\n value,\n });\n return value;\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport {\n AI_I18N_VIRTUAL_MODULE_ID,\n Analyzer,\n extractMessages,\n findInvalidDefineI18nMessagesReferences,\n findRuntimeTypedLocalTranslationCalls,\n findTranslationCalls,\n findUnboundCalls,\n validateRecommendedUsage,\n type Module,\n type ExtractWarningCode,\n type ExtractedMessage,\n type RecommendedUsageCode,\n type AnalysisLanguage,\n type TranslationCall,\n type TranslationHookBinding,\n type TranslationRuntimeApi,\n} from '@ai-i18n/analyzer';\nimport { createImportResolver, type ImportAlias } from './resolve-import.js';\n\nexport interface StaticArgsWarning {\n code: ExtractWarningCode | RecommendedUsageCode;\n line: number;\n column: number;\n message: string;\n}\n\nexport interface StaticAnalysisResult {\n warnings: StaticArgsWarning[];\n translationCalls: TranslationCall[];\n messages: ExtractedMessage[];\n}\n\nexport type AutoImportApi = 't' | 'tRef' | 'tComputed' | 'useI18n';\nexport type AutoImportOption = boolean | readonly AutoImportApi[];\n\ninterface AutoImportBindings {\n t: boolean;\n tRef: boolean;\n tComputed: boolean;\n useI18n: boolean;\n}\n\nconst POTENTIAL_TRANSLATION_RE =\n /virtual:ai-i18n|\\b(?:t|tRef|tComputed|useI18n|defineI18nMessages)\\b/;\n\nexport function analyzeStaticArgs(\n code: string,\n filename: string,\n tsconfigPath?: string,\n lang?: AnalysisLanguage,\n autoImport: AutoImportOption = false,\n maxStaticCandidates = Number.POSITIVE_INFINITY,\n alias?: ImportAlias,\n): StaticArgsWarning[] {\n return analyzeStaticSource(\n code,\n filename,\n tsconfigPath,\n lang,\n autoImport,\n maxStaticCandidates,\n alias,\n ).warnings;\n}\n\nexport function analyzeStaticSource(\n code: string,\n filename: string,\n tsconfigPath?: string,\n lang?: AnalysisLanguage,\n autoImport: AutoImportOption = false,\n maxStaticCandidates = Number.POSITIVE_INFINITY,\n alias?: ImportAlias,\n): StaticAnalysisResult {\n if (!hasPotentialTranslationCandidate(code)) {\n return { warnings: [], translationCalls: [], messages: [] };\n }\n const autoImports = normalizeAutoImports(autoImport);\n const translationAutoImports = runtimeAutoImports(autoImports);\n const resolve = createImportResolver(tsconfigPath, alias);\n const analyzer = new Analyzer({ resolve });\n analyzer.addFile(\n AI_I18N_VIRTUAL_MODULE_ID,\n 'export function t(source) { return source } export function tRef(source) { return source } export function tComputed(source) { return source }',\n );\n const entryPath = normalizeFilename(filename);\n const entry = analyzer.addFile(entryPath, code, lang ? { lang } : undefined);\n if (!hasTranslationCandidate(entry, autoImports)) {\n return { warnings: [], translationCalls: [], messages: [] };\n }\n loadDependencies(analyzer, entry, resolve);\n analyzer.link();\n const hooks = translationHooks(autoImports);\n const extraction = extractMessages(\n entry,\n AI_I18N_VIRTUAL_MODULE_ID,\n hooks,\n translationAutoImports,\n maxStaticCandidates,\n );\n const recommended = validateRecommendedUsage(\n entry,\n AI_I18N_VIRTUAL_MODULE_ID,\n hooks,\n translationAutoImports,\n );\n const warnings = recommended.length\n ? [\n ...extraction.warnings.filter(\n (warning) => warning.code === 'parse-error',\n ),\n ...extraction.warnings.filter(\n (warning) =>\n warning.code === 'static-candidate-limit' ||\n warning.code === 'unrecognized-runtime-t-binding',\n ),\n ...recommended,\n ]\n : extraction.warnings;\n return {\n warnings: warnings.map(({ code: warningCode, line, column, message }) => ({\n code: warningCode,\n line,\n column,\n message,\n })),\n translationCalls: findTranslationCalls(\n entry,\n AI_I18N_VIRTUAL_MODULE_ID,\n hooks,\n translationAutoImports,\n ),\n messages: extraction.messages,\n };\n}\n\nexport function hasPotentialTranslationCandidate(code: string): boolean {\n return POTENTIAL_TRANSLATION_RE.test(code);\n}\n\nexport function normalizeAutoImports(\n autoImport: AutoImportOption | undefined,\n): AutoImportBindings {\n if (typeof autoImport === 'boolean') {\n // boolean 保留跨框架语义;Vue-only API 由 Vue preset 显式声明。\n return {\n t: autoImport,\n tRef: false,\n tComputed: false,\n useI18n: autoImport,\n };\n }\n return {\n t: autoImport?.includes('t') ?? false,\n tRef: autoImport?.includes('tRef') ?? false,\n tComputed: autoImport?.includes('tComputed') ?? false,\n useI18n: autoImport?.includes('useI18n') ?? false,\n };\n}\n\nfunction hasTranslationCandidate(\n module: Module,\n autoImports: AutoImportBindings,\n): boolean {\n const unbound = ['defineI18nMessages'];\n if (autoImports.t) unbound.push('t');\n if (autoImports.tRef) unbound.push('tRef');\n if (autoImports.tComputed) unbound.push('tComputed');\n if (autoImports.useI18n) unbound.push('useI18n');\n return (\n module.imports.some(\n (item) =>\n !item.typeOnly &&\n (item.specifier === AI_I18N_VIRTUAL_MODULE_ID ||\n item.name === 't' ||\n item.name === 'tRef' ||\n item.name === 'tComputed' ||\n item.name === 'useI18n'),\n ) ||\n findInvalidDefineI18nMessagesReferences(module).length > 0 ||\n findRuntimeTypedLocalTranslationCalls(module).length > 0 ||\n findUnboundCalls(module, new Set(unbound)).length > 0\n );\n}\n\nfunction translationHooks(\n autoImports: AutoImportBindings,\n): readonly TranslationHookBinding[] {\n return [\n {\n module: AI_I18N_VIRTUAL_MODULE_ID,\n hook: 'useI18n',\n property: 't',\n autoImport: autoImports.useI18n,\n },\n ];\n}\n\nfunction runtimeAutoImports(\n autoImports: AutoImportBindings,\n): ReadonlySet<TranslationRuntimeApi> {\n const names = new Set<TranslationRuntimeApi>();\n if (autoImports.t) names.add('t');\n if (autoImports.tRef) names.add('tRef');\n if (autoImports.tComputed) names.add('tComputed');\n return names;\n}\n\nfunction loadDependencies(\n analyzer: Analyzer,\n entry: Module,\n resolve: (specifier: string, importer: string) => string | null,\n) {\n const queue = [entry];\n const visited = new Set<string>();\n while (queue.length) {\n const module = queue.shift()!;\n if (visited.has(module.path)) continue;\n visited.add(module.path);\n for (const item of module.imports) {\n const resolved = resolve(item.specifier, module.path);\n if (!resolved || resolved === AI_I18N_VIRTUAL_MODULE_ID) continue;\n let dependency = analyzer.module(resolved);\n if (!dependency) {\n try {\n dependency = analyzer.addFile(\n resolved,\n fs.readFileSync(resolved, 'utf8'),\n );\n } catch {\n continue;\n }\n }\n queue.push(dependency);\n }\n }\n}\n\nfunction normalizeFilename(filename: string) {\n return filename.startsWith('<')\n ? path.resolve('eslint-input.ts')\n : path.resolve(filename);\n}\n","import { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport {\n analyzeVueSource,\n type VueAnalysisSource,\n type VueCompiler,\n} from '@ai-i18n/analyzer/vue';\n\ninterface VueParserServices {\n getDocumentFragment?: () => unknown;\n}\n\ntype Require = ReturnType<typeof createRequire>;\ntype NodeVueCompiler = VueCompiler & {\n registerTS?: (loadTypeScript: () => unknown) => void;\n};\n\nconst packageRequire = createRequire(import.meta.url);\n\nexport function createVueAnalysisSource(\n source: string,\n filename: string,\n parserServices: VueParserServices,\n): VueAnalysisSource {\n if (!parserServices.getDocumentFragment?.()) {\n throw new Error(\n diagnosticMessage(\n '检查 .vue 文件需要配置 vue-eslint-parser。',\n 'Configure vue-eslint-parser to lint .vue files.',\n ),\n );\n }\n\n try {\n // Vue preset 真正处理 SFC 时才加载编译器,不影响 React/Vanilla 项目。\n const compiler = loadVueCompiler(filename);\n return analyzeVueSource(source, filename, compiler);\n } catch (error) {\n if (isMissingVueCompiler(error)) {\n throw new Error(\n diagnosticMessage(\n '检查 .vue 文件需要安装 @vue/compiler-sfc。',\n 'Install @vue/compiler-sfc to lint .vue files.',\n ),\n );\n }\n throw error;\n }\n}\n\nfunction loadVueCompiler(filename: string): VueCompiler {\n const hostRequire = createRequire(path.resolve(filename));\n // 优先复用宿主 Vue 的 Node wrapper,它会为 imported types 注册 TypeScript。\n const compiler = (tryRequire(hostRequire, 'vue/compiler-sfc') ??\n tryRequire(packageRequire, 'vue/compiler-sfc') ??\n tryRequire(hostRequire, '@vue/compiler-sfc') ??\n packageRequire('@vue/compiler-sfc')) as NodeVueCompiler;\n compiler.registerTS?.(() => {\n const typescript =\n tryResolve(hostRequire, 'typescript') ??\n tryResolve(packageRequire, 'typescript');\n return packageRequire(typescript ?? 'typescript');\n });\n return compiler;\n}\n\nfunction tryRequire(require: Require, id: string): unknown {\n const resolved = tryResolve(require, id);\n return resolved ? require(resolved) : null;\n}\n\nfunction tryResolve(require: Require, id: string): string | null {\n try {\n return require.resolve(id);\n } catch (error) {\n if (isMissingVueCompiler(error)) return null;\n throw error;\n }\n}\n\nfunction isMissingVueCompiler(error: unknown): boolean {\n return (\n error instanceof Error &&\n 'code' in error &&\n (error.code === 'MODULE_NOT_FOUND' ||\n error.code === 'ERR_PACKAGE_PATH_NOT_EXPORTED')\n );\n}\n","import type { Rule } from 'eslint';\nimport {\n analyzeStaticSource,\n hasPotentialTranslationCandidate,\n normalizeAutoImports,\n type AutoImportOption,\n type StaticAnalysisResult,\n type StaticArgsWarning,\n} from './analyze.js';\nimport {\n diagnosticMessage,\n type ExtractedMessage,\n type TranslationCall,\n} from '@ai-i18n/analyzer';\nimport { createVueAnalysisSource } from './vue-sfc.js';\nimport type { ImportAlias } from './resolve-import.js';\n\ninterface RuleAnalysisOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\ninterface CachedAnalysis {\n source: ReturnType<typeof createAnalysisSource>;\n analyses: Map<string, StaticAnalysisResult>;\n}\n\nconst DEFAULT_CANDIDATE_LIMIT = 1_000;\nconst cache = new WeakMap<object, CachedAnalysis>();\nconst reportedAnalysisFailures = new WeakSet<object>();\nconst EMPTY_ANALYSIS: StaticAnalysisResult = {\n warnings: [],\n translationCalls: [],\n messages: [],\n};\n\nexport function analyzeRuleContext(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n maxStaticCandidates = Number.POSITIVE_INFINITY,\n): StaticArgsWarning[] {\n return analyzeRuleContextResult(context, options, maxStaticCandidates)\n .warnings;\n}\n\nexport function analyzeTranslationCalls(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n): TranslationCall[] {\n return analyzeRuleContextResult(context, options, DEFAULT_CANDIDATE_LIMIT)\n .translationCalls;\n}\n\nexport function analyzeTranslationMessages(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n): ExtractedMessage[] {\n return analyzeRuleContextResult(context, options, Number.POSITIVE_INFINITY)\n .messages;\n}\n\nexport function reportAnalysisFailureOnce(\n context: Rule.RuleContext,\n node: Rule.Node,\n error: unknown,\n): void {\n if (reportedAnalysisFailures.has(context.sourceCode)) return;\n reportedAnalysisFailures.add(context.sourceCode);\n const detail = error instanceof Error ? error.message : String(error);\n context.report({\n node,\n message: diagnosticMessage(\n `静态分析失败:${detail}`,\n `Static analysis failed: ${detail}`,\n ),\n });\n}\n\nfunction analyzeRuleContextResult(\n context: Rule.RuleContext,\n options: RuleAnalysisOptions,\n maxStaticCandidates: number,\n): StaticAnalysisResult {\n if (!hasPotentialTranslationCandidate(context.sourceCode.text)) {\n return EMPTY_ANALYSIS;\n }\n const cached: CachedAnalysis = cache.get(context.sourceCode) ?? {\n source: createAnalysisSource(context),\n analyses: new Map<string, StaticAnalysisResult>(),\n };\n cache.set(context.sourceCode, cached);\n const alias = readImportAlias(context);\n\n const analyze = (limit: number) => {\n const autoImports = normalizeAutoImports(options.autoImport);\n const key = JSON.stringify([\n options.tsconfigPath ?? null,\n autoImports.t,\n autoImports.tRef,\n autoImports.tComputed,\n autoImports.useI18n,\n Object.entries(alias ?? {}),\n limit,\n ]);\n const existing = cached.analyses.get(key);\n if (existing) return existing;\n const result = analyzeStaticSource(\n cached.source.code,\n context.filename,\n options.tsconfigPath,\n cached.source.lang,\n options.autoImport,\n limit,\n alias,\n );\n const analysis = {\n warnings: result.warnings.map((warning) => ({\n ...warning,\n ...cached.source.mapLocation(warning),\n })),\n translationCalls: result.translationCalls.map((call) => ({\n ...call,\n ...cached.source.mapLocation(call),\n })),\n messages: result.messages.map((message) => ({\n ...message,\n locations: message.locations.map((location) => ({\n ...location,\n ...cached.source.mapLocation(location),\n })),\n })),\n };\n cached.analyses.set(key, analysis);\n return analysis;\n };\n\n if (Number.isFinite(maxStaticCandidates)) {\n return analyze(maxStaticCandidates);\n }\n const preflight = analyze(DEFAULT_CANDIDATE_LIMIT);\n return preflight.warnings.some(\n (warning) => warning.code === 'static-candidate-limit',\n )\n ? analyze(Number.POSITIVE_INFINITY)\n : preflight;\n}\n\nfunction readImportAlias(context: Rule.RuleContext): ImportAlias | undefined {\n const settings = context.settings['ai-i18n'];\n if (!settings || typeof settings !== 'object' || Array.isArray(settings)) {\n return undefined;\n }\n const alias = (settings as { alias?: unknown }).alias;\n if (alias === undefined) return undefined;\n if (!alias || typeof alias !== 'object' || Array.isArray(alias)) {\n throw new TypeError(\n diagnosticMessage(\n 'ai-i18n settings.alias 必须是字符串到绝对路径的对象。',\n 'ai-i18n settings.alias must be an object mapping strings to absolute paths.',\n ),\n );\n }\n return alias as ImportAlias;\n}\n\nfunction createAnalysisSource(context: Rule.RuleContext) {\n return context.filename.endsWith('.vue')\n ? createVueAnalysisSource(\n context.sourceCode.text,\n context.filename,\n context.sourceCode.parserServices,\n )\n : {\n code: context.sourceCode.text,\n lang: undefined,\n mapLocation: (location: { line: number; column: number }) => location,\n };\n}\n","import type { TranslationCall } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport type { AutoImportOption } from '../../analyze.js';\nimport { analyzeTranslationCalls } from '../../rule-analysis.js';\n\nexport interface TranslationRuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\nexport interface TranslationCandidate {\n kind: TranslationCall['kind'];\n node: Rule.Node;\n}\n\nexport interface MatchedTranslationCall extends TranslationCandidate {\n call: TranslationCall;\n}\n\nexport function matchTranslationCalls(\n context: Rule.RuleContext,\n options: TranslationRuleOptions,\n candidates: readonly TranslationCandidate[],\n): MatchedTranslationCall[] {\n const calls = new Map(\n analyzeTranslationCalls(context, options).map((call) => [\n locationKey(call.line, call.column, call.kind),\n call,\n ]),\n );\n return candidates.flatMap((candidate) => {\n const location = candidate.node.loc?.start;\n if (!location) return [];\n const call = calls.get(\n locationKey(location.line, location.column, candidate.kind),\n );\n return call ? [{ ...candidate, call }] : [];\n });\n}\n\nfunction locationKey(\n line: number,\n column: number,\n kind: TranslationCall['kind'],\n): string {\n return `${kind}:${line}:${column}`;\n}\n","import type { Rule } from 'eslint';\n\n// 这里只保留跨框架共用的 AST 上下文判定。\nconst FUNCTION_TYPES = new Set([\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n]);\nconst IMMEDIATE_CONSOLE_METHODS = new Set([\n 'debug',\n 'error',\n 'info',\n 'log',\n 'warn',\n]);\n\nexport interface ParentNode {\n type: string;\n parent: ParentNode | null;\n expression?: unknown;\n}\n\nexport function isFunctionNode(node: { type: string }): boolean {\n return FUNCTION_TYPES.has(node.type);\n}\n\nexport function nearestFunction(node: Rule.Node): ParentNode | null {\n let current = node as unknown as ParentNode;\n while (current.parent) {\n current = current.parent;\n if (isFunctionNode(current)) return current;\n }\n return null;\n}\n\nexport function isImmediateConsoleEffect(node: Rule.Node): boolean {\n const call = (node as unknown as ParentNode).parent as CallNode | null;\n if (\n call?.type !== 'CallExpression' ||\n call.parent?.type !== 'ExpressionStatement' ||\n !call.arguments.some((argument) => argument === node) ||\n call.callee.type !== 'MemberExpression' ||\n call.callee.object.type !== 'Identifier' ||\n call.callee.object.name !== 'console'\n ) {\n return false;\n }\n const property = call.callee.property;\n const method =\n !call.callee.computed && property.type === 'Identifier'\n ? (property.name ?? null)\n : call.callee.computed &&\n property.type === 'Literal' &&\n typeof property.value === 'string'\n ? property.value\n : null;\n return method !== null && IMMEDIATE_CONSOLE_METHODS.has(method);\n}\n\nexport function isVueTemplateEventHandler(node: Rule.Node): boolean {\n let current = node as unknown as ParentNode;\n while (current.parent) {\n current = current.parent;\n if (current.type === 'VOnExpression') return true;\n }\n return false;\n}\n\ninterface CallNode extends ParentNode {\n arguments: readonly unknown[];\n callee: {\n type: string;\n computed: boolean;\n object: { type: string; name?: string };\n property: { type: string; name?: string; value?: unknown };\n };\n}\n","import type { Rule } from 'eslint';\nimport {\n isFunctionNode,\n nearestFunction,\n type ParentNode,\n} from '../common/ast-context.js';\n\nexport function isOptionsComputedValue(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n let value = node as unknown as ParentNode;\n while (\n value.parent &&\n isTransparentExpression(value.parent) &&\n expressionChild(value.parent) === value\n ) {\n value = value.parent;\n }\n const entry = value.parent as PropertyNode | null;\n if (entry?.type !== 'Property' || entry.value !== value) return false;\n const entries = entry.parent;\n if (entries?.type !== 'ObjectExpression') return false;\n const computed = entries.parent as PropertyNode | null;\n return (\n computed?.type === 'Property' &&\n computed.value === entries &&\n propertyName(computed.key) === 'computed' &&\n computed.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(computed.parent, context)\n );\n}\n\nexport function isOptionsComputedSpread(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n const value = unwrapTransparentParent(node as unknown as ParentNode);\n const spread = value.parent as SpreadNode | null;\n if (spread?.type !== 'SpreadElement' || spread.argument !== value) {\n return false;\n }\n const entries = spread.parent;\n if (entries?.type !== 'ObjectExpression') return false;\n const computed = entries.parent as PropertyNode | null;\n return (\n computed?.type === 'Property' &&\n computed.value === entries &&\n propertyName(computed.key) === 'computed' &&\n computed.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(computed.parent, context)\n );\n}\n\nexport function isInsideOptionsComputedGetter(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n const owner = nearestFunction(node);\n if (!owner) return false;\n let current: ParentNode | null = owner;\n while (current?.parent) {\n const parent = current.parent as PropertyNode;\n if (\n current.type === 'ObjectExpression' &&\n parent.type === 'Property' &&\n parent.value === current &&\n propertyName(parent.key) === 'computed' &&\n parent.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(parent.parent, context)\n ) {\n return true;\n }\n current = current.parent;\n if (current && current !== owner && isFunctionNode(current)) {\n return false;\n }\n }\n return false;\n}\n\nexport function vueOptionsSection(\n node: Rule.Node,\n context: Rule.RuleContext,\n): string | null {\n let current = node as unknown as ParentNode;\n while (current.parent) {\n const property = current.parent as PropertyNode;\n if (\n property.type === 'Property' &&\n property.value === current &&\n property.parent?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(property.parent, context)\n ) {\n return propertyName(property.key) ?? null;\n }\n current = current.parent;\n }\n return null;\n}\n\nexport function isDirectOptionsFunction(\n node: ParentNode,\n context: Rule.RuleContext,\n name: string,\n allowBareExportDefault = true,\n): boolean {\n const value = unwrapTransparentParent(node);\n const property = value.parent as PropertyNode | null;\n if (\n property?.type !== 'Property' ||\n property.value !== value ||\n propertyName(property.key) !== name\n ) {\n return false;\n }\n const options = property.parent;\n return (\n options?.type === 'ObjectExpression' &&\n isVueComponentOptionsObject(options, context, allowBareExportDefault)\n );\n}\n\nexport function isVueComponentSetup(\n node: ParentNode,\n context: Rule.RuleContext,\n isVueSfc: boolean,\n): boolean {\n const value = unwrapTransparentParent(node);\n const directOwner = value.parent as OwnerNode | null;\n if (\n directOwner?.type === 'CallExpression' &&\n directOwner.arguments?.[0] === value\n ) {\n return isImportedVueDefineComponent(directOwner.callee, context);\n }\n\n const property = value.parent as PropertyNode | null;\n if (\n property?.type !== 'Property' ||\n property.value !== value ||\n property.computed ||\n propertyName(property.key) !== 'setup'\n ) {\n return false;\n }\n\n const options = property.parent;\n if (options?.type !== 'ObjectExpression') return false;\n const owner = options.parent as OwnerNode | null;\n if (\n isVueSfc &&\n owner?.type === 'ExportDefaultDeclaration' &&\n owner.declaration === options\n ) {\n return true;\n }\n return (\n owner?.type === 'CallExpression' &&\n owner.arguments?.[0] === options &&\n isImportedVueDefineComponent(owner.callee, context)\n );\n}\n\nexport function isVueScriptSetupNode(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n if (!context.filename.toLowerCase().endsWith('.vue') || !node.range) {\n return false;\n }\n const source = context.sourceCode.text;\n const before = source.slice(0, node.range[0]);\n const opening = before.lastIndexOf('<script');\n if (opening <= before.lastIndexOf('</script>')) return false;\n const closing = source.indexOf('>', opening);\n if (closing < 0 || closing >= node.range[0]) return false;\n return /\\bsetup(?:\\s|=|>)/u.test(source.slice(opening, closing + 1));\n}\n\nexport function isImportedVueDefineComponent(\n node: unknown,\n context: Rule.RuleContext,\n): boolean {\n const callee = node as {\n computed?: boolean;\n object?: unknown;\n property?: unknown;\n type?: string;\n };\n if (callee?.type === 'Identifier') {\n return isVueImport(callee, context, 'ImportSpecifier');\n }\n return (\n callee?.type === 'MemberExpression' &&\n !callee.computed &&\n propertyName(callee.property) === 'defineComponent' &&\n isVueImport(callee.object, context, 'ImportNamespaceSpecifier')\n );\n}\n\nexport function propertyName(node: unknown): string | undefined {\n const key = node as { name?: string; type?: string; value?: unknown };\n if (key?.type === 'Identifier') return key.name;\n return key?.type === 'Literal' && typeof key.value === 'string'\n ? key.value\n : undefined;\n}\n\nfunction isVueComponentOptionsObject(\n options: ParentNode,\n context: Rule.RuleContext,\n allowBareExportDefault = true,\n): boolean {\n const value = unwrapTransparentParent(options);\n const owner = value.parent as OwnerNode | null;\n if (\n allowBareExportDefault &&\n owner?.type === 'ExportDefaultDeclaration' &&\n owner.declaration === value\n ) {\n return true;\n }\n return (\n owner?.type === 'CallExpression' &&\n owner.arguments?.[0] === value &&\n isImportedVueDefineComponent(owner.callee, context)\n );\n}\n\nfunction isVueImport(\n node: unknown,\n context: Rule.RuleContext,\n specifierType: 'ImportNamespaceSpecifier' | 'ImportSpecifier',\n): boolean {\n const identifier = node as Rule.Node & { name?: string };\n if (identifier?.type !== 'Identifier' || !identifier.name) return false;\n\n let scope = context.sourceCode.getScope(identifier);\n while (true) {\n const variable = scope.set.get(identifier.name);\n if (!variable) {\n if (!scope.upper) return false;\n scope = scope.upper;\n continue;\n }\n return variable.defs.some((definition) => {\n if (\n definition.type !== 'ImportBinding' ||\n definition.node.type !== specifierType ||\n definition.parent.source.value !== 'vue'\n ) {\n return false;\n }\n return (\n specifierType === 'ImportNamespaceSpecifier' ||\n propertyName((definition.node as { imported?: unknown }).imported) ===\n 'defineComponent'\n );\n });\n }\n}\n\nfunction unwrapTransparentParent(node: ParentNode): ParentNode {\n let value = node;\n while (\n value.parent &&\n isTransparentExpression(value.parent) &&\n expressionChild(value.parent) === value\n ) {\n value = value.parent;\n }\n return value;\n}\n\nfunction isTransparentExpression(node: ParentNode): boolean {\n return (\n node.type === 'TSAsExpression' ||\n node.type === 'TSSatisfiesExpression' ||\n node.type === 'TSNonNullExpression' ||\n node.type === 'TypeCastExpression'\n );\n}\n\nfunction expressionChild(node: ParentNode): unknown {\n return node.expression;\n}\n\ninterface PropertyNode extends ParentNode {\n computed?: boolean;\n key?: unknown;\n value?: unknown;\n}\n\ninterface OwnerNode extends ParentNode {\n arguments?: unknown[];\n callee?: unknown;\n declaration?: unknown;\n}\n\ninterface SpreadNode extends ParentNode {\n argument?: unknown;\n}\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport { reportAnalysisFailureOnce } from '../../rule-analysis.js';\nimport {\n matchTranslationCalls,\n type TranslationCandidate,\n type TranslationRuleOptions,\n} from './translation-call.js';\nimport { isFunctionNode } from './ast-context.js';\nimport {\n isDirectOptionsFunction,\n isVueComponentSetup,\n} from '../vue/options.js';\n\ninterface RuleOptions extends TranslationRuleOptions {\n framework?: 'vue';\n}\n\nexport const noEagerTranslation: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '警告不会随语言切换更新的提前求值翻译结果',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n framework: { enum: ['vue'] },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n eagerTranslation: diagnosticMessage(\n '初始化期间保存的 t() 结果不会随语言切换更新。请改为函数或 Getter,在使用时调用 t();Vue setup 中使用 tRef(),纯 Options API 的 computed 使用 tComputed()。',\n 'A t() result stored during initialization will not update when the language changes. Evaluate it lazily in a function or getter; use tRef() in Vue setup and tComputed() in pure Options API computed.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n const isVueSfc = context.filename.toLowerCase().endsWith('.vue');\n const candidates: TranslationCandidate[] = [];\n return {\n CallExpression(node) {\n candidates.push({ kind: 'call', node });\n },\n TaggedTemplateExpression(node) {\n candidates.push({ kind: 'tagged-template', node });\n },\n 'Program:exit'(program) {\n let matches;\n try {\n matches = matchTranslationCalls(context, options, candidates);\n } catch (error) {\n reportAnalysisFailureOnce(context, program as Rule.Node, error);\n return;\n }\n for (const { call, node } of matches) {\n if (call.origin === 'vue-ref' || call.origin === 'vue-computed') {\n continue;\n }\n if (\n !storesOutsideFunction(\n node,\n context,\n isVueSfc,\n options.framework === 'vue',\n )\n ) {\n continue;\n }\n context.report({ node, messageId: 'eagerTranslation' });\n }\n },\n };\n },\n};\n\nfunction storesOutsideFunction(\n node: Rule.Node,\n context: Rule.RuleContext,\n isVueSfc: boolean,\n isVueFramework: boolean,\n): boolean {\n let current = node as ParentNode;\n let storesResult = false;\n while (current.parent) {\n const parent = current.parent;\n if (isFunctionNode(parent)) {\n // 普通 setup() 与 <script setup> 一样只执行一次;其他函数仍视为延迟求值。\n const returnsExpression =\n parent.type === 'ArrowFunctionExpression' && parent.body === current;\n return (\n (isVueComponentSetup(parent, context, isVueSfc) ||\n isDirectOptionsFunction(\n parent,\n context,\n 'data',\n isVueSfc || isVueFramework,\n )) &&\n (storesResult || returnsExpression)\n );\n }\n if (storesTranslationResult(parent, current)) storesResult = true;\n if (parent.type === 'Program') return storesResult;\n current = parent;\n }\n return storesResult;\n}\n\nfunction storesTranslationResult(\n parent: ParentNode,\n child: ParentNode,\n): boolean {\n if (\n (parent as { type: string }).type === 'AccessorProperty' &&\n parent.value === child\n ) {\n return true;\n }\n switch (parent.type) {\n case 'VariableDeclarator':\n return parent.init === child;\n case 'AssignmentExpression':\n case 'AssignmentPattern':\n return parent.right === child;\n case 'PropertyDefinition':\n return parent.value === child;\n case 'ReturnStatement':\n return parent.argument === child;\n case 'ExportDefaultDeclaration':\n return parent.declaration === child;\n default:\n return false;\n }\n}\n\ntype ParentNode = Rule.Node & {\n arguments?: unknown[];\n argument?: unknown;\n body?: unknown;\n callee?: unknown;\n computed?: boolean;\n parent: ParentNode | null;\n declaration?: unknown;\n init?: unknown;\n key?: unknown;\n right?: unknown;\n value?: unknown;\n};\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n defaultTreeAdapter,\n parse,\n parseFragment,\n type DefaultTreeAdapterTypes,\n} from 'parse5';\nimport type { AutoImportOption } from '../../analyze.js';\nimport {\n analyzeTranslationMessages,\n reportAnalysisFailureOnce,\n} from '../../rule-analysis.js';\n\ninterface RuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\nexport const noEmbeddedMarkup: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: '警告翻译源文中内嵌的静态 HTML 或 SVG 结构',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n embeddedMarkup: diagnosticMessage(\n '翻译源文包含静态 HTML 或 SVG 结构。请保留完整的自然语言,并将 markup 移出翻译调用或作为占位符传入。',\n 'The translation source contains static HTML or SVG structure. Keep the complete natural-language message, and move markup outside the translation call or pass it as a placeholder.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n return {\n 'Program:exit'(program) {\n let messages;\n try {\n messages = analyzeTranslationMessages(context, options);\n } catch (error) {\n reportAnalysisFailureOnce(context, program as Rule.Node, error);\n return;\n }\n\n const reported = new Set<string>();\n for (const message of messages) {\n if (!containsEmbeddedMarkup(message.source)) continue;\n for (const location of message.locations) {\n const key = `${location.line}:${location.column}`;\n if (reported.has(key)) continue;\n reported.add(key);\n context.report({\n node: program as Rule.Node,\n loc: {\n start: location,\n end: { line: location.line, column: location.column + 1 },\n },\n messageId: 'embeddedMarkup',\n });\n }\n }\n },\n };\n },\n};\n\nfunction containsEmbeddedMarkup(source: string): boolean {\n if (!source.includes('<')) return false;\n const options = { sourceCodeLocationInfo: true } as const;\n // fragment 保留 table 等局部标签;document 补充识别显式 html/body 包装标签。\n return (\n containsLocatedMarkup(parseFragment(source, options)) ||\n containsLocatedMarkup(parse(source, options))\n );\n}\n\nfunction containsLocatedMarkup(\n parent: DefaultTreeAdapterTypes.ParentNode,\n): boolean {\n return parent.childNodes.some((node) => {\n if (\n (defaultTreeAdapter.isElementNode(node) ||\n defaultTreeAdapter.isCommentNode(node)) &&\n node.sourceCodeLocation\n ) {\n return true;\n }\n return (\n defaultTreeAdapter.isElementNode(node) && containsLocatedMarkup(node)\n );\n });\n}\n","import type { Rule } from 'eslint';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport {\n ALL_AUTO_IMPORT_APIS,\n type AutoImportApi,\n} from '../../auto-imports.js';\n\nconst RUNTIME_MODULE = 'virtual:ai-i18n';\n\ninterface RuleOptions {\n autoImport: readonly AutoImportApi[];\n}\n\ntype ImportSpecifierNode = Extract<Rule.Node, { type: 'ImportSpecifier' }> & {\n importKind?: 'type' | 'value';\n};\n\ntype ImportDeclarationNode = Extract<\n Rule.Node,\n { type: 'ImportDeclaration' }\n> & {\n importKind?: 'type' | 'value';\n};\n\nexport const noRedundantAutoImport: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: '禁止显式导入已由 ai-i18n autoImport 注入的 Runtime API',\n },\n fixable: 'code',\n schema: [\n {\n type: 'object',\n properties: {\n autoImport: {\n type: 'array',\n items: { enum: ALL_AUTO_IMPORT_APIS },\n minItems: 1,\n uniqueItems: true,\n },\n },\n required: ['autoImport'],\n additionalProperties: false,\n },\n ],\n messages: {\n redundantImport: diagnosticMessage(\n 'ai-i18n autoImport 已注入以下 API:{{names}}。请删除来自 virtual:ai-i18n 的冗余导入。',\n 'ai-i18n autoImport injects these APIs: {{names}}. Remove the redundant imports from virtual:ai-i18n.',\n ),\n },\n },\n create(context) {\n const enabled = new Set(\n ((context.options[0] as RuleOptions | undefined)?.autoImport ??\n []) as readonly string[],\n );\n return {\n ImportDeclaration(rawNode) {\n const node = rawNode as ImportDeclarationNode;\n if (\n node.importKind === 'type' ||\n node.source.value !== RUNTIME_MODULE\n ) {\n return;\n }\n const named = node.specifiers.filter(\n (specifier): specifier is ImportSpecifierNode =>\n specifier.type === 'ImportSpecifier',\n );\n const redundant = named.filter((specifier) => {\n const imported = importedName(specifier);\n return (\n specifier.importKind !== 'type' &&\n imported !== null &&\n imported === specifier.local.name &&\n enabled.has(imported)\n );\n });\n if (!redundant.length) return;\n\n const names = redundant\n .map((specifier) => importedName(specifier))\n .filter((name): name is string => name !== null);\n const fix = createFix(context, node, named, redundant);\n context.report({\n node,\n messageId: 'redundantImport',\n data: { names: names.join(', ') },\n fix,\n });\n },\n };\n },\n};\n\nfunction importedName(specifier: ImportSpecifierNode): string | null {\n if (\n specifier.imported.type === 'Identifier' &&\n 'name' in specifier.imported\n ) {\n return specifier.imported.name;\n }\n return typeof specifier.imported.value === 'string'\n ? specifier.imported.value\n : null;\n}\n\nfunction createFix(\n context: Rule.RuleContext,\n node: ImportDeclarationNode,\n named: ImportSpecifierNode[],\n redundant: ImportSpecifierNode[],\n): Rule.ReportFixer | undefined {\n // import 内部注释可能携带迁移说明,自动修复时不能静默丢弃。\n if (context.sourceCode.getCommentsInside(node).length) return undefined;\n const redundantSet = new Set<unknown>(redundant);\n const remaining = node.specifiers.filter(\n (specifier) => !redundantSet.has(specifier),\n );\n if (!remaining.length) {\n return (fixer) => fixer.remove(node);\n }\n\n const remainingNamed = named.filter(\n (specifier) => !redundantSet.has(specifier),\n );\n const firstNamed = named[0];\n const lastNamed = named.at(-1);\n if (!firstNamed || !lastNamed) return undefined;\n const openBrace = context.sourceCode.getTokenBefore(firstNamed);\n const closeBrace = context.sourceCode.getTokenAfter(lastNamed);\n if (openBrace?.value !== '{' || closeBrace?.value !== '}') return undefined;\n\n if (remainingNamed.length) {\n const [, openEnd] = context.sourceCode.getRange(openBrace);\n const [closeStart] = context.sourceCode.getRange(closeBrace);\n const replacement = remainingNamed\n .map((specifier) => context.sourceCode.getText(specifier))\n .join(', ');\n return (fixer) =>\n fixer.replaceTextRange([openEnd, closeStart], ` ${replacement} `);\n }\n\n const beforeOpen = context.sourceCode.getTokenBefore(openBrace);\n if (beforeOpen?.value !== ',') return undefined;\n const [commaStart] = context.sourceCode.getRange(beforeOpen);\n const [, closeEnd] = context.sourceCode.getRange(closeBrace);\n return (fixer) => fixer.removeRange([commaStart, closeEnd]);\n}\n","import type { Rule } from 'eslint';\nimport { nearestFunction, type ParentNode } from '../common/ast-context.js';\nimport {\n isDirectOptionsFunction,\n isVueComponentSetup,\n isVueScriptSetupNode,\n vueOptionsSection,\n} from './options.js';\n\nexport type VueInitializationKind = 'data' | 'setup';\ntype RuntimeStateApi = 'getLang' | 'getLangLoadState';\n\nexport function misplacedI18nComputed(\n node: Rule.Node,\n context: Rule.RuleContext,\n inTemplate: boolean,\n isVueSfc: boolean,\n): boolean {\n if (inTemplate || isVueScriptSetupNode(node, context)) return true;\n if (vueOptionsSection(node, context) !== null) return true;\n const owner = nearestFunction(node);\n return Boolean(owner && isVueComponentSetup(owner, context, isVueSfc));\n}\n\nexport function vueInitializationSnapshotKind(\n node: Rule.Node,\n owner: ParentNode,\n context: Rule.RuleContext,\n isVueSfc: boolean,\n): VueInitializationKind | null {\n const kind = isVueComponentSetup(owner, context, isVueSfc)\n ? 'setup'\n : isDirectOptionsFunction(owner, context, 'data')\n ? 'data'\n : null;\n if (!kind || !storesResultBeforeOwner(node, owner)) return null;\n return kind;\n}\n\nexport function reportVueInitializationSnapshot(\n context: Rule.RuleContext,\n node: Rule.Node,\n api: RuntimeStateApi,\n kind: VueInitializationKind,\n): void {\n context.report({\n node,\n messageId: kind === 'data' ? 'optionsDataSnapshot' : 'vueSetupSnapshot',\n data: {\n api,\n replacement: api === 'getLang' ? 'currentLang' : 'langLoadState',\n },\n });\n}\n\nfunction storesResultBeforeOwner(node: Rule.Node, owner: ParentNode): boolean {\n let current = node as unknown as StoredValueNode;\n let storesResult = false;\n while (current.parent && current.parent !== owner) {\n const parent = current.parent as StoredValueNode;\n if (\n (parent.type === 'VariableDeclarator' && parent.init === current) ||\n ((parent.type === 'AssignmentExpression' ||\n parent.type === 'AssignmentPattern') &&\n parent.right === current) ||\n (parent.type === 'PropertyDefinition' && parent.value === current) ||\n (parent.type === 'ReturnStatement' && parent.argument === current)\n ) {\n storesResult = true;\n }\n current = parent;\n }\n // 箭头函数直接返回对象时没有 ReturnStatement,需要单独判断函数体。\n return (\n storesResult ||\n (owner.type === 'ArrowFunctionExpression' &&\n (owner as StoredValueNode).body === current)\n );\n}\n\ninterface StoredValueNode extends ParentNode {\n argument?: unknown;\n body?: unknown;\n init?: unknown;\n right?: unknown;\n value?: unknown;\n}\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n isImmediateConsoleEffect,\n isVueTemplateEventHandler,\n nearestFunction,\n type ParentNode,\n} from './ast-context.js';\nimport {\n isInsideOptionsComputedGetter,\n isOptionsComputedSpread,\n} from '../vue/options.js';\nimport {\n misplacedI18nComputed,\n reportVueInitializationSnapshot,\n vueInitializationSnapshotKind,\n} from '../vue/runtime-state.js';\n\nconst RUNTIME_MODULE = 'virtual:ai-i18n';\nconst STATE_APIS = ['getLang', 'getLangLoadState'] as const;\nconst VUE_COMPUTED_API = 'i18nComputed';\nconst TRACKED_APIS = [...STATE_APIS, VUE_COMPUTED_API] as const;\n\ntype RuntimeStateApi = (typeof STATE_APIS)[number];\ntype TrackedApi = (typeof TRACKED_APIS)[number];\n\ninterface RuleOptions {\n autoImport?: boolean | readonly TrackedApi[];\n framework?: 'react' | 'vue';\n}\n\nexport const noUnsubscribedRuntimeState: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '检查初始化、模块和组件渲染路径中的 Runtime 状态快照',\n },\n schema: [\n {\n type: 'object',\n properties: {\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: TRACKED_APIS },\n uniqueItems: true,\n },\n ],\n },\n framework: { enum: ['react', 'vue'] },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n moduleSnapshot: diagnosticMessage(\n '模块顶层调用 {{api}}() 只会保存初始化时的状态快照,后续语言状态变化不会更新该值。请在需要时调用,或通过 subscribe() / useI18n() 建立订阅。',\n 'Calling {{api}}() at module scope stores only the initialization snapshot, which will not update after language state changes. Read it when needed, or subscribe through subscribe() / useI18n().',\n ),\n renderSnapshot: diagnosticMessage(\n '组件渲染期间调用 {{api}}() 不会订阅语言状态。请使用 useI18n() 返回的 {{replacement}}。',\n 'Calling {{api}}() while rendering a component does not subscribe to language state. Use {{replacement}} from useI18n().',\n ),\n vueRenderSnapshot: diagnosticMessage(\n 'Vue 渲染期间调用 {{api}}() 不会订阅语言状态。Composition API 请使用 useI18n() 返回的 {{replacement}};纯 Options API 请在 computed 中展开 ...i18nComputed() 后使用 {{replacement}}。',\n 'Calling {{api}}() while rendering Vue does not subscribe to language state. With the Composition API, use {{replacement}} from useI18n(); with the pure Options API, spread ...i18nComputed() into computed and use {{replacement}}.',\n ),\n optionsComputedSnapshot: diagnosticMessage(\n '纯 Options API 的 computed 中调用 {{api}}() 仍然只会读取快照。请改为在 computed 中展开 ...i18nComputed(),并直接使用响应式的 {{replacement}}。',\n 'Calling {{api}}() inside a pure Options API computed getter still reads only a snapshot. Spread ...i18nComputed() into computed and use the reactive {{replacement}} instead.',\n ),\n vueSetupSnapshot: diagnosticMessage(\n 'Vue setup 中保存 {{api}}() 只会保留初始化快照。请使用 useI18n() 返回的响应式 {{replacement}}。',\n 'Storing {{api}}() in Vue setup keeps only the initialization snapshot. Use the reactive {{replacement}} returned by useI18n().',\n ),\n optionsDataSnapshot: diagnosticMessage(\n '纯 Options API 的 data 中保存 {{api}}() 只会保留初始化快照。请在 computed 中展开 ...i18nComputed(),并使用响应式的 {{replacement}}。',\n 'Storing {{api}}() in pure Options API data keeps only the initialization snapshot. Spread ...i18nComputed() into computed and use the reactive {{replacement}}.',\n ),\n misplacedI18nComputed: diagnosticMessage(\n 'i18nComputed() 只应直接展开到纯 Options API 的 computed,例如 computed: { ...i18nComputed() }。',\n 'Spread i18nComputed() directly into pure Options API computed, for example computed: { ...i18nComputed() }.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n const autoImports = normalizeAutoImports(options.autoImport);\n const importedBindings = new Map<string, TrackedApi>();\n const jsxOwners = new Set<ParentNode>();\n const templateCalls = new Set<Rule.Node>();\n const candidates: Rule.Node[] = [];\n const isVueSfc = context.filename.toLowerCase().endsWith('.vue');\n const collectJsxOwner = (node: Rule.Node) => {\n const owner = nearestFunction(node);\n if (owner) jsxOwners.add(owner);\n };\n const collectCall = (node: Rule.Node) => {\n candidates.push(node);\n };\n const scriptVisitor: Rule.RuleListener = {\n CallExpression: collectCall,\n ImportDeclaration(node) {\n if (node.source.value !== RUNTIME_MODULE) return;\n for (const specifier of node.specifiers) {\n if (specifier.type !== 'ImportSpecifier') continue;\n const imported =\n specifier.imported.type === 'Identifier'\n ? specifier.imported.name\n : typeof specifier.imported.value === 'string'\n ? specifier.imported.value\n : null;\n if (TRACKED_APIS.includes(imported as TrackedApi)) {\n importedBindings.set(specifier.local.name, imported as TrackedApi);\n }\n }\n },\n JSXElement: collectJsxOwner,\n JSXFragment: collectJsxOwner,\n 'Program:exit'() {\n for (const node of candidates) {\n const api = runtimeStateApi(\n context,\n node,\n autoImports,\n importedBindings,\n templateCalls.has(node),\n );\n if (!api) continue;\n if (api === VUE_COMPUTED_API) {\n if (\n options.framework === 'vue' &&\n !isOptionsComputedSpread(node, context) &&\n misplacedI18nComputed(\n node,\n context,\n templateCalls.has(node),\n isVueSfc,\n )\n ) {\n context.report({ node, messageId: 'misplacedI18nComputed' });\n }\n continue;\n }\n if (templateCalls.has(node)) {\n if (!isVueTemplateEventHandler(node)) {\n reportRenderSnapshot(context, node, api, true);\n }\n continue;\n }\n const owner = nearestFunction(node);\n if (!owner) {\n context.report({\n node,\n messageId: 'moduleSnapshot',\n data: { api },\n });\n continue;\n }\n if (\n options.framework === 'vue' &&\n isInsideOptionsComputedGetter(node, context)\n ) {\n reportOptionsComputedSnapshot(context, node, api);\n continue;\n }\n const initializationKind =\n options.framework === 'vue'\n ? vueInitializationSnapshotKind(node, owner, context, isVueSfc)\n : null;\n if (initializationKind) {\n reportVueInitializationSnapshot(\n context,\n node,\n api,\n initializationKind,\n );\n continue;\n }\n if (jsxOwners.has(owner) && !isImmediateConsoleEffect(node)) {\n reportRenderSnapshot(\n context,\n node,\n api,\n options.framework === 'vue',\n );\n }\n }\n },\n };\n const parserServices = context.sourceCode\n .parserServices as VueParserServices;\n if (!parserServices.defineTemplateBodyVisitor) return scriptVisitor;\n return parserServices.defineTemplateBodyVisitor(\n {\n CallExpression(node) {\n candidates.push(node);\n templateCalls.add(node);\n },\n },\n scriptVisitor,\n { templateBodyTriggerSelector: 'Program' },\n );\n },\n};\n\nfunction normalizeAutoImports(\n option: RuleOptions['autoImport'],\n): ReadonlySet<TrackedApi> {\n if (option === true) return new Set(TRACKED_APIS);\n if (!option) return new Set();\n return new Set(option);\n}\n\nfunction runtimeStateApi(\n context: Rule.RuleContext,\n rawNode: Rule.Node,\n autoImports: ReadonlySet<TrackedApi>,\n importedBindings: ReadonlyMap<string, TrackedApi>,\n inTemplate: boolean,\n): TrackedApi | null {\n if (rawNode.type !== 'CallExpression') return null;\n const callee = rawNode.callee;\n if (callee.type !== 'Identifier') return null;\n if (inTemplate) {\n if (isTemplateLocalIdentifier(callee as unknown as ParentNode)) return null;\n const imported = importedBindings.get(callee.name);\n if (imported) return imported;\n if (hasTopLevelScriptBinding(context, callee.name)) return null;\n return autoImports.has(callee.name as TrackedApi)\n ? (callee.name as TrackedApi)\n : null;\n }\n const variable = findVariable(\n context.sourceCode.getScope(\n callee as unknown as Rule.Node,\n ) as unknown as ScopeLike,\n callee.name,\n );\n if (variable?.defs.length) {\n const imported = importedRuntimeStateApi(variable);\n return imported;\n }\n return autoImports.has(callee.name as TrackedApi)\n ? (callee.name as TrackedApi)\n : null;\n}\n\nfunction importedRuntimeStateApi(variable: VariableLike): TrackedApi | null {\n for (const definition of variable.defs) {\n if (definition.type !== 'ImportBinding') continue;\n const specifier = definition.node as ImportSpecifierNode;\n const declaration = specifier.parent;\n if (\n specifier.type !== 'ImportSpecifier' ||\n declaration?.type !== 'ImportDeclaration' ||\n declaration.source.value !== RUNTIME_MODULE\n ) {\n continue;\n }\n const imported =\n specifier.imported.type === 'Identifier'\n ? specifier.imported.name\n : typeof specifier.imported.value === 'string'\n ? specifier.imported.value\n : null;\n return TRACKED_APIS.includes(imported as TrackedApi)\n ? (imported as TrackedApi)\n : null;\n }\n // ESLint globals 没有 definition;只有显式开启 autoImport 时才由调用方接纳。\n return null;\n}\n\nfunction hasTopLevelScriptBinding(\n context: Rule.RuleContext,\n name: string,\n): boolean {\n return context.sourceCode.scopeManager.scopes.some(\n (scope) =>\n (scope.type === 'global' || scope.type === 'module') &&\n scope.variables.some(\n (variable) => variable.name === name && variable.defs.length > 0,\n ),\n );\n}\n\nfunction isTemplateLocalIdentifier(identifier: ParentNode): boolean {\n let current: TemplateTraversableNode | null =\n identifier as unknown as TemplateTraversableNode;\n while (current) {\n if (current.type === 'VExpressionContainer') {\n const container = current as unknown as TemplateExpressionContainer;\n return container.references.some(\n (reference) =>\n reference.id === identifier && reference.variable !== null,\n );\n }\n current = current.parent;\n }\n return false;\n}\n\nfunction findVariable(scope: ScopeLike, name: string): VariableLike | null {\n let current: ScopeLike | null = scope;\n while (current) {\n const variable = current.variables.find((item) => item.name === name);\n if (variable) return variable;\n current = current.upper;\n }\n return null;\n}\n\nfunction reportRenderSnapshot(\n context: Rule.RuleContext,\n node: Rule.Node,\n api: RuntimeStateApi,\n isVue: boolean,\n) {\n context.report({\n node,\n messageId: isVue ? 'vueRenderSnapshot' : 'renderSnapshot',\n data: {\n api,\n replacement: api === 'getLang' ? 'currentLang' : 'langLoadState',\n },\n });\n}\n\nfunction reportOptionsComputedSnapshot(\n context: Rule.RuleContext,\n node: Rule.Node,\n api: RuntimeStateApi,\n) {\n context.report({\n node,\n messageId: 'optionsComputedSnapshot',\n data: {\n api,\n replacement: api === 'getLang' ? 'currentLang' : 'langLoadState',\n },\n });\n}\n\ntype ImportSpecifierNode = Extract<Rule.Node, { type: 'ImportSpecifier' }> & {\n parent: ParentNode | null;\n};\n\ninterface DefinitionLike {\n type: string;\n node: unknown;\n}\n\ninterface VariableLike {\n name: string;\n defs: readonly DefinitionLike[];\n}\n\ninterface ScopeLike {\n variables: readonly VariableLike[];\n upper: ScopeLike | null;\n}\n\ninterface TemplateTraversableNode {\n type: string;\n parent: TemplateTraversableNode | null;\n}\n\ninterface TemplateExpressionContainer {\n references: Array<{\n id: unknown;\n variable: unknown | null;\n }>;\n}\n\ninterface VueParserServices {\n defineTemplateBodyVisitor?(\n templateBodyVisitor: Record<string, (node: Rule.Node) => void>,\n scriptVisitor: Rule.RuleListener,\n options: { templateBodyTriggerSelector: 'Program' | 'Program:exit' },\n ): Rule.RuleListener;\n}\n","import type { TranslationCall } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n isImmediateConsoleEffect,\n nearestFunction,\n type ParentNode,\n} from '../common/ast-context.js';\n\nexport function reportReactUnsubscribedT(\n context: Rule.RuleContext,\n call: TranslationCall,\n node: Rule.Node,\n jsxOwners: ReadonlySet<ParentNode>,\n): void {\n if (call.origin !== 'runtime') return;\n // React 只能通过 useI18n() 订阅,因此只检查 JSX 渲染拥有者。\n const owner = nearestFunction(node);\n if (!owner || !jsxOwners.has(owner) || isImmediateConsoleEffect(node)) {\n return;\n }\n context.report({ node, messageId: 'unsubscribedT' });\n}\n","import type { Rule } from 'eslint';\nimport { isImportedVueDefineComponent, propertyName } from './options.js';\n\nconst RUNTIME_MODULE = 'virtual:ai-i18n';\nconst TRANSPARENT_EXPRESSIONS = new Set([\n 'TSAsExpression',\n 'TSSatisfiesExpression',\n 'TSNonNullExpression',\n 'TypeCastExpression',\n]);\nconst STATIC_INSTANCE_SOURCES = new Set(['computed', 'inject', 'props']);\nconst RETURNED_INSTANCE_SOURCES = new Set(['data', 'setup']);\nconst UNCERTAIN_INSTANCE_SOURCES = new Set(['extends', 'mixins']);\n\nexport type VueInstanceMemberOrigin =\n 'ai-i18n' | 'local' | 'missing' | 'unknown' | 'not-component';\n\nexport function resolveVueInstanceMemberOrigin(\n context: Rule.RuleContext,\n node: Rule.Node,\n name: 't' | '$t',\n inTemplate: boolean,\n): VueInstanceMemberOrigin {\n const options = inTemplate\n ? defaultComponentOptions(context)\n : enclosingComponentOptions(node, context);\n if (options === 'unknown') return 'unknown';\n if (!options) return inTemplate ? 'missing' : 'not-component';\n if (!inTemplate && !usesComponentThis(node, options)) {\n return 'not-component';\n }\n return resolveOptionsMember(options, name, context);\n}\n\nfunction resolveOptionsMember(\n options: AstNode,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): VueInstanceMemberOrigin {\n let methods: AstNode | 'unknown' | null = null;\n let localSource = false;\n let uncertainSource = false;\n\n for (const entry of options.properties ?? []) {\n if (entry.type === 'SpreadElement') {\n methods = 'unknown';\n uncertainSource = true;\n continue;\n }\n if (entry.type !== 'Property') continue;\n const key = staticPropertyName(entry);\n if (key === null) {\n methods = 'unknown';\n uncertainSource = true;\n continue;\n }\n if (key === 'methods') {\n const value = unwrapExpression(entry.value);\n methods = value?.type === 'ObjectExpression' ? value : 'unknown';\n continue;\n }\n if (STATIC_INSTANCE_SOURCES.has(key)) {\n const origin = resolveStaticSourceMember(entry.value, name, context);\n if (origin === 'local') localSource = true;\n if (origin === 'unknown') uncertainSource = true;\n continue;\n }\n if (RETURNED_INSTANCE_SOURCES.has(key)) {\n const origin = resolveReturnedSourceMember(entry.value, name, context);\n if (origin === 'local') localSource = true;\n if (origin === 'unknown') uncertainSource = true;\n continue;\n }\n if (UNCERTAIN_INSTANCE_SOURCES.has(key)) uncertainSource = true;\n }\n\n if (methods === 'unknown') return 'unknown';\n const methodOrigin = methods\n ? resolveObjectMember(methods, name, context)\n : 'missing';\n if (methodOrigin === 'local' || localSource) return 'local';\n if (methodOrigin === 'unknown' || uncertainSource) return 'unknown';\n return methodOrigin;\n}\n\nfunction resolveStaticSourceMember(\n rawValue: AstNode | undefined,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): 'local' | 'missing' | 'unknown' {\n const value = unwrapExpression(rawValue);\n if (!value) return 'unknown';\n if (value.type === 'ObjectExpression') {\n const origin = resolveObjectMember(value, name, context);\n return origin === 'missing'\n ? 'missing'\n : origin === 'unknown'\n ? 'unknown'\n : 'local';\n }\n if (value.type !== 'ArrayExpression') return 'unknown';\n for (const element of value.elements ?? []) {\n if (propertyName(element) === name) return 'local';\n if (element.type !== 'Literal') return 'unknown';\n }\n return 'missing';\n}\n\nfunction resolveReturnedSourceMember(\n rawValue: AstNode | undefined,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): 'local' | 'missing' | 'unknown' {\n const fn = unwrapExpression(rawValue);\n if (\n !fn ||\n (fn.type !== 'FunctionExpression' && fn.type !== 'ArrowFunctionExpression')\n ) {\n return 'unknown';\n }\n const rawBody = fn.body as unknown as AstNode | undefined;\n if (!rawBody) return 'unknown';\n if (rawBody.type === 'ObjectExpression') {\n return localObjectMemberOrigin(rawBody, name, context);\n }\n if (rawBody.type !== 'BlockStatement') return 'unknown';\n\n const statements = rawBody.body ?? [];\n const returned = statements.at(-1);\n if (\n returned?.type !== 'ReturnStatement' ||\n statements\n .slice(0, -1)\n .some((statement) => !isStraightLineStatement(statement))\n ) {\n return 'unknown';\n }\n const value = unwrapExpression(returned.argument);\n return value?.type === 'ObjectExpression'\n ? localObjectMemberOrigin(value, name, context)\n : 'unknown';\n}\n\nfunction localObjectMemberOrigin(\n object: AstNode,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): 'local' | 'missing' | 'unknown' {\n const origin = resolveObjectMember(object, name, context);\n return origin === 'missing'\n ? 'missing'\n : origin === 'unknown'\n ? 'unknown'\n : 'local';\n}\n\nfunction isStraightLineStatement(node: AstNode): boolean {\n return (\n node.type === 'ExpressionStatement' ||\n node.type === 'FunctionDeclaration' ||\n node.type === 'VariableDeclaration'\n );\n}\n\nfunction resolveObjectMember(\n object: AstNode,\n name: 't' | '$t',\n context: Rule.RuleContext,\n): Exclude<VueInstanceMemberOrigin, 'not-component'> {\n let origin: Exclude<VueInstanceMemberOrigin, 'not-component'> = 'missing';\n for (const entry of object.properties ?? []) {\n if (entry.type === 'SpreadElement') {\n origin = 'unknown';\n continue;\n }\n if (entry.type !== 'Property') continue;\n const key = staticPropertyName(entry);\n if (key === null) {\n origin = 'unknown';\n continue;\n }\n if (key !== name) continue;\n origin = methodValueOrigin(entry.value, context);\n }\n return origin;\n}\n\nfunction methodValueOrigin(\n rawValue: AstNode | undefined,\n context: Rule.RuleContext,\n): 'ai-i18n' | 'local' | 'unknown' {\n const value = unwrapExpression(rawValue);\n if (!value) return 'unknown';\n if (value.type !== 'Identifier' || !value.name) return 'local';\n const variable = findVariable(context, value);\n if (!variable) return 'unknown';\n return variable.defs.some(isRuntimeTImport) ? 'ai-i18n' : 'local';\n}\n\nfunction findVariable(\n context: Rule.RuleContext,\n identifier: AstNode,\n): ScopeVariable | null {\n let scope: ScopeLike | null = context.sourceCode.getScope(\n identifier as unknown as Rule.Node,\n ) as unknown as ScopeLike;\n while (scope) {\n const variable = scope.set.get(identifier.name!);\n if (variable) return variable;\n scope = scope.upper;\n }\n return null;\n}\n\nfunction isRuntimeTImport(definition: ScopeDefinition): boolean {\n if (definition.type !== 'ImportBinding') return false;\n const specifier = definition.node;\n const declaration = specifier.parent;\n return (\n specifier.type === 'ImportSpecifier' &&\n declaration?.type === 'ImportDeclaration' &&\n declaration.source?.value === RUNTIME_MODULE &&\n propertyName(specifier.imported) === 't'\n );\n}\n\nfunction enclosingComponentOptions(\n node: Rule.Node,\n context: Rule.RuleContext,\n): AstNode | null {\n let current = node as unknown as AstNode;\n while (current.parent) {\n current = current.parent;\n if (\n current.type === 'ObjectExpression' &&\n isComponentOptions(current, context)\n ) {\n return current;\n }\n }\n return null;\n}\n\nfunction defaultComponentOptions(\n context: Rule.RuleContext,\n): AstNode | 'unknown' | null {\n const program = context.sourceCode.ast as unknown as AstNode;\n const owner = program.body?.find(\n (entry) => entry.type === 'ExportDefaultDeclaration',\n );\n if (!owner) return null;\n const declaration = unwrapExpression(owner.declaration);\n if (!declaration) return 'unknown';\n if (declaration.type === 'ObjectExpression') return declaration;\n if (\n declaration.type !== 'CallExpression' ||\n !isImportedVueDefineComponent(declaration.callee, context)\n ) {\n return 'unknown';\n }\n const options = unwrapExpression(declaration.arguments?.[0]);\n return options?.type === 'ObjectExpression' ? options : 'unknown';\n}\n\nfunction isComponentOptions(\n options: AstNode,\n context: Rule.RuleContext,\n): boolean {\n const value = unwrapParent(options);\n const owner = value.parent;\n if (\n owner?.type === 'ExportDefaultDeclaration' &&\n owner.declaration === value\n ) {\n return true;\n }\n return (\n owner?.type === 'CallExpression' &&\n owner.arguments?.[0] === value &&\n isImportedVueDefineComponent(owner.callee, context)\n );\n}\n\nfunction usesComponentThis(node: Rule.Node, options: AstNode): boolean {\n let current = node as unknown as AstNode;\n while (current.parent && current.parent !== options) {\n current = current.parent;\n if (\n current.type === 'FunctionDeclaration' ||\n current.type === 'FunctionExpression'\n ) {\n return isDirectOptionsFunction(current, options);\n }\n }\n return false;\n}\n\nfunction isDirectOptionsFunction(fn: AstNode, options: AstNode): boolean {\n const property = fn.parent;\n if (\n property?.type !== 'Property' ||\n unwrapExpression(property.value) !== fn\n ) {\n return false;\n }\n if (property.parent === options) return true;\n const section = property.parent;\n const sectionProperty = section?.parent;\n return (\n section?.type === 'ObjectExpression' &&\n sectionProperty?.type === 'Property' &&\n unwrapExpression(sectionProperty.value) === section &&\n sectionProperty.parent === options\n );\n}\n\nfunction staticPropertyName(property: AstNode): string | null {\n return propertyName(property.key) ?? null;\n}\n\nfunction unwrapExpression(node: AstNode | undefined): AstNode | undefined {\n let value = node;\n while (value && TRANSPARENT_EXPRESSIONS.has(value.type)) {\n value = value.expression;\n }\n return value;\n}\n\nfunction unwrapParent(node: AstNode): AstNode {\n let value = node;\n while (\n value.parent &&\n TRANSPARENT_EXPRESSIONS.has(value.parent.type) &&\n value.parent.expression === value\n ) {\n value = value.parent;\n }\n return value;\n}\n\ninterface AstNode {\n type: string;\n arguments?: AstNode[];\n argument?: AstNode;\n body?: AstNode[];\n callee?: AstNode;\n computed?: boolean;\n declaration?: AstNode;\n expression?: AstNode;\n elements?: AstNode[];\n imported?: AstNode;\n key?: AstNode;\n name?: string;\n parent: AstNode | null;\n properties?: AstNode[];\n source?: { value?: unknown };\n value?: AstNode;\n}\n\ninterface ScopeDefinition {\n type: string;\n node: AstNode;\n}\n\ninterface ScopeVariable {\n defs: ScopeDefinition[];\n}\n\ninterface ScopeLike {\n set: Map<string, ScopeVariable>;\n upper: ScopeLike | null;\n}\n","import type { TranslationCall } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport {\n isVueTemplateEventHandler,\n nearestFunction,\n type ParentNode,\n} from '../common/ast-context.js';\nimport { resolveVueInstanceMemberOrigin } from './instance-member.js';\nimport { isOptionsComputedValue, vueOptionsSection } from './options.js';\n\nexport function reportVueTranslationLifecycle(\n context: Rule.RuleContext,\n call: TranslationCall,\n node: Rule.Node,\n templateNodes: ReadonlySet<Rule.Node>,\n jsxOwners: ReadonlySet<ParentNode>,\n): boolean {\n if (call.origin === 'vue-computed') {\n if (!isOptionsComputedValue(node, context)) {\n context.report({ node, messageId: 'misplacedTComputed' });\n }\n return true;\n }\n if (call.origin !== 'vue-ref') return false;\n if (templateNodes.has(node)) {\n if (!isVueTemplateEventHandler(node)) {\n context.report({ node, messageId: 'renderTRef' });\n }\n return true;\n }\n const section = vueOptionsSection(node, context);\n if (section === 'computed' || section === 'data' || section === 'methods') {\n context.report({ node, messageId: 'optionsTRef' });\n return true;\n }\n if (section === 'render') {\n context.report({ node, messageId: 'renderTRef' });\n return true;\n }\n const owner = nearestFunction(node);\n if (owner && jsxOwners.has(owner)) {\n context.report({ node, messageId: 'renderTRef' });\n }\n return true;\n}\n\nexport function reportUnsupportedVueInstanceTranslation(\n context: Rule.RuleContext,\n node: Rule.Node,\n isVueFramework: boolean,\n inTemplate: boolean,\n): void {\n if (!isVueFramework) return;\n const name = vueInstanceTranslationMemberName(node);\n if (!name) return;\n const origin = resolveVueInstanceMemberOrigin(\n context,\n node,\n name,\n inTemplate,\n );\n if (\n origin === 'local' ||\n origin === 'unknown' ||\n origin === 'not-component'\n ) {\n return;\n }\n context.report({ node, messageId: 'unsupportedInstanceTranslation' });\n}\n\nfunction vueInstanceTranslationMemberName(node: Rule.Node): 't' | '$t' | null {\n if (\n node.type !== 'MemberExpression' ||\n node.object.type !== 'ThisExpression'\n ) {\n return null;\n }\n const name =\n !node.computed && node.property.type === 'Identifier'\n ? node.property.name\n : node.computed &&\n node.property.type === 'Literal' &&\n typeof node.property.value === 'string'\n ? node.property.value\n : null;\n return name === 't' || name === '$t' ? name : null;\n}\n","import { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { Rule } from 'eslint';\nimport { reportAnalysisFailureOnce } from '../../rule-analysis.js';\nimport {\n matchTranslationCalls,\n type TranslationCandidate,\n type TranslationRuleOptions,\n} from './translation-call.js';\nimport { nearestFunction, type ParentNode } from './ast-context.js';\nimport { reportReactUnsubscribedT } from '../react/no-unsubscribed-t.js';\nimport {\n reportUnsupportedVueInstanceTranslation,\n reportVueTranslationLifecycle,\n} from '../vue/no-unsubscribed-t.js';\n\ninterface RuleOptions extends TranslationRuleOptions {\n framework?: 'react' | 'vue';\n}\n\nexport const noUnsubscribedT: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '检查组件渲染路径中的翻译 API 生命周期',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n framework: { enum: ['react', 'vue'] },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n unsubscribedT: diagnosticMessage(\n '组件渲染期间使用顶层 t 不会订阅语言状态,语言切换不会主动刷新,缓存的渲染结果也可能继续使用旧译文。请使用 useI18n() 返回的 t。',\n 'Top-level t does not subscribe the component to language updates, so language changes do not trigger a render and cached render results may remain stale. Use the t returned by useI18n().',\n ),\n renderTRef: diagnosticMessage(\n '不要在组件渲染或 template 中调用 tRef(),否则每次渲染都会创建新的 computed。请在 setup 中创建一次并使用返回的 Ref;Vue 渲染函数中请直接调用 t。',\n 'Do not call tRef() during component rendering or in a template because each render creates a new computed. Create it once in setup and use the returned Ref; call t directly in Vue render functions.',\n ),\n misplacedTComputed: diagnosticMessage(\n 'tComputed() 只应直接作为纯 Options API 的 computed 属性值使用,例如 computed: { label: tComputed(\"保存\") }。setup 中请使用 tRef(),template 或 render 中请直接使用 t()。',\n 'Use tComputed() only as the direct value of a pure Options API computed property, for example computed: { label: tComputed(\"Save\") }. Use tRef() in setup, and call t() directly in templates or render functions.',\n ),\n optionsTRef: diagnosticMessage(\n '不要在纯 Options API 的 computed、data 或 methods 中调用 tRef()。computed 请直接使用 tComputed(),methods 请在执行时调用 t();tRef() 仅用于 setup 或 composable。',\n 'Do not call tRef() in pure Options API computed, data, or methods. Use tComputed() directly in computed properties, call t() when a method runs, and reserve tRef() for setup or composables.',\n ),\n unsupportedInstanceTranslation: diagnosticMessage(\n 'ai-i18n 不支持把 Vue 组件实例成员 this.t / this.$t 当作翻译 API。请直接调用词法作用域中的 t();开启自动导入时无需 import,关闭时请从 virtual:ai-i18n 显式导入。',\n 'ai-i18n does not support Vue instance members this.t or this.$t as translation APIs. Call lexical t() directly; no import is needed with auto import enabled, otherwise import it from virtual:ai-i18n.',\n ),\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n const candidates: TranslationCandidate[] = [];\n const jsxOwners = new Set<ParentNode>();\n const templateNodes = new Set<Rule.Node>();\n const collectJsxOwner = (node: Rule.Node) => {\n const owner = nearestFunction(node);\n if (owner) jsxOwners.add(owner);\n };\n const scriptVisitor: Rule.RuleListener = {\n CallExpression(node) {\n candidates.push({ kind: 'call', node });\n },\n TaggedTemplateExpression(node) {\n candidates.push({ kind: 'tagged-template', node });\n },\n MemberExpression(node) {\n reportUnsupportedVueInstanceTranslation(\n context,\n node,\n options.framework === 'vue',\n false,\n );\n },\n JSXElement: collectJsxOwner,\n JSXFragment: collectJsxOwner,\n 'Program:exit'(program) {\n let matches;\n try {\n matches = matchTranslationCalls(context, options, candidates);\n } catch (error) {\n reportAnalysisFailureOnce(context, program as Rule.Node, error);\n return;\n }\n for (const { call, node } of matches) {\n if (\n reportVueTranslationLifecycle(\n context,\n call,\n node,\n templateNodes,\n jsxOwners,\n )\n ) {\n continue;\n }\n if (call.origin !== 'runtime') continue;\n if (options.framework === 'vue') continue;\n if (templateNodes.has(node)) {\n // Vue 模式的顶层 t 会读取 adapter revision,模板渲染时会建立响应式依赖。\n continue;\n }\n reportReactUnsubscribedT(context, call, node, jsxOwners);\n }\n },\n };\n const parserServices = context.sourceCode\n .parserServices as VueParserServices;\n if (!parserServices.defineTemplateBodyVisitor) return scriptVisitor;\n return parserServices.defineTemplateBodyVisitor(\n {\n CallExpression(node) {\n candidates.push({ kind: 'call', node });\n templateNodes.add(node);\n },\n TaggedTemplateExpression(node) {\n candidates.push({ kind: 'tagged-template', node });\n templateNodes.add(node);\n },\n MemberExpression(node) {\n reportUnsupportedVueInstanceTranslation(\n context,\n node,\n options.framework === 'vue',\n true,\n );\n },\n },\n scriptVisitor,\n // 模板默认在 Program:exit 才遍历;提前到 Program,确保汇总前已收集候选。\n { templateBodyTriggerSelector: 'Program' },\n );\n },\n};\n\ninterface VueParserServices {\n defineTemplateBodyVisitor?(\n templateBodyVisitor: Record<string, (node: Rule.Node) => void>,\n scriptVisitor: Rule.RuleListener,\n options: { templateBodyTriggerSelector: 'Program' | 'Program:exit' },\n ): Rule.RuleListener;\n}\n","import type { Rule } from 'eslint';\nimport type { AutoImportOption } from '../../analyze.js';\nimport {\n analyzeRuleContext,\n reportAnalysisFailureOnce,\n} from '../../rule-analysis.js';\n\ninterface RuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n maxStaticCandidates?: number;\n}\n\nexport const staticCandidateLimit: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: '警告单个翻译调用展开的静态候选数量过多',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n maxStaticCandidates: {\n type: 'integer',\n minimum: 1,\n maximum: Number.MAX_SAFE_INTEGER,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n candidateLimit: '{{reason}}',\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n return {\n 'Program:exit'(node) {\n try {\n const warnings = analyzeRuleContext(\n context,\n options,\n options.maxStaticCandidates ?? 1_000,\n );\n for (const warning of warnings) {\n if (warning.code !== 'static-candidate-limit') continue;\n context.report({\n node,\n loc: {\n start: warning,\n end: { line: warning.line, column: warning.column + 1 },\n },\n messageId: 'candidateLimit',\n data: { reason: warning.message },\n });\n }\n } catch (error) {\n reportAnalysisFailureOnce(context, node as Rule.Node, error);\n }\n },\n };\n },\n};\n","import type { Rule } from 'eslint';\nimport { diagnosticMessage } from '@ai-i18n/analyzer';\nimport type { AutoImportOption } from '../../analyze.js';\nimport {\n analyzeRuleContext,\n reportAnalysisFailureOnce,\n} from '../../rule-analysis.js';\n\ninterface RuleOptions {\n tsconfigPath?: string;\n autoImport?: AutoImportOption;\n}\n\nexport const tStaticArgs: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: '要求 virtual:ai-i18n 的翻译 API 参数可被静态提取',\n },\n schema: [\n {\n type: 'object',\n properties: {\n tsconfigPath: { type: 'string' },\n autoImport: {\n anyOf: [\n { type: 'boolean' },\n {\n type: 'array',\n items: { enum: ['t', 'tRef', 'tComputed', 'useI18n'] },\n uniqueItems: true,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n analysisFailed: '{{reason}}',\n dynamicArg: '{{reason}}',\n invalidUsage: '{{reason}}',\n },\n },\n create(context) {\n const options = (context.options[0] ?? {}) as RuleOptions;\n return {\n 'Program:exit'(node) {\n let warnings;\n try {\n warnings = analyzeRuleContext(context, options);\n } catch (error) {\n reportAnalysisFailureOnce(context, node as Rule.Node, error);\n return;\n }\n for (const warning of warnings) {\n const analysisFailed = warning.code === 'parse-error';\n const invalidUsage =\n warning.code !== 'dynamic-argument' &&\n warning.code !== 'unresolved-argument' &&\n !analysisFailed;\n context.report({\n node,\n loc: {\n start: warning,\n end: { line: warning.line, column: warning.column + 1 },\n },\n messageId: analysisFailed\n ? 'analysisFailed'\n : invalidUsage\n ? 'invalidUsage'\n : 'dynamicArg',\n data: {\n reason: analysisFailed\n ? diagnosticMessage(\n `静态分析失败:${warning.message}`,\n `Static analysis failed: ${warning.message}`,\n )\n : invalidUsage\n ? warning.message\n : diagnosticMessage(\n '翻译调用的参数无法静态提取。source 请使用静态字符串,options 请使用只包含 comment 的静态对象。',\n 'The translation-call arguments cannot be statically extracted. Use a static string for source and a static object containing only comment for options.',\n ),\n },\n });\n }\n },\n };\n },\n};\n","import { createRequire } from 'node:module';\nimport type { ESLint } from 'eslint';\nimport {\n REACT_AUTO_IMPORTS,\n RUNTIME_AUTO_IMPORTS,\n VUE_AUTO_IMPORTS,\n} from './auto-imports.js';\nimport { noEagerTranslation } from './rules/common/no-eager-translation.js';\nimport { noEmbeddedMarkup } from './rules/common/no-embedded-markup.js';\nimport { noRedundantAutoImport } from './rules/common/no-redundant-auto-import.js';\nimport { noUnsubscribedRuntimeState } from './rules/common/no-unsubscribed-runtime-state.js';\nimport { noUnsubscribedT } from './rules/common/no-unsubscribed-t.js';\nimport { staticCandidateLimit } from './rules/common/static-candidate-limit.js';\nimport { tStaticArgs } from './rules/common/t-static-args.js';\n\nconst { version } = createRequire(import.meta.url)('../package.json') as {\n version: string;\n};\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: '@ai-i18n/eslint-plugin',\n version,\n namespace: 'ai-i18n',\n },\n rules: {\n 'no-embedded-markup': noEmbeddedMarkup,\n 'no-eager-translation': noEagerTranslation,\n 'no-redundant-auto-import': noRedundantAutoImport,\n 'no-unsubscribed-runtime-state': noUnsubscribedRuntimeState,\n 'no-unsubscribed-t': noUnsubscribedT,\n 'static-candidate-limit': staticCandidateLimit,\n 't-static-args': tStaticArgs,\n },\n configs: {},\n};\n\n// 规则集必须由使用者显式引入,不会修改宿主项目的 ESLint 配置。\nplugin.configs!.recommended = [\n {\n ignores: ['**/*.{vue,cjs,cts}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: { defineI18nMessages: 'readonly' },\n },\n rules: {\n 'ai-i18n/t-static-args': 'error',\n 'ai-i18n/no-embedded-markup': 'warn',\n 'ai-i18n/no-eager-translation': 'warn',\n 'ai-i18n/no-unsubscribed-runtime-state': 'warn',\n 'ai-i18n/no-unsubscribed-t': 'warn',\n 'ai-i18n/static-candidate-limit': 'warn',\n },\n },\n];\n\nplugin.configs!.vue = [\n {\n files: ['**/*.{js,mjs,ts,mts,jsx,tsx,vue}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: { defineI18nMessages: 'readonly' },\n },\n rules: {\n 'ai-i18n/t-static-args': 'error',\n 'ai-i18n/no-embedded-markup': 'warn',\n 'ai-i18n/no-eager-translation': ['warn', { framework: 'vue' }],\n 'ai-i18n/no-unsubscribed-runtime-state': ['warn', { framework: 'vue' }],\n 'ai-i18n/no-unsubscribed-t': ['warn', { framework: 'vue' }],\n 'ai-i18n/static-candidate-limit': 'warn',\n },\n },\n];\n\n// 自动导入 preset 必须与 Vite 各模式实际注入的 API 一一对应。\nplugin.configs!['vanilla-auto-import'] = [\n {\n files: ['**/*.{js,mjs,ts,mts}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: {\n ...Object.fromEntries(\n RUNTIME_AUTO_IMPORTS.map((name) => [name, 'readonly']),\n ),\n defineI18nMessages: 'readonly',\n },\n },\n rules: {\n 'ai-i18n/t-static-args': ['error', { autoImport: ['t'] }],\n 'ai-i18n/no-embedded-markup': ['warn', { autoImport: ['t'] }],\n 'ai-i18n/no-eager-translation': ['warn', { autoImport: ['t'] }],\n 'ai-i18n/no-unsubscribed-runtime-state': [\n 'warn',\n { autoImport: ['getLang', 'getLangLoadState'] },\n ],\n 'ai-i18n/static-candidate-limit': ['warn', { autoImport: ['t'] }],\n },\n },\n];\n\nplugin.configs!['vue-auto-import'] = [\n {\n files: ['**/*.{js,mjs,ts,mts,jsx,tsx,vue}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: {\n ...Object.fromEntries(\n VUE_AUTO_IMPORTS.map((name) => [name, 'readonly']),\n ),\n defineI18nMessages: 'readonly',\n },\n },\n rules: {\n 'ai-i18n/t-static-args': [\n 'error',\n { autoImport: ['t', 'tRef', 'tComputed', 'useI18n'] },\n ],\n 'ai-i18n/no-embedded-markup': [\n 'warn',\n { autoImport: ['t', 'tRef', 'tComputed', 'useI18n'] },\n ],\n 'ai-i18n/no-eager-translation': [\n 'warn',\n {\n autoImport: ['t', 'tRef', 'tComputed', 'useI18n'],\n framework: 'vue',\n },\n ],\n 'ai-i18n/no-unsubscribed-runtime-state': [\n 'warn',\n {\n autoImport: ['getLang', 'getLangLoadState', 'i18nComputed'],\n framework: 'vue',\n },\n ],\n 'ai-i18n/no-unsubscribed-t': [\n 'warn',\n {\n autoImport: ['t', 'tRef', 'tComputed', 'useI18n'],\n framework: 'vue',\n },\n ],\n 'ai-i18n/static-candidate-limit': [\n 'warn',\n { autoImport: ['t', 'tRef', 'tComputed', 'useI18n'] },\n ],\n },\n },\n];\n\nplugin.configs!['react-auto-import'] = [\n {\n files: ['**/*.{js,mjs,ts,mts,jsx,tsx}'],\n plugins: { 'ai-i18n': plugin },\n languageOptions: {\n globals: {\n ...Object.fromEntries(\n REACT_AUTO_IMPORTS.map((name) => [name, 'readonly']),\n ),\n defineI18nMessages: 'readonly',\n },\n },\n rules: {\n 'ai-i18n/t-static-args': ['error', { autoImport: ['t', 'useI18n'] }],\n 'ai-i18n/no-embedded-markup': ['warn', { autoImport: ['t', 'useI18n'] }],\n 'ai-i18n/no-eager-translation': [\n 'warn',\n { autoImport: ['t', 'useI18n'] },\n ],\n 'ai-i18n/no-unsubscribed-runtime-state': [\n 'warn',\n { autoImport: ['getLang', 'getLangLoadState'] },\n ],\n 'ai-i18n/no-unsubscribed-t': ['warn', { autoImport: ['t', 'useI18n'] }],\n 'ai-i18n/static-candidate-limit': [\n 'warn',\n { autoImport: ['t', 'useI18n'] },\n ],\n },\n },\n];\n\nexport {\n noEmbeddedMarkup,\n noEagerTranslation,\n noRedundantAutoImport,\n noUnsubscribedRuntimeState,\n noUnsubscribedT,\n staticCandidateLimit,\n tStaticArgs,\n};\nexport default plugin;\n"],"mappings":";;;;;;;;;AAAA,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,mBAAmB;CAC9B;CACA,GAAG;CACH;CACA;CACA;AACF;AAEA,MAAa,qBAAqB,CAAC,WAAW,GAAG,oBAAoB;AAErE,MAAa,uBAAuB,CAAC,GAAG,gBAAgB;;;ACPxD,MAAM,uBAAuB;AAC7B,MAAM,4BAA4B;AAClC,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAmB/B,MAAM,oCAAoB,IAAI,IAAgC;AAC9D,MAAM,iCAAiB,IAAI,IAA6B;AAExD,SAAgB,uBAAuB,cAAuB;CAC5D,MAAM,eAAe,eACjB,KAAK,UAAU,KAAK,QAAQ,YAAY,CAAC,IACzC,KAAA;CAEJ,QAAQ,WAAmB,aAAwC;EACjE,MAAM,aAAa,gBAAgB,yBAAyB,QAAQ;EACpE,IAAI,CAAC,YAAY,OAAO,CAAC;EAEzB,OADgB,cAAc,iBAAiB,UAAU,GAAG,QAC/C,CAAC,EAAE,eAAe,SAAS,KAAK,CAAC;CAChD;AACF;AAEA,SAAS,yBAAyB,UAAiC;CACjE,IAAI,YAAY,KAAK,QAAQ,KAAK,QAAQ,QAAQ,CAAC;CACnD,MAAM,MAAM,KAAK,IAAI;CACrB,MAAM,SAAS,eAAe,IAAI,SAAS;CAC3C,IAAI,UAAU,OAAO,YAAY,KAAK,OAAO,OAAO;CACpD,MAAM,UAAoB,CAAC;CAE3B,SAAS;EACP,QAAQ,KAAK,SAAS;EACtB,KAAK,MAAM,YAAY,CAAC,iBAAiB,eAAe,GAAG;GACzD,MAAM,YAAY,KAAK,KAAK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2
2
|
"name": "@ai-i18n/eslint-plugin",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.28",
|
|
4
4
|
"description": "ESLint rules for ai-i18n static extraction and reactive runtime usage.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-i18n",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"get-tsconfig": "^4.14.1",
|
|
41
41
|
"parse5": "8.0.1",
|
|
42
42
|
"picomatch": "^4.0.5",
|
|
43
|
-
"@ai-i18n/analyzer": "1.0.0-alpha.
|
|
43
|
+
"@ai-i18n/analyzer": "1.0.0-alpha.25"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@vue/compiler-sfc": ">=3.2.0",
|