@hamsterbase/evidra 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/sdk/conformance-rules.js +1454 -0
  2. package/dist/sdk/conformance.js +5 -0
  3. package/dist/sdk/index.d.ts +10 -0
  4. package/dist/sdk/main.js +66 -37
  5. package/dist/sdk/rules.d.ts +149 -0
  6. package/dist/sdk/types-B6cBsknY.d.ts +12 -0
  7. package/dist/service/cli.js +698 -332
  8. package/dist/web/assets/{cssMode-C0YhK9yk.js → cssMode-BTAZgpQt.js} +1 -1
  9. package/dist/web/assets/{editor.api-CMNmRHg7.js → editor.api-CfnVkTAL.js} +1 -1
  10. package/dist/web/assets/{freemarker2-BPF-_qAr.js → freemarker2-BV0isRRj.js} +1 -1
  11. package/dist/web/assets/{handlebars-ZZYTfRBR.js → handlebars-CbLz4Wc3.js} +1 -1
  12. package/dist/web/assets/{html-Dgtv0wV7.js → html-D2xBZbJh.js} +1 -1
  13. package/dist/web/assets/{htmlMode-CE3TDKC3.js → htmlMode-DwPRG6d4.js} +1 -1
  14. package/dist/web/assets/index-CJuNTIx5.css +2 -0
  15. package/dist/web/assets/index-CqRUszBc.js +35 -0
  16. package/dist/web/assets/{javascript-v3U6PHk8.js → javascript-D-gNVUGD.js} +1 -1
  17. package/dist/web/assets/{jsonMode-CRbfEt8i.js → jsonMode-BMqe91Um.js} +1 -1
  18. package/dist/web/assets/{liquid-D_mEV4oV.js → liquid-D6FHObSg.js} +1 -1
  19. package/dist/web/assets/{lspLanguageFeatures-DX6MhoAE.js → lspLanguageFeatures-D6i7D2oO.js} +1 -1
  20. package/dist/web/assets/{mdx-BhVFxchM.js → mdx-CGtrE9A8.js} +1 -1
  21. package/dist/web/assets/{monaco-C2bEmNwl.js → monaco-C3WraHAR.js} +4 -4
  22. package/dist/web/assets/{python-BWAEzptE.js → python-B2ywaTtF.js} +1 -1
  23. package/dist/web/assets/{razor-fGgHB_D8.js → razor-zzTWj2fW.js} +1 -1
  24. package/dist/web/assets/{tsMode-Dhqndf6Y.js → tsMode-BrfjRJaR.js} +1 -1
  25. package/dist/web/assets/{typescript-BdctO1F-.js → typescript-xVM47PRQ.js} +1 -1
  26. package/dist/web/assets/{workers-CL1LWpiD.js → workers-DEZ7PLe8.js} +1 -1
  27. package/dist/web/assets/{xml-h8WCDUbN.js → xml-kpizFTtc.js} +1 -1
  28. package/dist/web/assets/{yaml-Dh4FUWeU.js → yaml-DDFZ3vPi.js} +1 -1
  29. package/dist/web/index.html +2 -2
  30. package/package.json +15 -6
  31. package/packages/conformance/rules/commit-message/RULE.md +29 -0
  32. package/packages/conformance/rules/duplicate-localization/RULE.md +37 -0
  33. package/packages/conformance/rules/e2e-scenarios-structure/RULE.md +39 -0
  34. package/packages/conformance/rules/index.md +18 -0
  35. package/packages/conformance/rules/same-dir-import-only/RULE.md +35 -0
  36. package/packages/conformance/rules/single-component-file/RULE.md +33 -0
  37. package/packages/conformance/rules/source-locale-defaults/RULE.md +48 -0
  38. package/packages/conformance/rules/sync-locales/RULE.md +45 -0
  39. package/packages/conformance/rules/ui-scenarios-structure/RULE.md +43 -0
  40. package/skills/evidra/SKILL.md +8 -3
  41. package/dist/web/assets/index-D_0ZWPum.js +0 -37
  42. package/dist/web/assets/index-U9oKSlEO.css +0 -2
@@ -0,0 +1,5 @@
1
+ // packages/conformance/runner/config.ts
2
+ function defineConfig(config) {
3
+ return config;
4
+ }
5
+ export { defineConfig };
@@ -0,0 +1,10 @@
1
+ import { n as RuleResult, r as RuleTask, t as CommonConfig } from "./types-B6cBsknY.js";
2
+ /** evidra.conformance.ts 的默认导出。 */
3
+ interface Config {
4
+ /** 默认配置文件所在目录;相对路径也基于配置文件所在目录。 */
5
+ projectRoot?: string;
6
+ /** 按数组顺序执行的任务函数;单个任务失败不会阻止后续任务,空数组视为通过。 */
7
+ rules: readonly RuleTask[];
8
+ }
9
+ export declare function defineConfig(config: Config): Config;
10
+ export type { CommonConfig, Config, RuleResult, RuleTask };
package/dist/sdk/main.js CHANGED
@@ -21,10 +21,17 @@ const NamespaceSchema = z.object({
21
21
  id: z.string().regex(/^[A-Za-z0-9-]+$/),
22
22
  name: z.string().trim().min(1)
23
23
  });
24
+ const ChangeConfigSchema = z.object({
25
+ scope: z.union([z.array(z.string().trim().min(1)), z.string().transform((value) => value.split(",").map((scope) => scope.trim()).filter(Boolean))]).default([]).transform((scopes) => [...new Set(scopes)]),
26
+ notedir: z.string().trim().min(1).default("changelog-notes"),
27
+ /** 更新日志读取的本地分支。 */
28
+ branch: z.string().trim().min(1).default("main")
29
+ });
24
30
  const ConfigSchema = z.object({
25
31
  reportDir: z.string().min(1).optional(),
26
32
  storage: z.enum(["s3", "local"]).default("local"),
27
- namespaces: z.array(NamespaceSchema)
33
+ namespaces: z.array(NamespaceSchema),
34
+ change: ChangeConfigSchema.optional()
28
35
  });
29
36
  // modules/core/implementations/config.ts
30
37
  const CONFIG_NAME = "evidra.config.json";
@@ -47,7 +54,8 @@ function parseConfig(config) {
47
54
  namespaces: value.namespaces.map(({ id, name }) => ({
48
55
  id,
49
56
  name
50
- }))
57
+ })),
58
+ ...value.change ? { change: value.change } : {}
51
59
  };
52
60
  }
53
61
  // modules/core/implementations/Functions/loadConfig.ts
@@ -607,7 +615,8 @@ async function finishTask(input) {
607
615
  record.task.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
608
616
  await writeJsonAtomic(file, {
609
617
  formatVersion: 3,
610
- task: record.task
618
+ task: record.task,
619
+ failedCount: statuses.filter((status) => status === "failed").length
611
620
  });
612
621
  return record.task;
613
622
  }
@@ -627,6 +636,28 @@ function deletionAllowed(record) {
627
636
  async function download(_cwd, storage, key) {
628
637
  return Buffer.from(await storage.download(key));
629
638
  }
639
+ // modules/core/implementations/Utils/imageDiff.ts
640
+ /**
641
+ * 图片对比的唯一实现。worker 线程通过 toString() 复用这段源码,
642
+ * 因此函数体只能使用参数,不得引用模块作用域或定义内部函数。
643
+ */
644
+ function diffPng(png, match, oldBytes, newBytes) {
645
+ if (Buffer.from(oldBytes).equals(Buffer.from(newBytes))) return { diffPixels: 0 };
646
+ const oldImage = png.sync.read(Buffer.from(oldBytes));
647
+ const newImage = png.sync.read(Buffer.from(newBytes));
648
+ if (oldImage.width !== newImage.width || oldImage.height !== newImage.height) return { dimensionMismatch: true };
649
+ const diff = new png({
650
+ width: oldImage.width,
651
+ height: oldImage.height
652
+ });
653
+ return {
654
+ diffPixels: match(oldImage.data, newImage.data, diff.data, diff.width, diff.height, { threshold: .1 }),
655
+ png: png.sync.write(diff)
656
+ };
657
+ }
658
+ function localImageDiff(oldBytes, newBytes) {
659
+ return diffPng(PNG, pixelmatch, oldBytes, newBytes);
660
+ }
630
661
  // modules/core/implementations/Utils/imageDiffPool.ts
631
662
  const require = createRequire(import.meta.url);
632
663
  const pngjsPath = require.resolve("pngjs");
@@ -637,24 +668,11 @@ const { PNG } = require(workerData.pngjsPath);
637
668
  const pixelmatchModule = require(workerData.pixelmatchPath);
638
669
  const pixelmatch = pixelmatchModule.default || pixelmatchModule;
639
670
 
671
+ const diffPng = ${diffPng.toString()};
672
+
640
673
  parentPort.on('message', ({ id, oldBytes, newBytes }) => {
641
674
  try {
642
- const oldImage = PNG.sync.read(Buffer.from(oldBytes));
643
- const newImage = PNG.sync.read(Buffer.from(newBytes));
644
- if (oldImage.width !== newImage.width || oldImage.height !== newImage.height) {
645
- parentPort.postMessage({ id, dimensionMismatch: true });
646
- return;
647
- }
648
- const diff = new PNG({ width: oldImage.width, height: oldImage.height });
649
- const diffPixels = pixelmatch(
650
- oldImage.data,
651
- newImage.data,
652
- diff.data,
653
- diff.width,
654
- diff.height,
655
- { threshold: 0.1 },
656
- );
657
- parentPort.postMessage({ id, diffPixels, png: PNG.sync.write(diff) });
675
+ parentPort.postMessage({ id, ...diffPng(PNG, pixelmatch, oldBytes, newBytes) });
658
676
  } catch (error) {
659
677
  parentPort.postMessage({ id, error: error instanceof Error ? error.message : String(error) });
660
678
  }
@@ -1049,19 +1067,6 @@ async function imageDiff(oldBytes, newBytes, pool) {
1049
1067
  } catch {}
1050
1068
  return localImageDiff(oldBytes, newBytes);
1051
1069
  }
1052
- function localImageDiff(oldBytes, newBytes) {
1053
- const oldImage = PNG.sync.read(Buffer.from(oldBytes));
1054
- const newImage = PNG.sync.read(Buffer.from(newBytes));
1055
- if (oldImage.width !== newImage.width || oldImage.height !== newImage.height) return { dimensionMismatch: true };
1056
- const diff = new PNG({
1057
- width: oldImage.width,
1058
- height: oldImage.height
1059
- });
1060
- return {
1061
- diffPixels: pixelmatch(oldImage.data, newImage.data, diff.data, diff.width, diff.height, { threshold: .1 }),
1062
- png: PNG.sync.write(diff)
1063
- };
1064
- }
1065
1070
  // modules/core/implementations/Utils/getEnv.ts
1066
1071
  /** 逐项优先使用传入的进程变量,未定义时回退到文件;不修改输入或缓存结果。 */
1067
1072
  async function getEnv({ keys, processEnv, filePath }) {
@@ -1242,10 +1247,6 @@ z.object({
1242
1247
  items: z.array(z.string()).min(1),
1243
1248
  reviewed: z.boolean()
1244
1249
  });
1245
- z.object({
1246
- repoRoot: z.string(),
1247
- ref: z.string()
1248
- });
1249
1250
  z.object({
1250
1251
  repoRoot: z.string(),
1251
1252
  ref: z.string(),
@@ -1268,20 +1269,48 @@ z.object({
1268
1269
  baseTaskId: z.string().regex(/^[a-zA-Z0-9_-]{3,}$/),
1269
1270
  taskId: z.string().regex(/^[a-zA-Z0-9_-]{3,}$/)
1270
1271
  });
1272
+ z.object({
1273
+ repoRoot: z.string(),
1274
+ ref: z.string()
1275
+ });
1271
1276
  z.object({
1272
1277
  repoRoot: z.string(),
1273
1278
  ref: z.string(),
1274
1279
  file: z.string(),
1275
1280
  version: z.string().optional()
1276
1281
  });
1277
- z.object({ repoRoot: z.string() });
1282
+ z.object({
1283
+ repoRoot: z.string(),
1284
+ /** 只统计可清理的任务数量,不删除。 */
1285
+ dryRun: z.boolean().optional()
1286
+ });
1278
1287
  z.object({ limit: z.number().int().min(1).max(100).optional() });
1279
1288
  z.object({ repoRoot: z.string() });
1280
1289
  z.object({ repoRoot: z.string() });
1290
+ z.object({ repoRoot: z.string() });
1281
1291
  z.object({
1282
1292
  repoRoot: z.string(),
1283
1293
  taskId: z.string()
1284
1294
  });
1295
+ z.object({
1296
+ changelog: z.string().optional(),
1297
+ reviewed: z.boolean().optional(),
1298
+ entries: z.record(z.string(), z.string()).optional(),
1299
+ excludeTags: z.array(z.string()).optional()
1300
+ }).passthrough();
1301
+ z.object({ repoRoot: z.string() });
1302
+ const GetChangelogFilesInputSchema = z.object({
1303
+ repoRoot: z.string(),
1304
+ commitId: z.string().regex(/^[a-f0-9]{40}$/)
1305
+ });
1306
+ GetChangelogFilesInputSchema.extend({ file: z.string().min(1) });
1307
+ const ChangelogPatchSchema = z.object({
1308
+ scope: z.string().optional(),
1309
+ changelog: z.string().optional(),
1310
+ reviewed: z.boolean().optional(),
1311
+ excludeTags: z.array(z.string()).optional()
1312
+ });
1313
+ GetChangelogFilesInputSchema.extend({ patch: ChangelogPatchSchema });
1285
1314
  // packages/sdk/main.ts
1286
1315
  async function createEvidra(options) {
1287
1316
  const repoRoot = options?.repoRoot;
@@ -0,0 +1,149 @@
1
+ import { r as RuleTask } from "./types-B6cBsknY.js";
2
+ /** Git 提交标题检查配置。 */
3
+ interface CommitMessageOptions {
4
+ /** 禁止的提交标题前缀,默认 ["```"];传入空数组时不限制前缀。 */
5
+ forbiddenPrefixes?: readonly string[];
6
+ /** 比较基准,例如 CI 中的 "origin/main";指定时仅检查 `base..HEAD`,默认使用 upstream。 */
7
+ base?: string;
8
+ }
9
+ export declare function commitMessage(config?: CommitMessageOptions): RuleTask;
10
+ /** 检查本地化 key 的默认文案冲突,以及 key、文案中的模板字符串。 */
11
+ interface DuplicateLocalizationOptions {
12
+ /** 递归扫描的源码目录,支持绝对路径或相对 projectRoot 的路径。 */
13
+ scanRoot: string;
14
+ /** 扫描时跳过的子目录及其后代,默认空;路径相对 projectRoot 解析,也支持绝对路径。 */
15
+ excludeDirs?: readonly string[];
16
+ /** 按目录名跳过,默认 node_modules、dist、coverage;传入时替换默认列表,隐藏目录始终跳过。 */
17
+ skipDirNames?: readonly string[];
18
+ /** 本地化函数名,默认 localize;仅匹配直接调用,不匹配对象成员调用。 */
19
+ callName?: string;
20
+ /** key 所在的参数下标,从 0 开始,默认 0。 */
21
+ keyArgument?: number;
22
+ /** 默认文案所在的参数下标,从 0 开始,默认 1。 */
23
+ valueArgument?: number;
24
+ }
25
+ export declare function duplicateLocalization(config: DuplicateLocalizationOptions): RuleTask;
26
+ /** 从源码同步 JSON 语言文件;会写入文件,发生更新或存在未翻译条目时检查失败。 */
27
+ interface SyncLocalesOptions {
28
+ /** 递归扫描的源码目录,支持绝对路径或相对 projectRoot 的路径。 */
29
+ scanRoot: string;
30
+ /** 扫描时跳过的子目录及其后代,默认空;路径相对 projectRoot 解析,也支持绝对路径。 */
31
+ excludeDirs?: readonly string[];
32
+ /** 按目录名跳过,默认 node_modules、dist、coverage;传入时替换默认列表,隐藏目录始终跳过。 */
33
+ skipDirNames?: readonly string[];
34
+ /** 本地化函数名,默认 localize;仅匹配直接调用,不匹配对象成员调用。 */
35
+ callName?: string;
36
+ /** key 所在的参数下标,从 0 开始,默认 0;非字符串字面量会被跳过。 */
37
+ keyArgument?: number;
38
+ /** 默认文案所在的参数下标,从 0 开始,默认 1。 */
39
+ valueArgument?: number;
40
+ /** 语言文件目录,支持绝对路径或相对 projectRoot 的路径;缺失时自动创建。 */
41
+ localesDir: string;
42
+ /** 源语言标识,例如 en-US,对应 localesDir 下的 en-US.json。 */
43
+ defaultLocale: string;
44
+ /** 需要同步并检查翻译的其他语言标识;不包含 defaultLocale,空数组表示仅同步源语言。 */
45
+ otherLocales: readonly string[];
46
+ /** 生成器元数据键,默认不写入;兼容 i18n-ease 时设为 __i18n_ease__,已有文件必须包含此键。 */
47
+ metadataKey?: string;
48
+ }
49
+ export declare function syncLocales(config: SyncLocalesOptions): RuleTask;
50
+ /** 限制带指定注释的文件只能被同一目录的文件直接导入或转导出。 */
51
+ interface SameDirImportOnlyOptions {
52
+ /** 递归扫描的源码目录,支持绝对路径或相对 projectRoot 的路径。 */
53
+ scanRoot: string;
54
+ /** 扫描时跳过的子目录及其后代,默认空;路径相对 projectRoot 解析,也支持绝对路径。 */
55
+ excludeDirs?: readonly string[];
56
+ /** 按目录名跳过,默认 node_modules、dist、coverage;传入时替换默认列表,隐藏目录始终跳过。 */
57
+ skipDirNames?: readonly string[];
58
+ /** 标记内部实现的注释文本,注释去除首尾空白后须与之完全相同,默认 @import-scope same-dir。 */
59
+ marker?: string;
60
+ /** 导入前缀到目录的映射,默认空;目录相对 projectRoot 解析,也支持绝对路径,例如 { "@/": "src" }。 */
61
+ aliases?: Readonly<Record<string, string>>;
62
+ }
63
+ export declare function sameDirImportOnly(config: SameDirImportOnlyOptions): RuleTask;
64
+ /** 需要检查的本地化函数调用及默认文案位置。 */
65
+ interface LocalizationCall {
66
+ /** 函数名,例如 localize。 */
67
+ name: string;
68
+ /** 默认文案所在的参数位置,从 0 开始。 */
69
+ valueArgument: number;
70
+ /** 是否同时匹配成员调用,例如 nls.format();默认 false,只匹配直接调用。 */
71
+ member?: boolean;
72
+ }
73
+ /** 检查源码中本地化默认文案是否匹配禁止的字符或文本。 */
74
+ interface SourceLocaleDefaultsOptions {
75
+ /** 递归扫描的源码目录,支持绝对路径或相对 projectRoot 的路径。 */
76
+ scanRoot: string;
77
+ /** 扫描时跳过的子目录及其后代,默认空;路径相对 projectRoot 解析,也支持绝对路径。 */
78
+ excludeDirs?: readonly string[];
79
+ /** 按目录名跳过,默认 node_modules、dist、coverage;传入时替换默认列表,隐藏目录始终跳过。 */
80
+ skipDirNames?: readonly string[];
81
+ /** 需要检查的本地化调用列表;只检查指定参数中的字符串字面量,空数组表示不匹配任何调用。 */
82
+ calls: readonly LocalizationCall[];
83
+ /** 匹配即判为违规的正则表达式,例如 CJK_PATTERN;每次匹配独立执行,不改变传入正则的状态。 */
84
+ pattern: RegExp;
85
+ }
86
+ /** 汉字、CJK 标点和全角字符;可用于检查英文默认文案。 */
87
+ export declare const CJK_PATTERN: RegExp;
88
+ /** 本地化调用在代码中的默认文案必须使用源语言(不匹配 pattern),翻译放在语言文件中。 */
89
+ export declare function sourceLocaleDefaults(options: SourceLocaleDefaultsOptions): RuleTask;
90
+ /** 检查每个 TSX 文件是否最多定义一个返回 JSX 的组件。 */
91
+ interface SingleComponentFileOptions {
92
+ /** 递归扫描的源码目录,支持绝对路径或相对 projectRoot 的路径。 */
93
+ scanRoot: string;
94
+ /** 扫描时跳过的子目录及其后代,默认空;路径相对 projectRoot 解析,也支持绝对路径。 */
95
+ excludeDirs?: readonly string[];
96
+ /** 按目录名跳过,默认 node_modules、dist、coverage;传入时替换默认列表,隐藏目录始终跳过。 */
97
+ skipDirNames?: readonly string[];
98
+ /** 识别组件时使用的高阶函数名,默认 memo、forwardRef;传入时替换默认列表,直接函数和类组件仍会检查。 */
99
+ componentWrappers?: readonly string[];
100
+ }
101
+ /** 每个 TSX 文件只定义一个返回 JSX 的组件。 */
102
+ export declare function singleComponentFile(options: SingleComponentFileOptions): RuleTask;
103
+ /** 检查 e2e 入口及 helper 的目录边界,禁止在入口中定义辅助函数。 */
104
+ interface E2eScenariosStructureOptions {
105
+ /** 场景根目录,支持绝对路径或相对 projectRoot 的路径;仅检查此目录直接包含的入口文件。 */
106
+ root: string;
107
+ /** 结果名,同一仓库检查多个测试根目录时用于区分,默认 e2e-scenarios-structure。 */
108
+ name?: string;
109
+ /** 入口文件后缀,默认 .spec.ts。 */
110
+ entrySuffix?: string;
111
+ /** 多个入口共用 helper 的目录名,相对 root,默认 shared。 */
112
+ sharedDir?: string;
113
+ /** 各入口专属 helper 的目录名,相对 root,默认 utils;入口只能导入自身同名子目录。 */
114
+ utilsDir?: string;
115
+ /** 是否要求 root 只包含入口文件和配置的两类 helper 目录,默认 false;隐藏条目始终跳过。 */
116
+ strictRoot?: boolean;
117
+ /** helper 被多少个入口使用时建议移到共用目录,默认 3;仅影响违规时的修复建议。 */
118
+ sharedThreshold?: number;
119
+ }
120
+ /**
121
+ * 场景目录结构:入口文件只组织用例,helper 放在 utils/<入口名>(专属)或 shared(共用),
122
+ * 且 shared 与 utils 互不引用。
123
+ */
124
+ export declare function e2eScenariosStructure(options: E2eScenariosStructureOptions): RuleTask;
125
+ /** 检查 UI 截图入口、指定导出与 helper 的目录边界。 */
126
+ interface UiScenariosStructureOptions {
127
+ /** 场景根目录,支持绝对路径或相对 projectRoot 的路径;仅检查此目录直接包含的入口文件。 */
128
+ root: string;
129
+ /** 结果名,同一仓库检查多个测试根目录时用于区分,默认 ui-scenarios-structure。 */
130
+ name?: string;
131
+ /** 入口文件后缀,默认 .ts。 */
132
+ entrySuffix?: string;
133
+ /** 多个入口共用 helper 的目录名,相对 root,默认 shared。 */
134
+ sharedDir?: string;
135
+ /** 各入口专属 helper 的目录名,相对 root,默认 utils;入口只能导入自身同名子目录。 */
136
+ utilsDir?: string;
137
+ /** 每个入口必须提供的具名导出,默认 lint;可导出函数或数据。只有此导出对应的顶层函数允许在入口中定义。 */
138
+ exportName?: string;
139
+ /** 是否要求 root 只包含入口文件和配置的两类 helper 目录,默认 true;隐藏条目始终跳过。 */
140
+ strictRoot?: boolean;
141
+ /** helper 被多少个入口使用时建议移到共用目录,默认 3;仅影响违规时的修复建议。 */
142
+ sharedThreshold?: number;
143
+ }
144
+ /**
145
+ * 场景目录结构:入口文件只组织用例,helper 放在 utils/<入口名>(专属)或 shared(共用),
146
+ * 且 shared 与 utils 互不引用。
147
+ */
148
+ export declare function uiScenariosStructure(options: UiScenariosStructureOptions): RuleTask;
149
+ export type { CommitMessageOptions, DuplicateLocalizationOptions, E2eScenariosStructureOptions, LocalizationCall, SameDirImportOnlyOptions, SingleComponentFileOptions, SourceLocaleDefaultsOptions, SyncLocalesOptions, UiScenariosStructureOptions };
@@ -0,0 +1,12 @@
1
+ interface RuleResult {
2
+ name: string;
3
+ success: boolean;
4
+ messages: string;
5
+ howToFix: string;
6
+ }
7
+ interface CommonConfig {
8
+ /** 已解析的项目绝对路径。 */
9
+ readonly projectRoot: string;
10
+ }
11
+ type RuleTask = (commonConfig: CommonConfig) => Promise<RuleResult>;
12
+ export { RuleResult as n, RuleTask as r, CommonConfig as t };