@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,142 @@
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 - TypeScript Stack
8
+ *
9
+ * This configuration provides TypeScript-specific rules and settings.
10
+ * It imports shared utilities from eslint.base.ts.
11
+ * Stack-specific configs (expo, nestjs, cdk) should import and extend this.
12
+ *
13
+ * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
14
+ * @module eslint.typescript
15
+ */
16
+ import { createRequire } from "module";
17
+ import path from "path";
18
+ import { fileURLToPath } from "url";
19
+
20
+ // Import shared base configuration
21
+ import {
22
+ defaultIgnores,
23
+ defaultThresholds,
24
+ getBaseConfigs,
25
+ getBaseLanguageOptions,
26
+ getJsFilesOverride,
27
+ getSharedFilesOverride,
28
+ getSharedRules,
29
+ getTestFilesOverride,
30
+ getTsFilesOverride,
31
+ getTsTestFilesOverride,
32
+ } from "./eslint.base";
33
+
34
+ // Re-export base utilities for stack-specific configs to use
35
+ export {
36
+ defaultIgnores,
37
+ defaultThresholds,
38
+ getBaseConfigs,
39
+ getBaseLanguageOptions,
40
+ getJsFilesOverride,
41
+ getSharedFilesOverride,
42
+ getSharedRules,
43
+ getTestFilesOverride,
44
+ getTsFilesOverride,
45
+ getTsTestFilesOverride,
46
+ };
47
+
48
+ // Custom plugins (CommonJS - use createRequire)
49
+ const require = createRequire(import.meta.url);
50
+ const codeOrganization = require("./eslint-plugin-code-organization/index.js");
51
+
52
+ // Re-export plugin for stack-specific configs
53
+ export { codeOrganization };
54
+
55
+ /**
56
+ * Creates the TypeScript ESLint configuration.
57
+ *
58
+ * @param {object} options - Configuration options
59
+ * @param {string} options.tsconfigRootDir - Root directory for tsconfig.json
60
+ * @param {string[]} [options.ignorePatterns] - Patterns to ignore
61
+ * @param {object} [options.thresholds] - Threshold overrides
62
+ * @returns {Array} ESLint flat config array
63
+ */
64
+ export function getTypescriptConfig({
65
+ tsconfigRootDir,
66
+ ignorePatterns = defaultIgnores,
67
+ thresholds = defaultThresholds,
68
+ }: {
69
+ tsconfigRootDir: string;
70
+ ignorePatterns?: string[];
71
+ thresholds?: typeof defaultThresholds;
72
+ }) {
73
+ return [
74
+ // Global ignores
75
+ {
76
+ ignores: ignorePatterns,
77
+ },
78
+
79
+ // Base configurations from shared module
80
+ ...getBaseConfigs(),
81
+
82
+ // Base configuration for all files
83
+ {
84
+ languageOptions: getBaseLanguageOptions(),
85
+ plugins: {
86
+ "code-organization": codeOrganization,
87
+ },
88
+ rules: {
89
+ // Shared rules from base
90
+ ...getSharedRules(thresholds),
91
+
92
+ // Code organization
93
+ "code-organization/enforce-statement-order": "error",
94
+
95
+ // Configuration enforcement - prevent direct process.env access
96
+ // All configuration should go through ConfigService or getStandaloneConfig()
97
+ // @see .claude/rules/PROJECT_RULES.md
98
+ "no-restricted-syntax": [
99
+ "error",
100
+ {
101
+ selector:
102
+ "MemberExpression[object.name='process'][property.name='env']",
103
+ message:
104
+ "Direct process.env access is forbidden. Use ConfigService (in NestJS context) or getStandaloneConfig() (in Lambda handlers). See .claude/rules/PROJECT_RULES.md.",
105
+ },
106
+ ],
107
+
108
+ // Disabled: NestJS relies heavily on classes for modules, controllers, services, etc.
109
+ "functional/no-classes": "off",
110
+ },
111
+ },
112
+
113
+ // JavaScript files override
114
+ getJsFilesOverride(),
115
+
116
+ // Shared hooks and components
117
+ getSharedFilesOverride(),
118
+
119
+ // Test files and Jest setup
120
+ getTestFilesOverride(),
121
+
122
+ // TypeScript files - enable type-checked linting
123
+ getTsFilesOverride(["**/*.ts"], tsconfigRootDir),
124
+
125
+ // TypeScript test files - disable immutable-data (must come after TypeScript config)
126
+ getTsTestFilesOverride(["**/*.test.ts", "**/*.spec.ts"]),
127
+
128
+ // Configuration files - allowed to use process.env directly
129
+ {
130
+ files: ["**/*config.*"],
131
+ rules: {
132
+ "no-restricted-syntax": "off",
133
+ },
134
+ },
135
+ ];
136
+ }
137
+
138
+ // Default export for simple usage
139
+ const __filename = fileURLToPath(import.meta.url);
140
+ const __dirname = path.dirname(__filename);
141
+
142
+ export default getTypescriptConfig({ tsconfigRootDir: __dirname });
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://unpkg.com/knip@5/schema.json",
3
+ "entry": ["src/**/*.ts"],
4
+ "project": ["src/**/*.ts"],
5
+ "ignore": [
6
+ "**/*.test.ts",
7
+ "**/*.spec.ts",
8
+ "**/__tests__/**",
9
+ "**/__mocks__/**",
10
+ "**/tests/**",
11
+ "**/test/**",
12
+ "**/dist/**",
13
+ "**/build/**",
14
+ "**/coverage/**",
15
+ "**/node_modules/**"
16
+ ],
17
+ "ignoreDependencies": [
18
+ "jscodeshift",
19
+ "commitizen",
20
+ "eslint-*",
21
+ "lint-staged",
22
+ "@commitlint/*",
23
+ "@as-integrations/express5",
24
+ "@aws-sdk/client-apigatewaymanagementapi",
25
+ "@nestjs/terminus",
26
+ "aws-xray-sdk-core",
27
+ "graphql-query-complexity",
28
+ "graphql-subscriptions",
29
+ "graphql-ws",
30
+ "@aws-sdk/client-appconfig",
31
+ "@aws-sdk/client-cloudwatch",
32
+ "@aws-sdk/client-dynamodb",
33
+ "@aws-sdk/client-lambda",
34
+ "@aws-sdk/lib-dynamodb",
35
+ "@nestjs/axios",
36
+ "@sentry/profiling-node",
37
+ "csv-parse",
38
+ "graphql-scalars",
39
+ "@graphql-codegen/*",
40
+ "@nestjs/cli",
41
+ "@istanbuljs/nyc-config-typescript",
42
+ "@jest/test-sequencer",
43
+ "serverless-*",
44
+ "@types/fs-extra",
45
+ "@types/lodash.merge",
46
+ "@vitest/coverage-v8",
47
+ "memfs",
48
+ "vitest",
49
+ "@types/graphql-type-json",
50
+ "@types/snowflake-sdk",
51
+ "dotenv-cli",
52
+ "esbuild",
53
+ "esbuild-plugin-tsc",
54
+ "npm-check",
55
+ "source-map-support",
56
+ "ts-loader",
57
+ "tslint",
58
+ "lodash",
59
+ "cache-manager",
60
+ "@jest/globals"
61
+ ],
62
+ "ignoreBinaries": ["expo", "playwright", "audit", "docker", "eval"],
63
+ "ignoreExportsUsedInFile": true
64
+ }
@@ -0,0 +1,11 @@
1
+ # This file is managed by Lisa.
2
+ # Do not edit directly — changes will be overwritten on the next `lisa` run.
3
+
4
+ # ast-grep configuration
5
+ # See: https://ast-grep.github.io/reference/sgconfig.html
6
+ ruleDirs:
7
+ - ast-grep/rules
8
+ testConfigs:
9
+ - testDir: ast-grep/rule-tests
10
+ utilDirs:
11
+ - ast-grep/utils
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "noEmit": true
6
+ },
7
+ "include": ["src/**/*", "tests/**/*", "test/**/*", "*.config.ts", "eslint.*.ts"],
8
+ "exclude": ["node_modules", "dist", "build"]
9
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * ESLint 9 Flat Config - Project-Local Customizations
3
+ *
4
+ * Add project-specific ESLint rules here. This file is create-only,
5
+ * meaning Lisa will create it but never overwrite your customizations.
6
+ *
7
+ * Example:
8
+ * ```ts
9
+ * export default [
10
+ * {
11
+ * files: ["src/legacy/**"],
12
+ * rules: {
13
+ * "@typescript-eslint/no-explicit-any": "off",
14
+ * },
15
+ * },
16
+ * ];
17
+ * ```
18
+ *
19
+ * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
20
+ * @module eslint.config.local
21
+ */
22
+ export default [
23
+ // Add project-specific rules here
24
+ ];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "cognitiveComplexity": 10,
3
3
  "maxLines": 300,
4
- "maxLinesView": 300
4
+ "maxLinesPerFunction": 75
5
5
  }
@@ -1,9 +1,6 @@
1
1
  {
2
- "id": 11725285,
3
2
  "name": "base",
4
3
  "target": "branch",
5
- "source_type": "Repository",
6
- "source": "gunnertech/thumbwar-backend",
7
4
  "enforcement": "active",
8
5
  "conditions": {
9
6
  "ref_name": {
@@ -11,7 +8,6 @@
11
8
  "include": [
12
9
  "~DEFAULT_BRANCH",
13
10
  "refs/heads/dev",
14
- "refs/heads/main",
15
11
  "refs/heads/staging"
16
12
  ]
17
13
  }
@@ -23,84 +19,15 @@
23
19
  {
24
20
  "type": "non_fast_forward"
25
21
  },
26
- {
27
- "type": "code_quality",
28
- "parameters": {
29
- "severity": "warnings"
30
- }
31
- },
32
22
  {
33
23
  "type": "pull_request",
34
24
  "parameters": {
35
25
  "required_approving_review_count": 0,
36
26
  "dismiss_stale_reviews_on_push": false,
37
- "required_reviewers": [],
38
27
  "require_code_owner_review": false,
39
28
  "require_last_push_approval": false,
40
- "required_review_thread_resolution": true,
41
- "allowed_merge_methods": [
42
- "merge",
43
- "squash",
44
- "rebase"
45
- ]
46
- }
47
- },
48
- {
49
- "type": "required_status_checks",
50
- "parameters": {
51
- "strict_required_status_checks_policy": true,
52
- "do_not_enforce_on_create": true,
53
- "required_status_checks": [
54
- {
55
- "context": "GitGuardian Security Checks",
56
- "integration_id": 46505
57
- },
58
- {
59
- "context": "CodeRabbit",
60
- "integration_id": 347564
61
- },
62
- {
63
- "context": "🔍 Quality Checks / 🧪 Run Unit Tests",
64
- "integration_id": 15368
65
- },
66
- {
67
- "context": "🔍 Quality Checks / 🧪 Run Integration Tests",
68
- "integration_id": 15368
69
- },
70
- {
71
- "context": "🔍 Quality Checks / 🔍 Type Check",
72
- "integration_id": 15368
73
- },
74
- {
75
- "context": "🔍 Quality Checks / 🏗️ Build",
76
- "integration_id": 15368
77
- },
78
- {
79
- "context": "🔍 Quality Checks / 📐 Check Formatting",
80
- "integration_id": 15368
81
- },
82
- {
83
- "context": "🔍 Quality Checks / 🧹 Lint",
84
- "integration_id": 15368
85
- },
86
- {
87
- "context": "🔍 Quality Checks / 🔒 Security Scan",
88
- "integration_id": 15368
89
- }
90
- ]
29
+ "required_review_thread_resolution": true
91
30
  }
92
31
  }
93
- ],
94
- "bypass_actors": [
95
- {
96
- "actor_id": null,
97
- "actor_type": "DeployKey",
98
- "bypass_mode": "always"
99
- },
100
- {
101
- "actor_id": null,
102
- "actor_type": "OrganizationAdmin",
103
- "bypass_mode": "always"
104
- }
105
32
  ]
106
- }
33
+ }
@@ -10,6 +10,52 @@
10
10
  "timeout": 480
11
11
  }
12
12
  ]
13
+ },
14
+ {
15
+ "matcher": "",
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
20
+ "timeout": 5
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "SessionEnd": [
26
+ {
27
+ "matcher": "",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
32
+ "timeout": 5
33
+ }
34
+ ]
35
+ }
36
+ ],
37
+ "Setup": [
38
+ {
39
+ "matcher": "",
40
+ "hooks": [
41
+ {
42
+ "type": "command",
43
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
44
+ "timeout": 5
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ "PreToolUse": [
50
+ {
51
+ "matcher": "",
52
+ "hooks": [
53
+ {
54
+ "type": "command",
55
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
56
+ "timeout": 5
57
+ }
58
+ ]
13
59
  }
14
60
  ],
15
61
  "PostToolUse": [
@@ -20,9 +66,123 @@
20
66
  "type": "command",
21
67
  "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-on-edit.sh",
22
68
  "timeout": 10
69
+ },
70
+ {
71
+ "type": "command",
72
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/sg-scan-on-edit.sh",
73
+ "timeout": 30
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "matcher": "",
79
+ "hooks": [
80
+ {
81
+ "type": "command",
82
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
83
+ "timeout": 5
84
+ }
85
+ ]
86
+ }
87
+ ],
88
+ "PostToolUseFailure": [
89
+ {
90
+ "matcher": "",
91
+ "hooks": [
92
+ {
93
+ "type": "command",
94
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
95
+ "timeout": 5
96
+ }
97
+ ]
98
+ }
99
+ ],
100
+ "PermissionRequest": [
101
+ {
102
+ "matcher": "",
103
+ "hooks": [
104
+ {
105
+ "type": "command",
106
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
107
+ "timeout": 5
108
+ }
109
+ ]
110
+ }
111
+ ],
112
+ "SubagentStart": [
113
+ {
114
+ "matcher": "",
115
+ "hooks": [
116
+ {
117
+ "type": "command",
118
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
119
+ "timeout": 5
120
+ }
121
+ ]
122
+ }
123
+ ],
124
+ "SubagentStop": [
125
+ {
126
+ "matcher": "",
127
+ "hooks": [
128
+ {
129
+ "type": "command",
130
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
131
+ "timeout": 5
132
+ }
133
+ ]
134
+ }
135
+ ],
136
+ "Stop": [
137
+ {
138
+ "matcher": "",
139
+ "hooks": [
140
+ {
141
+ "type": "command",
142
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
143
+ "timeout": 5
144
+ }
145
+ ]
146
+ }
147
+ ],
148
+ "UserPromptSubmit": [
149
+ {
150
+ "matcher": "",
151
+ "hooks": [
152
+ {
153
+ "type": "command",
154
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
155
+ "timeout": 5
156
+ }
157
+ ]
158
+ }
159
+ ],
160
+ "Notification": [
161
+ {
162
+ "matcher": "",
163
+ "hooks": [
164
+ {
165
+ "type": "command",
166
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
167
+ "timeout": 5
168
+ }
169
+ ]
170
+ }
171
+ ],
172
+ "PreCompact": [
173
+ {
174
+ "matcher": "",
175
+ "hooks": [
176
+ {
177
+ "type": "command",
178
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/debug-hook.sh",
179
+ "timeout": 5
23
180
  }
24
181
  ]
25
182
  }
26
183
  ]
184
+ },
185
+ "env": {
186
+ "CLAUDE_DEBUG": "0"
27
187
  }
28
188
  }
@@ -1,38 +1,22 @@
1
1
  {
2
- "lint-staged": {
3
- "*.{js,ts,tsx}": [
4
- "eslint --quiet --cache --fix"
5
- ],
6
- "*.{js,ts,jsx,tsx,html,css,scss,yaml,yml,graphql}": [
7
- "prettier --write"
8
- ]
9
- },
10
- "engines": {
11
- "npm": "please-use-bun",
12
- "yarn": "please-use-bun",
13
- "bun": ">= 1.3.5",
14
- "node": "22.21.1"
15
- },
16
- "config": {
17
- "commitizen": {
18
- "path": "./node_modules/cz-conventional-changelog"
19
- }
20
- },
21
2
  "scripts": {
22
3
  "//docs": "The following commands MUST be defined for CI/CD to work properly - even if they're no-ops.",
23
4
  "lint": "eslint . --quiet",
24
5
  "lint:fix": "eslint . --fix",
25
- "build": "tsc --noEmit",
26
- "test": "NODE_ENV=test jest --passWithNoTests",
27
- "test:unit": "NODE_ENV=test jest --testPathIgnorePatterns=\"\\.integration\\.test\\.(ts|tsx)$\" --passWithNoTests",
28
- "test:integration": "NODE_ENV=test jest --testPathPatterns=\"\\.integration\\.test\\.(ts|tsx)$\" --passWithNoTests",
29
- "test:cov": "NODE_ENV=test jest --coverage",
6
+ "lint:slow": "eslint . --config eslint.slow.config.ts --quiet",
7
+ "build": "tsc",
30
8
  "types:check": "tsc --noEmit",
31
9
  "typecheck": "tsc --noEmit",
32
10
  "format:check": "prettier --check .",
33
11
  "format": "prettier --check . --write",
34
- "prepare": "node -e \"if (process.env.INIT_CWD && process.env.INIT_CWD.includes('.serverless')) { process.exit(0); }\" && husky install || true",
35
- "//end-docs": ""
12
+ "prepare": "npm run build",
13
+ "//end-docs": "",
14
+ "start": "node dist/index.js",
15
+ "dev": "tsx src/index.ts",
16
+ "update-node-version": "tsx scripts/update-node-version.ts",
17
+ "knip": "knip",
18
+ "knip:fix": "knip --fix",
19
+ "sg:scan": "ast-grep scan"
36
20
  },
37
21
  "devDependencies": {
38
22
  "@commitlint/cli": "^20.3.1",
@@ -40,32 +24,49 @@
40
24
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
41
25
  "@eslint/eslintrc": "^3.2.0",
42
26
  "@eslint/js": "^9.39.0",
43
- "@istanbuljs/nyc-config-typescript": "^1.0.2",
44
- "@jest/test-sequencer": "^30.2.0",
45
- "@types/jest": "^30.0.0",
46
27
  "commitizen": "^4.3.0",
47
28
  "cz-conventional-changelog": "^3.3.0",
48
29
  "eslint": "^9.39.0",
49
30
  "eslint-config-prettier": "^10.0.0",
31
+ "eslint-import-resolver-typescript": "^4.4.4",
50
32
  "eslint-plugin-code-organization": "file:./eslint-plugin-code-organization",
33
+ "eslint-plugin-import": "^2.32.0",
51
34
  "eslint-plugin-functional": "^9.0.0",
35
+ "jiti": "^2.4.0",
52
36
  "eslint-plugin-jsdoc": "^61.5.0",
53
37
  "eslint-plugin-prettier": "^5.5.0",
54
38
  "eslint-plugin-sonarjs": "^3.0.0",
55
39
  "husky": "^8.0.0",
56
- "jest": "^30.0.0",
57
40
  "jscodeshift": "0.15.2",
58
41
  "lint-staged": "^16.2.7",
59
42
  "prettier": "^3.3.3",
60
43
  "standard-version": "^9.5.0",
61
- "ts-jest": "^29.4.6",
62
44
  "ts-morph": "^27.0.2",
63
45
  "ts-node": "^10.9.2",
64
- "typescript": "~5.9.2",
65
- "typescript-eslint": "^8.0.0"
46
+ "typescript": "~5.7.0",
47
+ "typescript-eslint": "^8.0.0",
48
+ "@types/fs-extra": "^11.0.0",
49
+ "@types/lodash.merge": "^4.6.0",
50
+ "@types/node": "^22.0.0",
51
+ "tsx": "^4.0.0",
52
+ "knip": "^5.0.0",
53
+ "@ast-grep/cli": "^0.40.4"
54
+ },
55
+ "engines": {
56
+ "npm": "please-use-bun",
57
+ "yarn": "please-use-bun",
58
+ "pnpm": "please-use-bun",
59
+ "bun": ">= 1.3.5",
60
+ "node": "22.21.1"
61
+ },
62
+ "config": {
63
+ "commitizen": {
64
+ "path": "./node_modules/cz-conventional-changelog"
65
+ }
66
66
  },
67
67
  "resolutions": {},
68
68
  "trustedDependencies": [
69
- "@sentry/cli"
69
+ "@sentry/cli",
70
+ "@ast-grep/cli"
70
71
  ]
71
72
  }