@codyswann/lisa 1.0.0 → 1.0.5

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 (280) hide show
  1. package/README.md +244 -36
  2. package/all/copy-overwrite/.claude/README.md +1 -3
  3. package/all/copy-overwrite/.claude/REFERENCE.md +519 -0
  4. package/all/copy-overwrite/.claude/agents/skill-evaluator.md +7 -7
  5. package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +17 -0
  6. package/all/copy-overwrite/.claude/commands/git/commit.md +9 -5
  7. package/all/copy-overwrite/.claude/commands/git/submit-pr.md +1 -1
  8. package/all/copy-overwrite/.claude/commands/lisa/review-implementation.md +209 -0
  9. package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +58 -0
  10. package/all/copy-overwrite/.claude/commands/project/archive.md +1 -1
  11. package/all/copy-overwrite/.claude/commands/project/complete-task.md +53 -1
  12. package/all/copy-overwrite/.claude/commands/project/debrief.md +12 -23
  13. package/all/copy-overwrite/.claude/commands/project/execute.md +33 -77
  14. package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +87 -0
  15. package/all/copy-overwrite/.claude/commands/project/implement.md +24 -28
  16. package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +30 -55
  17. package/all/copy-overwrite/.claude/commands/project/plan.md +87 -242
  18. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +76 -0
  19. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +75 -0
  20. package/all/copy-overwrite/.claude/commands/project/research.md +86 -188
  21. package/all/copy-overwrite/.claude/commands/project/review.md +19 -38
  22. package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
  23. package/all/copy-overwrite/.claude/commands/project/verify.md +62 -25
  24. package/all/copy-overwrite/.claude/commands/pull-request/review.md +25 -7
  25. package/all/copy-overwrite/.claude/commands/tasks/load.md +63 -0
  26. package/all/copy-overwrite/.claude/commands/tasks/sync.md +84 -0
  27. package/all/copy-overwrite/.claude/hooks/README.md +75 -0
  28. package/all/copy-overwrite/.claude/hooks/check-tired-boss.sh +61 -0
  29. package/all/copy-overwrite/.claude/hooks/debug-hook.sh +47 -0
  30. package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +2 -0
  31. package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +95 -0
  32. package/all/copy-overwrite/.claude/{skills/coding-philosophy/SKILL.md → rules/coding-philosophy.md} +93 -70
  33. package/all/copy-overwrite/.claude/settings.json +35 -14
  34. package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +41 -9
  35. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +2 -0
  36. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +2 -0
  37. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +2 -0
  38. package/all/copy-overwrite/.safety-net.json +25 -0
  39. package/all/copy-overwrite/CLAUDE.md +8 -30
  40. package/all/copy-overwrite/HUMAN.md +517 -17
  41. package/all/create-only/.claude/rules/PROJECT_RULES.md +9 -0
  42. package/all/create-only/scripts/setup-deploy-key.sh +190 -0
  43. package/all/deletions.json +5 -0
  44. package/cdk/copy-overwrite/.github/workflows/ci.yml +142 -0
  45. package/cdk/copy-overwrite/.github/workflows/deploy.yml +59 -0
  46. package/cdk/copy-overwrite/eslint.cdk.ts +175 -0
  47. package/cdk/copy-overwrite/eslint.config.ts +51 -0
  48. package/cdk/copy-overwrite/eslint.slow.config.ts +80 -0
  49. package/cdk/copy-overwrite/knip.json +53 -0
  50. package/cdk/copy-overwrite/tsconfig.eslint.json +11 -0
  51. package/cdk/merge/package.json +17 -1
  52. package/dist/cli/index.d.ts +3 -2
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli/index.js +83 -64
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/cli/prompts.d.ts +17 -3
  57. package/dist/cli/prompts.d.ts.map +1 -1
  58. package/dist/cli/prompts.js +52 -16
  59. package/dist/cli/prompts.js.map +1 -1
  60. package/dist/core/config.d.ts +13 -4
  61. package/dist/core/config.d.ts.map +1 -1
  62. package/dist/core/config.js +17 -9
  63. package/dist/core/config.js.map +1 -1
  64. package/dist/core/git-service.d.ts +40 -0
  65. package/dist/core/git-service.d.ts.map +1 -0
  66. package/dist/core/git-service.js +52 -0
  67. package/dist/core/git-service.js.map +1 -0
  68. package/dist/core/index.d.ts +3 -3
  69. package/dist/core/index.js +3 -3
  70. package/dist/core/lisa.d.ts +124 -7
  71. package/dist/core/lisa.d.ts.map +1 -1
  72. package/dist/core/lisa.js +423 -221
  73. package/dist/core/lisa.js.map +1 -1
  74. package/dist/core/manifest.d.ts +5 -1
  75. package/dist/core/manifest.d.ts.map +1 -1
  76. package/dist/core/manifest.js +22 -16
  77. package/dist/core/manifest.js.map +1 -1
  78. package/dist/detection/detector.interface.d.ts +1 -1
  79. package/dist/detection/detectors/cdk.d.ts +6 -1
  80. package/dist/detection/detectors/cdk.d.ts.map +1 -1
  81. package/dist/detection/detectors/cdk.js +16 -8
  82. package/dist/detection/detectors/cdk.js.map +1 -1
  83. package/dist/detection/detectors/expo.d.ts +6 -1
  84. package/dist/detection/detectors/expo.d.ts.map +1 -1
  85. package/dist/detection/detectors/expo.js +13 -8
  86. package/dist/detection/detectors/expo.js.map +1 -1
  87. package/dist/detection/detectors/nestjs.d.ts +7 -2
  88. package/dist/detection/detectors/nestjs.d.ts.map +1 -1
  89. package/dist/detection/detectors/nestjs.js +17 -9
  90. package/dist/detection/detectors/nestjs.js.map +1 -1
  91. package/dist/detection/detectors/npm-package.d.ts +6 -1
  92. package/dist/detection/detectors/npm-package.d.ts.map +1 -1
  93. package/dist/detection/detectors/npm-package.js +9 -4
  94. package/dist/detection/detectors/npm-package.js.map +1 -1
  95. package/dist/detection/detectors/typescript.d.ts +6 -1
  96. package/dist/detection/detectors/typescript.d.ts.map +1 -1
  97. package/dist/detection/detectors/typescript.js +12 -7
  98. package/dist/detection/detectors/typescript.js.map +1 -1
  99. package/dist/detection/index.d.ts +13 -3
  100. package/dist/detection/index.d.ts.map +1 -1
  101. package/dist/detection/index.js +17 -7
  102. package/dist/detection/index.js.map +1 -1
  103. package/dist/errors/index.d.ts +66 -2
  104. package/dist/errors/index.d.ts.map +1 -1
  105. package/dist/errors/index.js +89 -17
  106. package/dist/errors/index.js.map +1 -1
  107. package/dist/index.js +3 -3
  108. package/dist/index.js.map +1 -1
  109. package/dist/logging/console-logger.d.ts +21 -1
  110. package/dist/logging/console-logger.d.ts.map +1 -1
  111. package/dist/logging/console-logger.js +26 -6
  112. package/dist/logging/console-logger.js.map +1 -1
  113. package/dist/logging/index.d.ts +3 -3
  114. package/dist/logging/index.js +2 -2
  115. package/dist/logging/logger.interface.d.ts +1 -1
  116. package/dist/logging/silent-logger.d.ts +21 -1
  117. package/dist/logging/silent-logger.d.ts.map +1 -1
  118. package/dist/logging/silent-logger.js +20 -0
  119. package/dist/logging/silent-logger.js.map +1 -1
  120. package/dist/strategies/copy-contents.d.ts +47 -6
  121. package/dist/strategies/copy-contents.d.ts.map +1 -1
  122. package/dist/strategies/copy-contents.js +99 -49
  123. package/dist/strategies/copy-contents.js.map +1 -1
  124. package/dist/strategies/copy-overwrite.d.ts +10 -2
  125. package/dist/strategies/copy-overwrite.d.ts.map +1 -1
  126. package/dist/strategies/copy-overwrite.js +17 -9
  127. package/dist/strategies/copy-overwrite.js.map +1 -1
  128. package/dist/strategies/create-only.d.ts +10 -2
  129. package/dist/strategies/create-only.d.ts.map +1 -1
  130. package/dist/strategies/create-only.js +14 -6
  131. package/dist/strategies/create-only.js.map +1 -1
  132. package/dist/strategies/index.d.ts +17 -7
  133. package/dist/strategies/index.d.ts.map +1 -1
  134. package/dist/strategies/index.js +19 -9
  135. package/dist/strategies/index.js.map +1 -1
  136. package/dist/strategies/merge.d.ts +10 -2
  137. package/dist/strategies/merge.d.ts.map +1 -1
  138. package/dist/strategies/merge.js +21 -21
  139. package/dist/strategies/merge.js.map +1 -1
  140. package/dist/strategies/strategy.interface.d.ts +1 -1
  141. package/dist/strategies/strategy.interface.d.ts.map +1 -1
  142. package/dist/transaction/backup.d.ts +15 -1
  143. package/dist/transaction/backup.d.ts.map +1 -1
  144. package/dist/transaction/backup.js +47 -12
  145. package/dist/transaction/backup.js.map +1 -1
  146. package/dist/transaction/index.d.ts +3 -3
  147. package/dist/transaction/index.js +2 -2
  148. package/dist/transaction/transaction.d.ts +25 -2
  149. package/dist/transaction/transaction.d.ts.map +1 -1
  150. package/dist/transaction/transaction.js +25 -2
  151. package/dist/transaction/transaction.js.map +1 -1
  152. package/dist/utils/file-operations.d.ts +21 -0
  153. package/dist/utils/file-operations.d.ts.map +1 -1
  154. package/dist/utils/file-operations.js +48 -12
  155. package/dist/utils/file-operations.js.map +1 -1
  156. package/dist/utils/index.d.ts +3 -3
  157. package/dist/utils/index.js +3 -3
  158. package/dist/utils/json-utils.d.ts +12 -0
  159. package/dist/utils/json-utils.d.ts.map +1 -1
  160. package/dist/utils/json-utils.js +17 -5
  161. package/dist/utils/json-utils.js.map +1 -1
  162. package/dist/utils/path-utils.d.ts +11 -0
  163. package/dist/utils/path-utils.d.ts.map +1 -1
  164. package/dist/utils/path-utils.js +12 -1
  165. package/dist/utils/path-utils.js.map +1 -1
  166. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  167. package/eslint-plugin-code-organization/index.js +5 -0
  168. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  169. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +2 -0
  170. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +2 -0
  171. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +2 -0
  172. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +2 -0
  173. package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +2 -0
  174. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +2 -0
  175. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +2 -41
  176. package/{typescript → expo}/copy-overwrite/.github/workflows/build.yml +3 -0
  177. package/expo/copy-overwrite/.github/workflows/ci.yml +36 -0
  178. package/{typescript → expo}/copy-overwrite/.github/workflows/deploy.yml +22 -26
  179. package/{typescript → expo}/copy-overwrite/.github/workflows/lighthouse.yml +4 -1
  180. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +5 -0
  181. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +5 -0
  182. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +5 -0
  183. package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +5 -0
  184. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +5 -0
  185. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +6 -1
  186. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +5 -0
  187. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +5 -0
  188. package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +0 -68
  189. package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +5 -3
  190. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +5 -0
  191. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +5 -0
  192. package/expo/copy-overwrite/eslint.config.ts +53 -0
  193. package/expo/copy-overwrite/eslint.expo.ts +330 -0
  194. package/expo/copy-overwrite/eslint.slow.config.ts +86 -0
  195. package/expo/copy-overwrite/knip.json +132 -0
  196. package/expo/copy-overwrite/lighthouserc.js +27 -0
  197. package/expo/copy-overwrite/tsconfig.eslint.json +25 -0
  198. package/expo/create-only/lighthouserc-config.json +6 -1
  199. package/expo/merge/package.json +16 -3
  200. package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +1 -1
  201. package/{typescript → nestjs}/copy-overwrite/.github/k6/README.md +2 -2
  202. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +3 -0
  203. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/data-driven-test.js +5 -0
  204. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.js +6 -2
  205. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.js +5 -0
  206. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.js +5 -0
  207. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.js +5 -0
  208. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.js +5 -0
  209. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/api-test.js +5 -0
  210. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/default-test.js +5 -0
  211. package/nestjs/copy-overwrite/.github/workflows/ci.yml +29 -0
  212. package/nestjs/copy-overwrite/.github/workflows/deploy.yml +291 -0
  213. package/{typescript → nestjs}/copy-overwrite/.github/workflows/load-test.yml +3 -0
  214. package/nestjs/copy-overwrite/eslint.config.ts +53 -0
  215. package/nestjs/copy-overwrite/eslint.nestjs.ts +178 -0
  216. package/nestjs/merge/package.json +11 -3
  217. package/package.json +34 -40
  218. package/typescript/copy-contents/.husky/pre-commit +1 -1
  219. package/typescript/copy-contents/.husky/pre-push +99 -118
  220. package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +2 -0
  221. package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +3 -11
  222. package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +2 -0
  223. package/typescript/copy-overwrite/.claude/hooks/sg-scan-on-edit.sh +68 -0
  224. package/typescript/copy-overwrite/.claude/settings.json +79 -0
  225. package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +44 -0
  226. package/typescript/copy-overwrite/.github/README.md +49 -1
  227. package/typescript/copy-overwrite/.github/dependabot.yml +3 -0
  228. package/typescript/copy-overwrite/.github/workflows/ci.yml +7 -29
  229. package/typescript/copy-overwrite/.github/workflows/claude.yml +3 -0
  230. package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +6 -4
  231. package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +176 -0
  232. package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +3 -1
  233. package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +3 -1
  234. package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +40 -0
  235. package/typescript/copy-overwrite/.github/workflows/quality.yml +151 -38
  236. package/typescript/copy-overwrite/.github/workflows/release.yml +3 -0
  237. package/typescript/copy-overwrite/.gitleaksignore +3 -0
  238. package/typescript/copy-overwrite/.lintstagedrc.json +6 -0
  239. package/typescript/copy-overwrite/.prettierignore +2 -1
  240. package/typescript/copy-overwrite/.yamllint +2 -0
  241. package/typescript/copy-overwrite/ast-grep/rule-tests/.gitkeep +3 -0
  242. package/typescript/copy-overwrite/ast-grep/rules/.gitkeep +3 -0
  243. package/typescript/copy-overwrite/ast-grep/utils/.gitkeep +3 -0
  244. package/typescript/copy-overwrite/{commitlint.config.js → commitlint.config.cjs} +5 -0
  245. package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  246. package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +5 -0
  247. package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  248. package/typescript/copy-overwrite/eslint.base.ts +430 -0
  249. package/typescript/copy-overwrite/eslint.config.ts +52 -0
  250. package/typescript/copy-overwrite/eslint.ignore.config.json +19 -2
  251. package/typescript/copy-overwrite/eslint.slow.config.ts +69 -0
  252. package/typescript/copy-overwrite/eslint.typescript.ts +142 -0
  253. package/typescript/copy-overwrite/knip.json +64 -0
  254. package/typescript/copy-overwrite/sgconfig.yml +11 -0
  255. package/typescript/copy-overwrite/tsconfig.eslint.json +9 -0
  256. package/typescript/create-only/eslint.config.local.ts +24 -0
  257. package/typescript/{copy-overwrite/eslint.thresholds.config.json → create-only/eslint.thresholds.json} +1 -1
  258. package/typescript/github-rulesets/base.json +2 -75
  259. package/typescript/merge/.claude/settings.json +160 -0
  260. package/typescript/merge/package.json +35 -34
  261. package/all/copy-overwrite/.claude/commands/rules/format-md.md +0 -72
  262. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +0 -416
  263. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +0 -316
  264. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +0 -73
  265. package/expo/copy-overwrite/eslint.config.mjs +0 -560
  266. package/lisa.sh +0 -35
  267. package/typescript/copy-overwrite/eslint.config.mjs +0 -390
  268. /package/{all/create-only/PROJECT_RULES.md → cdk/copy-overwrite/.github/workflows/.keep} +0 -0
  269. /package/{typescript → nestjs}/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +0 -0
  270. /package/{typescript → nestjs}/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +0 -0
  271. /package/{typescript → nestjs}/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +0 -0
  272. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.json +0 -0
  273. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.json +0 -0
  274. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.json +0 -0
  275. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.json +0 -0
  276. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.json +0 -0
  277. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/normal.json +0 -0
  278. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/relaxed.json +0 -0
  279. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/strict.json +0 -0
  280. /package/{typescript → nestjs}/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -0
@@ -1,560 +0,0 @@
1
- /**
2
- * ESLint 9 Flat Config
3
- *
4
- * This configuration file replaces the legacy .eslintrc.json format.
5
- * It uses JavaScript modules and explicit imports for all plugins and configs.
6
- *
7
- * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
8
- * @module eslint.config
9
- */
10
- import eslintComments from "@eslint-community/eslint-plugin-eslint-comments";
11
- import js from "@eslint/js";
12
- import functional from "eslint-plugin-functional";
13
- import jsdoc from "eslint-plugin-jsdoc";
14
- import jsxA11y from "eslint-plugin-jsx-a11y";
15
- import prettier from "eslint-plugin-prettier/recommended";
16
- import react from "eslint-plugin-react";
17
- import reactCompiler from "eslint-plugin-react-compiler";
18
- import reactPerf from "eslint-plugin-react-perf";
19
- import sonarjs from "eslint-plugin-sonarjs";
20
- import tailwind from "eslint-plugin-tailwindcss";
21
- import globals from "globals";
22
- import path from "path";
23
- import tseslint from "typescript-eslint";
24
- import { fileURLToPath } from "url";
25
-
26
- // Project-specific configuration loaded from JSON files
27
- // Edit these files to customize for your project; this JS file can be shared unchanged
28
- import ignoreConfig from "./eslint.ignore.config.json" with { type: "json" };
29
- import thresholdsConfig from "./eslint.thresholds.config.json" with { type: "json" };
30
-
31
- const __filename = fileURLToPath(import.meta.url);
32
- const __dirname = path.dirname(__filename);
33
-
34
- /** Default ignore patterns used when not specified in config */
35
- const defaultIgnores = [
36
- "build/**",
37
- "dist/**",
38
- ".build/**",
39
- ".esbuild/**",
40
- ".serverless/**",
41
- ".webpack/**",
42
- "_warmup/**",
43
- "node_modules/**",
44
- "**/node_modules/**",
45
- "src/graphql/**",
46
- "src/graphql.ts",
47
- "src/graphql-generated/**",
48
- "src/generated/**",
49
- "graphql/**",
50
- "graphql-generated/**",
51
- "generated/**",
52
- "components/ui/**",
53
- "coverage/**",
54
- "**/*spec.ts",
55
- "resolver-test.setup.ts",
56
- "**/*.factory.ts",
57
- "**/test-utils/**",
58
- "**/test/**",
59
- "**/database/migrations/**",
60
- "cypress/**",
61
- "e2e/**",
62
- "playwright-report/**",
63
- ".lighthouseci/**",
64
- ".expo/**",
65
- ".github/**",
66
- "public/**",
67
- ".dead/**",
68
- "example/**",
69
- "tmp/**",
70
- ".vscode/**",
71
- "*.config.js",
72
- "*.config.mjs",
73
- "babel.config.js",
74
- "metro.config.js",
75
- "webpack.*.js",
76
- "*.d.ts",
77
- "esbuild.plugins.js",
78
- "projects/**/scripts/**",
79
- "scripts/**",
80
- "lib/**/*.js",
81
- "cdk.out/**",
82
- ];
83
-
84
- /** Default thresholds used when not specified in config */
85
- const defaultThresholds = {
86
- cognitiveComplexity: 10,
87
- maxLines: 300,
88
- maxLinesView: 300,
89
- };
90
-
91
- const ignorePatterns = ignoreConfig.ignores || defaultIgnores;
92
- const thresholds = { ...defaultThresholds, ...thresholdsConfig };
93
-
94
- // Custom plugins and configs (CommonJS - use createRequire)
95
- import { createRequire } from "module";
96
- const require = createRequire(import.meta.url);
97
-
98
- // Custom plugins
99
- const componentStructure = require("./eslint-plugin-component-structure/index.js");
100
- const codeOrganization = require("./eslint-plugin-code-organization/index.js");
101
- const uiStandards = require("./eslint-plugin-ui-standards/index.js");
102
-
103
- // Expo config (CommonJS)
104
- const expoConfig = require("eslint-config-expo/flat");
105
-
106
- export default [
107
- // Global ignores - loaded from eslint.ignore.config.json
108
- {
109
- ignores: ignorePatterns,
110
- },
111
-
112
- // Base configurations
113
- js.configs.recommended,
114
- ...expoConfig,
115
-
116
- // TypeScript configuration
117
- ...tseslint.configs.recommended,
118
-
119
- // React configurations
120
- react.configs.flat.recommended,
121
- react.configs.flat["jsx-runtime"],
122
- // Note: react-hooks plugin is provided by eslint-config-expo
123
-
124
- // Accessibility
125
- jsxA11y.flatConfigs.strict,
126
-
127
- // Functional programming - manual configuration since v7 requires type info
128
- // We'll configure specific rules we need without type checking
129
- {
130
- plugins: {
131
- functional,
132
- },
133
- },
134
-
135
- // Tailwind CSS
136
- ...tailwind.configs["flat/recommended"],
137
-
138
- // Code quality
139
- sonarjs.configs.recommended,
140
- {
141
- plugins: {
142
- "@eslint-community/eslint-comments": eslintComments,
143
- },
144
- rules: {
145
- ...eslintComments.configs.recommended.rules,
146
- },
147
- },
148
-
149
- // Documentation
150
- jsdoc.configs["flat/recommended-typescript-flavor"],
151
-
152
- // Performance
153
- reactPerf.configs.flat.recommended,
154
-
155
- // Prettier (must be last of shared configs)
156
- prettier,
157
-
158
- // Base configuration for all files
159
- {
160
- languageOptions: {
161
- globals: {
162
- ...globals.browser,
163
- ...globals.node,
164
- ...globals.es2021,
165
- },
166
- parserOptions: {
167
- ecmaFeatures: { jsx: true },
168
- ecmaVersion: 2021,
169
- sourceType: "module",
170
- },
171
- },
172
- plugins: {
173
- "component-structure": componentStructure,
174
- "code-organization": codeOrganization,
175
- "react-compiler": reactCompiler,
176
- "ui-standards": uiStandards,
177
- // folders: foldersPlugin, // Disabled: not compatible with ESLint 9 flat config
178
- },
179
- rules: {
180
- // Prettier: Disabled because running Prettier inside ESLint is redundant and slower.
181
- // We use `format:check` from package.json for formatting validation and editor Prettier integration.
182
- // The eslint-config-prettier (imported above) still disables conflicting ESLint rules.
183
- // @see https://prettier.io/docs/en/integrating-with-linters.html
184
- "prettier/prettier": "off",
185
-
186
- // Code organization
187
- "code-organization/enforce-statement-order": "error",
188
-
189
- // UI standards (all off by default)
190
- "ui-standards/no-classname-outside-ui": "off",
191
- "ui-standards/no-direct-rn-imports": "off",
192
- "ui-standards/no-inline-styles": "off",
193
-
194
- // Tailwind
195
- "tailwindcss/classnames-order": [
196
- "error",
197
- {
198
- callees: ["tva", "classnames", "clsx", "ctl", "cva", "tv"],
199
- },
200
- ],
201
-
202
- // Import rules
203
- "import/no-cycle": "off", // Disable because this is very, very slow. TODO: debug and re-enable
204
- "import/no-unresolved": "off", // Disabled: doesn't understand React Native platform extensions (.native.tsx, .web.tsx)
205
- "import/prefer-default-export": "off",
206
- "import/namespace": "off", // Disable because this is slow and typescript type check will catch this
207
- "import/no-duplicates": "error",
208
- "no-restricted-imports": [
209
- "warn",
210
- {
211
- patterns: ["@/features/*/*"],
212
- },
213
- ],
214
-
215
- // File size - threshold loaded from eslint.thresholds.config.json
216
- "max-lines": [
217
- "error",
218
- {
219
- max: thresholds.maxLines,
220
- skipBlankLines: true,
221
- skipComments: true,
222
- },
223
- ],
224
-
225
- // Folder naming
226
- // NOTE: eslint-plugin-folders is not compatible with ESLint 9 flat config
227
- // The rule has no schema defined and ESLint 9 validates rule options strictly
228
- // This needs to be addressed in a separate PR or the plugin needs to be updated
229
- // "folders/match-regex": ["error", "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$", "/src/"],
230
-
231
- // SonarJS rules - threshold loaded from eslint.thresholds.config.json
232
- "sonarjs/cognitive-complexity": ["error", thresholds.cognitiveComplexity],
233
- "sonarjs/no-identical-functions": "error",
234
- "sonarjs/no-duplicate-string": "error",
235
- "sonarjs/no-nested-template-literals": "warn",
236
- "sonarjs/prefer-immediate-return": "warn",
237
- "sonarjs/prefer-single-boolean-return": "warn",
238
- "sonarjs/no-collapsible-if": "warn",
239
- // New rules in SonarJS v3 - disabled temporarily to allow migration
240
- // These need to be addressed in a separate cleanup task
241
- "sonarjs/pseudo-random": "error",
242
- "sonarjs/no-clear-text-protocols": "error",
243
- "sonarjs/prefer-read-only-props": "error",
244
- "sonarjs/no-empty-test-file": "warn",
245
- "sonarjs/no-nested-conditional": "off",
246
- "sonarjs/no-commented-code": "warn",
247
- "sonarjs/no-ignored-exceptions": "warn",
248
- "sonarjs/todo-tag": "warn",
249
- // Next takes forever and doesn't provide value
250
- "sonarjs/aws-restricted-ip-admin-access": "off",
251
-
252
- // React performance
253
- "react-perf/jsx-no-new-object-as-prop": "error",
254
- "react-perf/jsx-no-new-array-as-prop": "error",
255
- "react-perf/jsx-no-new-function-as-prop": "error",
256
-
257
- // ESLint comments
258
- "@eslint-community/eslint-comments/require-description": "error",
259
- "@eslint-community/eslint-comments/disable-enable-pair": "error",
260
- "@eslint-community/eslint-comments/no-unlimited-disable": "error",
261
-
262
- // React rules
263
- "react/jsx-no-constructed-context-values": "error",
264
- "react/jsx-uses-react": "off",
265
- "react/react-in-jsx-scope": "off",
266
- "react-hooks/exhaustive-deps": "error",
267
- "react-hooks/rules-of-hooks": "error",
268
- "react-hooks/set-state-in-effect": "error",
269
- "react-hooks/preserve-manual-memoization": "error",
270
- "react-hooks/refs": "error",
271
- "react-hooks/immutability": "error",
272
- "react-compiler/react-compiler": "error",
273
-
274
- // Environment variables - enforce validated env module usage
275
- // @see .claude/skills/expo-env-config/SKILL.md
276
- "no-restricted-syntax": [
277
- "error",
278
- {
279
- selector:
280
- "MemberExpression[object.name='process'][property.name='env']",
281
- message:
282
- "Direct process.env access is forbidden. Import { env } from '@/lib/env' instead for type-safe, validated environment variables.",
283
- },
284
- ],
285
-
286
- // General rules
287
- "no-console": "warn",
288
- "no-extra-boolean-cast": "off",
289
- "prefer-const": "error",
290
- "no-param-reassign": "error",
291
- "no-var": "error",
292
- "brace-style": "error",
293
- "prefer-template": "error",
294
- radix: "error",
295
- "space-before-blocks": "error",
296
- "no-unused-vars": "off",
297
-
298
- // TypeScript rules
299
- "@typescript-eslint/no-explicit-any": "error",
300
- "@typescript-eslint/no-unused-vars": [
301
- "error",
302
- {
303
- argsIgnorePattern: "^_",
304
- varsIgnorePattern: "^_|^unstable_settings$|^React$",
305
- caughtErrorsIgnorePattern: "^_",
306
- },
307
- ],
308
- // New rules in typescript-eslint v8 - disabled temporarily
309
- "@typescript-eslint/no-require-imports": "off",
310
- "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
311
- "@typescript-eslint/ban-ts-comment": "off",
312
- "@typescript-eslint/prefer-as-const": "off",
313
- "@typescript-eslint/no-empty-object-type": "off",
314
- "@typescript-eslint/no-unused-expressions": "off",
315
- "@typescript-eslint/no-unsafe-function-type": "off",
316
-
317
- // Functional rules - configured to avoid type-checking requirements
318
- // Rules that require type info are disabled
319
- "functional/no-mixed-types": "off",
320
- "functional/functional-parameters": "off",
321
- "functional/prefer-immutable-types": "off",
322
- "functional/no-expression-statements": "off",
323
- "functional/no-conditional-statements": "off",
324
- "functional/prefer-property-signatures": "off",
325
- "functional/no-return-void": "off",
326
- "functional/no-throw-statements": "off",
327
- "functional/prefer-readonly-type": "off",
328
- "functional/prefer-tacit": "off",
329
- "functional/readonly-type": "off",
330
- "functional/type-declaration-immutability": "off",
331
- // Rules we want - these work without type info
332
- // NOTE: functional/immutable-data requires type info - enabled in TypeScript file config below
333
- "functional/immutable-data": "off",
334
- "functional/no-let": "error",
335
- "functional/no-classes": "error",
336
-
337
- // JSDoc rules
338
- "jsdoc/require-jsdoc": [
339
- "error",
340
- {
341
- require: {
342
- FunctionDeclaration: true,
343
- MethodDefinition: false,
344
- ClassDeclaration: false,
345
- ArrowFunctionExpression: false,
346
- FunctionExpression: false,
347
- },
348
- contexts: [
349
- "TSInterfaceDeclaration",
350
- "TSTypeAliasDeclaration",
351
- "VariableDeclaration[declarations.0.init.type='ArrowFunctionExpression']:has([id.name=/^[A-Z]/])",
352
- ],
353
- },
354
- ],
355
- "jsdoc/require-param-description": "error",
356
- "jsdoc/require-returns-description": "error",
357
- "jsdoc/require-property-description": "error",
358
- "jsdoc/check-tag-names": ["error", { definedTags: ["remarks"] }],
359
- "jsdoc/no-types": "off",
360
- "jsdoc/require-param-type": "off",
361
- "jsdoc/require-returns-type": "off",
362
- "jsdoc/require-property-type": "off",
363
- },
364
- },
365
-
366
- // JavaScript files override
367
- {
368
- files: ["**/*.js"],
369
- rules: {
370
- "sonarjs/cognitive-complexity": "off",
371
- "@typescript-eslint/no-require-imports": "off", // CommonJS files
372
- },
373
- },
374
-
375
- // Shared hooks and components
376
- {
377
- files: ["hooks/shared/**/*", "components/shared/**/*"],
378
- rules: {
379
- "no-restricted-imports": "off",
380
- },
381
- },
382
-
383
- // UI components
384
- {
385
- files: [
386
- "components/ui/**/*.tsx",
387
- "components/ui/**/*.jsx",
388
- "components/custom/ui/**/*.tsx",
389
- "components/custom/ui/**/*.jsx",
390
- ],
391
- rules: {
392
- "ui-standards/no-classname-outside-ui": "off",
393
- "ui-standards/no-inline-styles": "off",
394
- },
395
- },
396
-
397
- // View files - threshold loaded from eslint.thresholds.config.json
398
- {
399
- files: ["**/*View.tsx", "**/*View.jsx"],
400
- rules: {
401
- "max-lines": [
402
- "error",
403
- { max: thresholds.maxLinesView, skipBlankLines: true, skipComments: true },
404
- ],
405
- },
406
- },
407
-
408
- // Test files and Jest setup
409
- {
410
- files: [
411
- "**/*.test.js",
412
- "**/*.test.jsx",
413
- "**/*.test.ts",
414
- "**/*.test.tsx",
415
- "**/*.spec.js",
416
- "**/*.spec.jsx",
417
- "**/*.spec.ts",
418
- "**/*.spec.tsx",
419
- "jest.setup.js",
420
- "jest.setup.ts",
421
- "jest.setup.pre.js",
422
- "**/__tests__/*",
423
- ],
424
- languageOptions: {
425
- globals: {
426
- ...globals.jest,
427
- },
428
- },
429
- rules: {
430
- "@typescript-eslint/no-explicit-any": "off",
431
- // Tests often need to mutate state for mocks, setup, and assertions
432
- "functional/immutable-data": "off",
433
- },
434
- },
435
-
436
- // TypeScript files - enable type-checked linting
437
- {
438
- files: ["**/*.ts", "**/*.tsx"],
439
- // languageOptions: {
440
- // parserOptions: {
441
- // projectService: true,
442
- // tsconfigRootDir: __dirname,
443
- // },
444
- // },
445
- rules: {
446
- "react/prop-types": "off",
447
- // Enable immutable-data rule now that type-checking is available
448
- "functional/immutable-data": [
449
- "off",
450
- {
451
- ignoreClasses: true,
452
- ignoreImmediateMutation: true,
453
- ignoreNonConstDeclarations: {
454
- treatParametersAsConst: true,
455
- },
456
- // Allow common React patterns:
457
- // - Component.displayName = "ComponentName" for debugging
458
- // - ref.current = value for useRef mutations
459
- // - animation.value = value for animation changes
460
- ignoreAccessorPattern: ["*.displayName", "*.current", "*.value"],
461
- },
462
- ],
463
- },
464
- },
465
-
466
- // TSX files
467
- {
468
- files: ["**/*.tsx"],
469
- rules: {
470
- "jsdoc/require-returns": "off",
471
- },
472
- },
473
-
474
- // TypeScript test files - disable immutable-data (must come after TypeScript config)
475
- {
476
- files: ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"],
477
- rules: {
478
- // Tests often need to mutate state for mocks, setup, and assertions
479
- "functional/immutable-data": "off",
480
- },
481
- },
482
-
483
- // Component structure rules
484
- {
485
- files: [
486
- "features/**/components/**/*.ts",
487
- "features/**/components/**/*.tsx",
488
- "features/**/components/**/*.jsx",
489
- "features/**/screens/**/*.ts",
490
- "features/**/screens/**/*.tsx",
491
- "features/**/screens/**/*.jsx",
492
- "components/**/*.ts",
493
- "components/**/*.tsx",
494
- "components/**/*.jsx",
495
- ],
496
- ignores: [
497
- "components/ui/**",
498
- "components/shared/**",
499
- "components/icons/**",
500
- ],
501
- rules: {
502
- "component-structure/enforce-component-structure": "error",
503
- "component-structure/single-component-per-file": "error",
504
- },
505
- },
506
-
507
- // View component rules
508
- {
509
- files: ["**/*View.tsx", "**/*View.jsx"],
510
- rules: {
511
- "component-structure/no-return-in-view": "error",
512
- },
513
- },
514
-
515
- // View memo requirement (excluding UI components)
516
- {
517
- files: ["**/*View.tsx", "**/*View.jsx"],
518
- ignores: ["components/ui/**"],
519
- rules: {
520
- "component-structure/require-memo-in-view": "error",
521
- },
522
- },
523
-
524
- // Environment validation module - allowed to access process.env
525
- // This is the ONLY file that should directly read environment variables
526
- // @see .claude/skills/expo-env-config/SKILL.md
527
- {
528
- files: ["src/lib/env.ts", "lib/env.ts", "lib/__tests__/env.test.ts"],
529
- rules: {
530
- "no-restricted-syntax": "off",
531
- },
532
- },
533
-
534
- // Test files that mock process.env for environment variable testing
535
- // These need direct access to process.env to set up test fixtures
536
- {
537
- files: [
538
- "lib/apollo/sentryLink.test.ts",
539
- "lib/build/info.test.ts",
540
- "lib/sentry/config.test.ts",
541
- ],
542
- rules: {
543
- "no-restricted-syntax": "off",
544
- },
545
- },
546
-
547
- // Build/config files - allowed to access process.env at build time
548
- // These run in Node.js during build, not in the app bundle
549
- {
550
- files: [
551
- "app.config.ts",
552
- "codegen.ts",
553
- "playwright.config.ts",
554
- "lighthouserc.js",
555
- ],
556
- rules: {
557
- "no-restricted-syntax": "off",
558
- },
559
- },
560
- ];
package/lisa.sh DELETED
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Lisa - Claude Code governance framework
4
- #
5
- # This script wraps the TypeScript implementation. If Node.js is not available,
6
- # it falls back to the legacy bash implementation.
7
- #
8
-
9
- set -euo pipefail
10
-
11
- LISA_DIR="$(cd "$(dirname "$0")" && pwd)"
12
-
13
- # Check if Node.js is available and the dist directory exists
14
- if command -v node &> /dev/null && [[ -d "$LISA_DIR/dist" ]]; then
15
- # Run the TypeScript version
16
- exec node "$LISA_DIR/dist/index.js" "$@"
17
- elif command -v npx &> /dev/null && [[ -f "$LISA_DIR/package.json" ]]; then
18
- # Try building and running via npm
19
- echo "[INFO] Building TypeScript version..."
20
- cd "$LISA_DIR"
21
- npm run build --silent 2>/dev/null || true
22
- if [[ -d "$LISA_DIR/dist" ]]; then
23
- exec node "$LISA_DIR/dist/index.js" "$@"
24
- fi
25
- fi
26
-
27
- # If we get here, TypeScript version is not available
28
- echo "[ERROR] TypeScript version not available."
29
- echo ""
30
- echo "To use Lisa, please ensure Node.js is installed and run:"
31
- echo " cd $LISA_DIR && npm install && npm run build"
32
- echo ""
33
- echo "Then run Lisa again:"
34
- echo " $0 $*"
35
- exit 1