eslint-plugin-aurora-999 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,7 +71,7 @@ npx eslint .
71
71
  - 禁止 `console.log/debug/info/trace`
72
72
  - 禁止 `debugger`
73
73
  - `aurora/trial-check`
74
- - 仅对 `trialGeneration/**/trialservice.ts` 生效
74
+ - 仅对 `*trialservice.ts` 生效(不要求目录结构)
75
75
  - 约束 `TrialGenerator` 子类、`generate()` 方法以及返回值包含 `target_answer`
76
76
  - `aurora/scene-check`
77
77
  - 仅对 `*scene.ts` 生效
@@ -2,16 +2,9 @@
2
2
 
3
3
  /**
4
4
  * @fileoverview 校验 trialservice.ts 规范的 ESLint 规则
5
- * 仅在匹配到 trialGeneration/<any>/trialservice.ts 时生效
5
+ * 对任意路径下的 trialservice.ts 生效
6
6
  */
7
7
 
8
- const WINDOWS_SEPARATOR = "\\";
9
- const POSIX_SEPARATOR = "/";
10
-
11
- const isInTrialGeneration = (fileName) =>
12
- fileName.includes(`${POSIX_SEPARATOR}trialGeneration${POSIX_SEPARATOR}`) ||
13
- fileName.includes(`${WINDOWS_SEPARATOR}trialGeneration${WINDOWS_SEPARATOR}`);
14
-
15
8
  // 约定:Trial 服务文件名固定为 trialservice.ts(不支持大小写变体)
16
9
  const isTrialServiceFile = (fileName) => fileName.toLowerCase().endsWith("trialservice.ts");
17
10
 
@@ -67,8 +60,8 @@ module.exports = {
67
60
  create(context) {
68
61
  const fileName = context.getFilename?.() || "";
69
62
 
70
- // 非目标目录或非目标文件直接跳过
71
- if (!fileName || fileName === "<input>" || !isInTrialGeneration(fileName) || !isTrialServiceFile(fileName)) {
63
+ // 非目标文件直接跳过
64
+ if (!fileName || fileName === "<input>" || !isTrialServiceFile(fileName)) {
72
65
  return {};
73
66
  }
74
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-aurora-999",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Aurora ESLint plugin (rules) + flat config (recommended)",
5
5
  "main": "lib/index.js",
6
6
  "exports": {