@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
@@ -0,0 +1,430 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
6
+ /* eslint-disable max-lines-per-function -- config file needs a lot of lines */
7
+ /**
8
+ * ESLint 9 Flat Config - Shared Base
9
+ *
10
+ * This module exports shared configuration pieces that can be imported by
11
+ * project-specific eslint.config.ts files. This reduces duplication between
12
+ * typescript, expo, nestjs, and other project type configurations.
13
+ * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
14
+ * @module eslint.base
15
+ */
16
+ import eslintComments from "@eslint-community/eslint-plugin-eslint-comments";
17
+ import js from "@eslint/js";
18
+ import functional from "eslint-plugin-functional";
19
+ import jsdoc from "eslint-plugin-jsdoc";
20
+ import prettier from "eslint-plugin-prettier/recommended";
21
+ import sonarjs from "eslint-plugin-sonarjs";
22
+ import globals from "globals";
23
+ import tseslint from "typescript-eslint";
24
+
25
+ const specFilePattern = "**/*spec.ts";
26
+
27
+ /**
28
+ * Default ignore patterns used when not specified in project config.
29
+ * Projects can override via eslint.ignore.config.json.
30
+ */
31
+ export const defaultIgnores = [
32
+ "build/**",
33
+ "dist/**",
34
+ ".build/**",
35
+ ".esbuild/**",
36
+ ".serverless/**",
37
+ ".webpack/**",
38
+ "_warmup/**",
39
+ "node_modules/**",
40
+ "**/node_modules/**",
41
+ "src/graphql/**",
42
+ "src/graphql.ts",
43
+ "src/graphql-generated/**",
44
+ "src/generated/**",
45
+ "graphql/**",
46
+ "graphql-generated/**",
47
+ "generated/**",
48
+ "components/ui/**",
49
+ ".lisabak/**",
50
+ ".claude-active-project/**",
51
+ "coverage/**",
52
+ specFilePattern,
53
+ "resolver-test.setup.ts",
54
+ "**/*.factory.ts",
55
+ "**/test-utils/**",
56
+ "**/test/**",
57
+ "**/database/migrations/**",
58
+ "cypress/**",
59
+ "e2e/**",
60
+ "playwright-report/**",
61
+ ".lighthouseci/**",
62
+ ".expo/**",
63
+ ".github/**",
64
+ "public/**",
65
+ ".dead/**",
66
+ "example/**",
67
+ "tmp/**",
68
+ ".vscode/**",
69
+ "*.config.js",
70
+ "*.config.ts",
71
+ "babel.config.js",
72
+ "metro.config.js",
73
+ "webpack.*.js",
74
+ "*.d.ts",
75
+ "esbuild.plugins.js",
76
+ "projects/**/scripts/**",
77
+ "scripts/**",
78
+ "lib/**/*.js",
79
+ "cdk.out/**",
80
+ ];
81
+
82
+ /**
83
+ * Default thresholds used when not specified in project config.
84
+ * Projects can override via eslint.thresholds.config.json.
85
+ */
86
+ export const defaultThresholds = {
87
+ cognitiveComplexity: 10,
88
+ maxLines: 300,
89
+ maxLinesPerFunction: 75,
90
+ };
91
+
92
+ /**
93
+ * Base ESLint configurations that should be applied to all TypeScript projects.
94
+ * This includes recommended configs from ESLint, TypeScript-ESLint, and plugins.
95
+ * @returns {Array} Array of ESLint flat config objects
96
+ */
97
+ export const getBaseConfigs = () => [
98
+ // Base configurations
99
+ js.configs.recommended,
100
+
101
+ // TypeScript configuration
102
+ ...tseslint.configs.recommended,
103
+
104
+ // Functional programming - manual configuration since v7 requires type info
105
+ {
106
+ plugins: {
107
+ functional,
108
+ },
109
+ },
110
+
111
+ // Code quality
112
+ sonarjs.configs.recommended,
113
+ {
114
+ plugins: {
115
+ "@eslint-community/eslint-comments": eslintComments,
116
+ },
117
+ rules: {
118
+ ...eslintComments.configs.recommended.rules,
119
+ },
120
+ },
121
+
122
+ // Documentation
123
+ jsdoc.configs["flat/recommended-typescript-flavor"],
124
+
125
+ // Prettier (must be last of shared configs)
126
+ prettier,
127
+ ];
128
+
129
+ /**
130
+ * Shared rules that apply to all TypeScript projects.
131
+ * These are rules that should be identical across typescript, expo, nestjs, etc.
132
+ * @param {object} thresholds - Threshold values for configurable rules
133
+ * @param {number} thresholds.cognitiveComplexity - Max cognitive complexity
134
+ * @param {number} thresholds.maxLines - Max lines per file
135
+ * @param {number} thresholds.maxLinesPerFunction - Max lines per function
136
+ * @returns {object} Rules configuration object
137
+ */
138
+ export const getSharedRules = (thresholds: typeof defaultThresholds) => ({
139
+ // Prettier: Disabled because running Prettier inside ESLint is redundant and slower.
140
+ // We use `format:check` from package.json for formatting validation and editor Prettier integration.
141
+ // The eslint-config-prettier (imported above) still disables conflicting ESLint rules.
142
+ // @see https://prettier.io/docs/en/integrating-with-linters.html
143
+ "prettier/prettier": "off",
144
+
145
+ // Import rules
146
+ "no-restricted-imports": [
147
+ "warn",
148
+ {
149
+ patterns: ["@/features/*/*"],
150
+ },
151
+ ],
152
+
153
+ // File size - threshold loaded from eslint.thresholds.config.json
154
+ "max-lines": [
155
+ "error",
156
+ {
157
+ max: thresholds.maxLines,
158
+ skipBlankLines: true,
159
+ skipComments: true,
160
+ },
161
+ ],
162
+ "max-lines-per-function": [
163
+ "error",
164
+ {
165
+ max: thresholds.maxLinesPerFunction,
166
+ skipBlankLines: true,
167
+ skipComments: true,
168
+ },
169
+ ],
170
+
171
+ // Folder naming
172
+ // NOTE: eslint-plugin-folders is not compatible with ESLint 9 flat config
173
+ // The rule has no schema defined and ESLint 9 validates rule options strictly
174
+ // This needs to be addressed in a separate PR or the plugin needs to be updated
175
+ // "folders/match-regex": ["error", "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$", "/src/"],
176
+
177
+ // SonarJS rules - threshold loaded from eslint.thresholds.config.json
178
+ "sonarjs/cognitive-complexity": ["error", thresholds.cognitiveComplexity],
179
+ "sonarjs/no-identical-functions": "error",
180
+ "sonarjs/no-duplicate-string": "error",
181
+ "sonarjs/no-nested-functions": "error",
182
+ "sonarjs/no-nested-template-literals": "warn",
183
+ "sonarjs/prefer-immediate-return": "warn",
184
+ "sonarjs/prefer-single-boolean-return": "warn",
185
+ "sonarjs/no-collapsible-if": "warn",
186
+ "sonarjs/pseudo-random": "error",
187
+ "sonarjs/no-clear-text-protocols": "error",
188
+ "sonarjs/prefer-read-only-props": "error",
189
+ "sonarjs/no-empty-test-file": "warn",
190
+ "sonarjs/no-nested-conditional": "off",
191
+ "sonarjs/no-commented-code": "warn",
192
+ "sonarjs/no-ignored-exceptions": "warn",
193
+ "sonarjs/todo-tag": "warn",
194
+ // Next takes forever and doesn't provide much value
195
+ "sonarjs/deprecation": "off",
196
+ // Next takes forever and doesn't provide value
197
+ "sonarjs/aws-restricted-ip-admin-access": "off",
198
+ // This gives too many false positives
199
+ "sonarjs/no-hardcoded-ip": "off",
200
+ // This just seems to be wrong and gives all kinds of false positives
201
+ "sonarjs/different-types-comparison": "off",
202
+ // This duplicates another lint check
203
+ "sonarjs/no-unused-vars": "off",
204
+
205
+ // ESLint comments
206
+ "@eslint-community/eslint-comments/require-description": "error",
207
+ "@eslint-community/eslint-comments/disable-enable-pair": "error",
208
+ "@eslint-community/eslint-comments/no-unlimited-disable": "error",
209
+
210
+ // General rules
211
+ "no-extra-boolean-cast": "off",
212
+ "prefer-const": "error",
213
+ "no-param-reassign": "error",
214
+ "no-var": "error",
215
+ "brace-style": "error",
216
+ "prefer-template": "error",
217
+ radix: "error",
218
+ "space-before-blocks": "error",
219
+ "no-unused-vars": "off",
220
+
221
+ // TypeScript rules
222
+ "@typescript-eslint/no-explicit-any": "error",
223
+ "@typescript-eslint/no-unused-vars": [
224
+ "error",
225
+ {
226
+ argsIgnorePattern: "^_",
227
+ varsIgnorePattern: "^_|^unstable_settings$|^React$",
228
+ caughtErrorsIgnorePattern: "^_",
229
+ },
230
+ ],
231
+ // New rules in typescript-eslint v8 - disabled temporarily
232
+ "@typescript-eslint/no-require-imports": "off",
233
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
234
+ "@typescript-eslint/ban-ts-comment": "off",
235
+ "@typescript-eslint/prefer-as-const": "off",
236
+ "@typescript-eslint/no-empty-object-type": "off",
237
+ "@typescript-eslint/no-unused-expressions": "off",
238
+ "@typescript-eslint/no-unsafe-function-type": "off",
239
+
240
+ // Functional rules - configured to avoid type-checking requirements
241
+ // Rules that require type info are disabled
242
+ "functional/no-mixed-types": "off",
243
+ "functional/functional-parameters": "off",
244
+ "functional/prefer-immutable-types": "off",
245
+ "functional/no-expression-statements": "off",
246
+ "functional/no-conditional-statements": "off",
247
+ "functional/prefer-property-signatures": "off",
248
+ "functional/no-return-void": "off",
249
+ "functional/no-throw-statements": "off",
250
+ "functional/prefer-readonly-type": "off",
251
+ "functional/prefer-tacit": "off",
252
+ "functional/readonly-type": "off",
253
+ "functional/type-declaration-immutability": "off",
254
+ // Rules we want - these work without type info
255
+ // NOTE: functional/immutable-data requires type info - enabled in TypeScript file config below
256
+ "functional/immutable-data": "off",
257
+ "functional/no-let": "error",
258
+
259
+ // JSDoc rules
260
+ "jsdoc/require-jsdoc": [
261
+ "error",
262
+ {
263
+ require: {
264
+ FunctionDeclaration: true,
265
+ MethodDefinition: true,
266
+ ClassDeclaration: true,
267
+ ArrowFunctionExpression: false,
268
+ FunctionExpression: false,
269
+ },
270
+ contexts: [
271
+ "TSInterfaceDeclaration",
272
+ "TSTypeAliasDeclaration",
273
+ "VariableDeclaration[declarations.0.init.type='ArrowFunctionExpression']:has([id.name=/^[A-Z]/])",
274
+ ],
275
+ },
276
+ ],
277
+ "jsdoc/require-description": "error",
278
+ "jsdoc/require-param": "error",
279
+ "jsdoc/require-returns": "error",
280
+ "jsdoc/require-param-description": "error",
281
+ "jsdoc/require-returns-description": "error",
282
+ "jsdoc/require-property-description": "error",
283
+ "jsdoc/check-tag-names": [
284
+ "error",
285
+ { definedTags: ["remarks", "precondition", "entity", "security"] },
286
+ ],
287
+ "jsdoc/no-types": "off",
288
+ "jsdoc/require-param-type": "off",
289
+ "jsdoc/require-returns-type": "off",
290
+ "jsdoc/require-property-type": "off",
291
+ });
292
+
293
+ /**
294
+ * Base language options for all files.
295
+ * @returns {object} Language options configuration
296
+ */
297
+ export const getBaseLanguageOptions = () => ({
298
+ globals: {
299
+ ...globals.browser,
300
+ ...globals.node,
301
+ ...globals.es2021,
302
+ },
303
+ parserOptions: {
304
+ ecmaVersion: 2021,
305
+ sourceType: "module",
306
+ },
307
+ });
308
+
309
+ /**
310
+ * JavaScript files override - relaxes certain rules for JS files.
311
+ * @returns {object} ESLint flat config object for JS files
312
+ */
313
+ export const getJsFilesOverride = () => ({
314
+ files: ["**/*.js", "**/*.mjs"],
315
+ rules: {
316
+ "sonarjs/cognitive-complexity": "off",
317
+ "@typescript-eslint/no-require-imports": "off", // CommonJS files
318
+ "max-lines-per-function": "off",
319
+ },
320
+ });
321
+
322
+ /**
323
+ * Shared hooks and components override - relaxes import restrictions.
324
+ * @returns {object} ESLint flat config object for shared files
325
+ */
326
+ export const getSharedFilesOverride = () => ({
327
+ files: ["hooks/shared/**/*", "components/shared/**/*"],
328
+ rules: {
329
+ "no-restricted-imports": "off",
330
+ },
331
+ });
332
+
333
+ /**
334
+ * Test files override - configures Jest globals and relaxes rules for tests.
335
+ * @param additionalPatterns - Additional file patterns to include
336
+ * @returns {object} ESLint flat config object for test files
337
+ */
338
+ export const getTestFilesOverride = (additionalPatterns: string[] = []) => ({
339
+ files: [
340
+ "**/*.test.js",
341
+ "**/*.test.ts",
342
+ "**/*spec.js",
343
+ specFilePattern,
344
+ "jest.setup.js",
345
+ "jest.setup.ts",
346
+ "jest.setup.pre.js",
347
+ "**/__tests__/*",
348
+ "**/test/**",
349
+ ...additionalPatterns,
350
+ ],
351
+ languageOptions: {
352
+ globals: {
353
+ ...globals.jest,
354
+ },
355
+ },
356
+ rules: {
357
+ "@typescript-eslint/no-explicit-any": "off",
358
+ // Tests often need to mutate state for mocks, setup, and assertions
359
+ "functional/immutable-data": "off",
360
+ // Tests often need let for setup/teardown and incrementing counters
361
+ "functional/no-let": "off",
362
+ // Tests need to manipulate process.env for environment setup
363
+ "no-restricted-syntax": "off",
364
+ // Tests can be longer than typical functions
365
+ "max-lines-per-function": "off",
366
+ },
367
+ });
368
+
369
+ /**
370
+ * TypeScript files override - enables type-checked linting.
371
+ * @param filePatterns - File patterns to match
372
+ * @param tsconfigRootDir - Root directory for tsconfig.json (pass __dirname from calling module)
373
+ * @returns {object} ESLint flat config object for TypeScript files
374
+ */
375
+ export const getTsFilesOverride = (
376
+ filePatterns: string[] = ["**/*.ts"],
377
+ tsconfigRootDir: string
378
+ ) => ({
379
+ files: filePatterns,
380
+ languageOptions: {
381
+ parserOptions: {
382
+ project: "tsconfig.eslint.json",
383
+ tsconfigRootDir,
384
+ },
385
+ },
386
+ rules: {
387
+ // Enable immutable-data rule now that type-checking is available
388
+ "functional/immutable-data": [
389
+ "error",
390
+ {
391
+ ignoreClasses: true,
392
+ ignoreImmediateMutation: true,
393
+ ignoreNonConstDeclarations: {
394
+ treatParametersAsConst: true,
395
+ },
396
+ ignoreAccessorPattern: ["*.displayName", "*.current", "*.value"],
397
+ },
398
+ ],
399
+ },
400
+ });
401
+
402
+ /**
403
+ * TypeScript test files override - must come after TypeScript config.
404
+ * @param filePatterns - File patterns for test files
405
+ * @returns {object} ESLint flat config object for TypeScript test files
406
+ */
407
+ export const getTsTestFilesOverride = (
408
+ filePatterns: string[] = ["**/*.test.ts", specFilePattern]
409
+ ) => ({
410
+ files: filePatterns,
411
+ rules: {
412
+ // Tests often need to mutate state for mocks, setup, and assertions
413
+ "functional/immutable-data": "off",
414
+ // Tests can be longer than typical functions
415
+ "max-lines-per-function": "off",
416
+ },
417
+ });
418
+
419
+ // Re-export plugins and configs for use in project-specific configs
420
+ export {
421
+ eslintComments,
422
+ functional,
423
+ globals,
424
+ js,
425
+ jsdoc,
426
+ prettier,
427
+ sonarjs,
428
+ tseslint,
429
+ };
430
+ /* eslint-enable max-lines-per-function -- config file needs a lot of lines */
@@ -0,0 +1,52 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
6
+ /**
7
+ * ESLint 9 Flat Config - Main Entry Point
8
+ *
9
+ * This file imports the stack-specific configuration and project-local customizations.
10
+ * Do not modify this file directly - use eslint.config.local.ts for project-specific rules.
11
+ *
12
+ * Inheritance chain:
13
+ * eslint.config.ts (this file)
14
+ * └── eslint.typescript.ts (or eslint.expo.ts, eslint.nestjs.ts, etc.)
15
+ * └── eslint.base.ts (shared utilities)
16
+ *
17
+ * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
18
+ * @module eslint.config
19
+ */
20
+ import path from "path";
21
+ import { fileURLToPath } from "url";
22
+
23
+ import {
24
+ defaultIgnores,
25
+ defaultThresholds,
26
+ getTypescriptConfig,
27
+ } from "./eslint.typescript";
28
+
29
+ // Project-specific configuration loaded from JSON files
30
+ import ignoreConfig from "./eslint.ignore.config.json" with { type: "json" };
31
+ import thresholdsConfig from "./eslint.thresholds.json" with { type: "json" };
32
+
33
+ // Project-local customizations (create-only - safe to modify)
34
+ import localConfig from "./eslint.config.local.ts";
35
+
36
+ const __filename = fileURLToPath(import.meta.url);
37
+ const __dirname = path.dirname(__filename);
38
+
39
+ const ignorePatterns = ignoreConfig.ignores || defaultIgnores;
40
+ const thresholds = { ...defaultThresholds, ...thresholdsConfig };
41
+
42
+ export default [
43
+ // Stack-specific configuration (TypeScript)
44
+ ...getTypescriptConfig({
45
+ tsconfigRootDir: __dirname,
46
+ ignorePatterns,
47
+ thresholds,
48
+ }),
49
+
50
+ // Project-local customizations
51
+ ...localConfig,
52
+ ];
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "ignores": [
3
+ "sgconfig.yml",
3
4
  "build/**",
4
5
  "dist/**",
5
6
  ".build/**",
@@ -20,6 +21,16 @@
20
21
  "generated/**",
21
22
  "components/ui/**",
22
23
 
24
+ "**/k6/**/*.js",
25
+
26
+ "ios",
27
+ "android",
28
+
29
+ ".beads",
30
+ ".maestro",
31
+
32
+ ".lisabak/**",
33
+ ".claude-active-project/**",
23
34
  "coverage/**",
24
35
  "**/*spec.ts",
25
36
  "resolver-test.setup.ts",
@@ -40,8 +51,14 @@
40
51
  "tmp/**",
41
52
  ".vscode/**",
42
53
 
43
- "*.config.js",
44
- "*.config.mjs",
54
+ "**/lighthouserc.js",
55
+
56
+ "**/*.md",
57
+
58
+ "**/__fixtures__/**",
59
+
60
+ "**/*.config.js",
61
+ "**/*.config.mjs",
45
62
  "babel.config.js",
46
63
  "metro.config.js",
47
64
  "webpack.*.js",
@@ -0,0 +1,69 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
6
+ /**
7
+ * ESLint 9 Flat Config - Slow Rules Only
8
+ *
9
+ * This configuration runs ONLY slow linting rules that are disabled in the
10
+ * main eslint.config.ts for performance. Run this periodically via `lint:slow`
11
+ * rather than on every lint pass.
12
+ *
13
+ * Rules included:
14
+ * - import/namespace - Type checks all namespace imports (slow)
15
+ * - import/no-cycle - Detects circular dependencies (very slow)
16
+ *
17
+ * @see https://github.com/import-js/eslint-plugin-import
18
+ * @module eslint.slow.config
19
+ */
20
+ import importPlugin from "eslint-plugin-import";
21
+ import sonarjsPlugin from "eslint-plugin-sonarjs";
22
+ import tseslint from "typescript-eslint";
23
+
24
+ import ignoreConfig from "./eslint.ignore.config.json" with { type: "json" };
25
+
26
+ const ignorePatterns = ignoreConfig.ignores || [];
27
+
28
+ // Get the TypeScript flat config from the import plugin
29
+ const importTypescriptConfig = importPlugin.flatConfigs.typescript;
30
+
31
+ export default [
32
+ // Use same ignores as main config, plus ignore all non-TS files
33
+ // This prevents errors from inline eslint directives in JS files
34
+ // that reference rules not loaded in this minimal config
35
+ {
36
+ ignores: [...ignorePatterns, "**/*.js", "**/*.mjs", "**/*.cjs", "**/*.jsx"],
37
+ },
38
+
39
+ // TypeScript files - slow import rules only
40
+ {
41
+ files: ["**/*.ts", "**/*.tsx"],
42
+ languageOptions: {
43
+ parser: tseslint.parser,
44
+ parserOptions: {
45
+ project: "tsconfig.eslint.json",
46
+ },
47
+ },
48
+ plugins: {
49
+ ...(importTypescriptConfig?.plugins ?? {}),
50
+ sonarjs: sonarjsPlugin,
51
+ },
52
+ settings: {
53
+ ...(importTypescriptConfig?.settings ?? {}),
54
+ "import/resolver": {
55
+ ...((importTypescriptConfig?.settings?.["import/resolver"] as Record<
56
+ string,
57
+ unknown
58
+ >) ?? {}),
59
+ typescript: true,
60
+ },
61
+ },
62
+ rules: {
63
+ // ONLY slow rules - everything else runs in the main config
64
+ "import/namespace": "error",
65
+ "import/no-cycle": "error",
66
+ "sonarjs/deprecation": "error",
67
+ },
68
+ },
69
+ ];