@yasainet/eslint 0.0.74 → 0.0.76

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 (52) hide show
  1. package/README.md +4 -104
  2. package/package.json +12 -1
  3. package/src/cli/test-audit.mjs +97 -0
  4. package/src/common/CLAUDE.md +19 -0
  5. package/src/common/_internal/constants.mjs +1 -1
  6. package/src/common/_internal/import-patterns.mjs +2 -2
  7. package/src/common/_internal/selectors.mjs +4 -2
  8. package/src/common/base/typescript.mjs +13 -7
  9. package/src/common/boundaries/entry-point.mjs +1 -1
  10. package/src/common/cross-cutting/ban-alias.mjs +1 -1
  11. package/src/common/cross-cutting/features-ts-only.mjs +1 -1
  12. package/src/common/cross-cutting/no-colocated-test.mjs +18 -0
  13. package/src/common/index.mjs +8 -4
  14. package/src/common/layers/entries.mjs +15 -9
  15. package/src/common/layers/queries.mjs +18 -14
  16. package/src/common/layers/schemas.mjs +6 -1
  17. package/src/common/layers/services.mjs +14 -8
  18. package/src/common/layers/{lib.mjs → top-level/lib.mjs} +3 -3
  19. package/src/common/layers/{top-level-utils.mjs → top-level/utils.mjs} +1 -1
  20. package/src/common/layers/utils.mjs +5 -1
  21. package/src/common/local-plugins/entry-single-service-call.mjs +3 -1
  22. package/src/common/local-plugins/entry-template.mjs +18 -16
  23. package/src/common/local-plugins/feature-name.mjs +1 -6
  24. package/src/common/local-plugins/form-state-naming.mjs +1 -1
  25. package/src/common/local-plugins/form-state-shape.mjs +8 -8
  26. package/src/common/local-plugins/import-path-style.mjs +2 -2
  27. package/src/common/local-plugins/index.mjs +2 -0
  28. package/src/common/local-plugins/layout-main-structural-only.mjs +1 -1
  29. package/src/common/local-plugins/namespace-import-name.mjs +1 -1
  30. package/src/common/local-plugins/no-any-return.mjs +1 -1
  31. package/src/common/local-plugins/no-colocated-test.mjs +26 -0
  32. package/src/common/local-plugins/queries-export.mjs +1 -1
  33. package/src/common/local-plugins/queries-namespace-import.mjs +1 -1
  34. package/src/common/local-plugins/schema-naming.mjs +2 -2
  35. package/src/common/local-plugins/supabase-columns-satisfies.mjs +1 -1
  36. package/src/common/local-plugins/supabase-select-typed-columns.mjs +5 -5
  37. package/src/deno/CLAUDE.md +10 -0
  38. package/src/deno/boundaries/entry-point.mjs +3 -3
  39. package/src/deno/boundaries/lib.mjs +1 -1
  40. package/src/deno/boundaries/utils.mjs +2 -2
  41. package/src/deno/local-plugins/flat-entry-point.mjs +1 -1
  42. package/src/next/CLAUDE.md +14 -0
  43. package/src/next/boundaries/components.mjs +2 -2
  44. package/src/next/boundaries/hooks.mjs +2 -2
  45. package/src/next/boundaries/page.mjs +2 -2
  46. package/src/next/boundaries/route.mjs +2 -2
  47. package/src/next/boundaries/sitemap.mjs +2 -2
  48. package/src/next/directives.mjs +4 -4
  49. package/src/next/layers/components.mjs +1 -1
  50. package/src/next/layers/hooks.mjs +1 -1
  51. package/src/next/tailwindcss.mjs +2 -2
  52. package/src/node/CLAUDE.md +7 -0
@@ -9,7 +9,7 @@ export const directivesConfigs = [
9
9
  selector:
10
10
  "Program > :first-child:not(ExpressionStatement[expression.value='use server'])",
11
11
  message:
12
- 'entries/server.ts must start with "use server" directive.',
12
+ 'entries/server.ts は先頭に "use server" directive が必須。',
13
13
  },
14
14
  ],
15
15
  },
@@ -24,7 +24,7 @@ export const directivesConfigs = [
24
24
  selector:
25
25
  "Program > :first-child:not(ExpressionStatement[expression.value='use server'])",
26
26
  message:
27
- 'entries/admin.ts must start with "use server" directive.',
27
+ 'entries/admin.ts は先頭に "use server" directive が必須。',
28
28
  },
29
29
  ],
30
30
  },
@@ -38,7 +38,7 @@ export const directivesConfigs = [
38
38
  {
39
39
  selector: "ExpressionStatement[expression.value='use server']",
40
40
  message:
41
- 'entries/client.ts must NOT have "use server" directive. It uses @/lib/supabase/client.',
41
+ 'entries/client.ts "use server" 禁止。@/lib/supabase/client を使うため。',
42
42
  },
43
43
  ],
44
44
  },
@@ -52,7 +52,7 @@ export const directivesConfigs = [
52
52
  {
53
53
  selector:
54
54
  "Program > :first-child:not(ExpressionStatement[expression.value='use client'])",
55
- message: 'Hooks must start with "use client" directive.',
55
+ message: 'hooks は先頭に "use client" directive が必須。',
56
56
  },
57
57
  ],
58
58
  },
@@ -10,7 +10,7 @@ export const componentsLayerConfigs = [
10
10
  {
11
11
  selector: "Program",
12
12
  message:
13
- "components/ must only contain .tsx files. Logic belongs in src/features/.",
13
+ "components/ .tsx のみ。ロジックは src/features/ に置く。",
14
14
  },
15
15
  ],
16
16
  },
@@ -23,7 +23,7 @@ export const hooksLayerConfigs = [
23
23
  selector:
24
24
  "ExportNamedDeclaration > FunctionDeclaration[id.name!=/^use[A-Z]/]",
25
25
  message:
26
- "Exported functions in hooks must start with 'use' (e.g., useAuth).",
26
+ "hooks export 関数は 'use' で始める (例: useAuth)",
27
27
  },
28
28
  ],
29
29
  },
@@ -42,12 +42,12 @@ export const tailwindcssConfigs = [
42
42
  {
43
43
  pattern: "^(?!mx-auto$)m[trblxy]?-(?!auto$)[^-\\s]+$",
44
44
  message:
45
- "Avoid margin; control spacing with padding/gap (exceptions: mx-auto, -mt-*)",
45
+ "margin を避け、padding/gap で間隔を制御する (例外: mx-auto, -mt-*)",
46
46
  },
47
47
  {
48
48
  pattern: "^space-[xy]-[^-\\s]+$",
49
49
  message:
50
- "Avoid space-x/space-y (uses margin internally); use flex/grid + gap",
50
+ "space-x/space-y は避ける (内部で margin を使う)flex/grid + gap を使う",
51
51
  },
52
52
  ],
53
53
  },
@@ -0,0 +1,7 @@
1
+ # src/node/CLAUDE.md
2
+
3
+ Node.js entry。現状サブディレクトリ・固有 rule なし。
4
+
5
+ - `index.mjs` — Node.js entry。`src/common/` の rule を `scripts/features/` に適用するだけ
6
+
7
+ Node.js 固有の制約が必要になったら、このディレクトリに `boundaries/` 等を作成する。