@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,390 +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 prettier from "eslint-plugin-prettier/recommended";
15
- import sonarjs from "eslint-plugin-sonarjs";
16
- import globals from "globals";
17
- import path from "path";
18
- import tseslint from "typescript-eslint";
19
- import { fileURLToPath } from "url";
20
-
21
- // Project-specific configuration loaded from JSON files
22
- // Edit these files to customize for your project; this JS file can be shared unchanged
23
- import ignoreConfig from "./eslint.ignore.config.json" with { type: "json" };
24
- import thresholdsConfig from "./eslint.thresholds.config.json" with { type: "json" };
25
-
26
- const __filename = fileURLToPath(import.meta.url);
27
- const __dirname = path.dirname(__filename);
28
-
29
- /** Default ignore patterns used when not specified in config */
30
- const defaultIgnores = [
31
- "build/**",
32
- "dist/**",
33
- ".build/**",
34
- ".esbuild/**",
35
- ".serverless/**",
36
- ".webpack/**",
37
- "_warmup/**",
38
- "node_modules/**",
39
- "**/node_modules/**",
40
- "src/graphql/**",
41
- "src/graphql.ts",
42
- "src/graphql-generated/**",
43
- "src/generated/**",
44
- "graphql/**",
45
- "graphql-generated/**",
46
- "generated/**",
47
- "components/ui/**",
48
- "coverage/**",
49
- "**/*spec.ts",
50
- "resolver-test.setup.ts",
51
- "**/*.factory.ts",
52
- "**/test-utils/**",
53
- "**/test/**",
54
- "**/database/migrations/**",
55
- "cypress/**",
56
- "e2e/**",
57
- "playwright-report/**",
58
- ".lighthouseci/**",
59
- ".expo/**",
60
- ".github/**",
61
- "public/**",
62
- ".dead/**",
63
- "example/**",
64
- "tmp/**",
65
- ".vscode/**",
66
- "*.config.js",
67
- "*.config.mjs",
68
- "babel.config.js",
69
- "metro.config.js",
70
- "webpack.*.js",
71
- "*.d.ts",
72
- "esbuild.plugins.js",
73
- "projects/**/scripts/**",
74
- "scripts/**",
75
- "lib/**/*.js",
76
- "cdk.out/**",
77
- ];
78
-
79
- /** Default thresholds used when not specified in config */
80
- const defaultThresholds = {
81
- cognitiveComplexity: 10,
82
- maxLines: 300,
83
- };
84
-
85
- const ignorePatterns = ignoreConfig.ignores || defaultIgnores;
86
- const thresholds = { ...defaultThresholds, ...thresholdsConfig };
87
-
88
- // Custom plugins and configs (CommonJS - use createRequire)
89
- import { createRequire } from "module";
90
- const require = createRequire(import.meta.url);
91
-
92
- // Custom plugins
93
- const codeOrganization = require("./eslint-plugin-code-organization/index.js");
94
-
95
- // Expo config (CommonJS)
96
-
97
- export default [
98
- // Global ignores - loaded from eslint.ignore.config.json
99
- {
100
- ignores: ignorePatterns,
101
- },
102
-
103
- // Base configurations
104
- js.configs.recommended,
105
-
106
- // TypeScript configuration
107
- ...tseslint.configs.recommended,
108
-
109
- // Functional programming - manual configuration since v7 requires type info
110
- // We'll configure specific rules we need without type checking
111
- {
112
- plugins: {
113
- functional,
114
- },
115
- },
116
-
117
- // Code quality
118
- sonarjs.configs.recommended,
119
- {
120
- plugins: {
121
- "@eslint-community/eslint-comments": eslintComments,
122
- },
123
- rules: {
124
- ...eslintComments.configs.recommended.rules,
125
- },
126
- },
127
-
128
- // Documentation
129
- jsdoc.configs["flat/recommended-typescript-flavor"],
130
-
131
- // Prettier (must be last of shared configs)
132
- prettier,
133
-
134
- // Base configuration for all files
135
- {
136
- languageOptions: {
137
- globals: {
138
- ...globals.browser,
139
- ...globals.node,
140
- ...globals.es2021,
141
- },
142
- parserOptions: {
143
- ecmaVersion: 2021,
144
- sourceType: "module",
145
- },
146
- },
147
- plugins: {
148
- "code-organization": codeOrganization,
149
- // folders: foldersPlugin, // Disabled: not compatible with ESLint 9 flat config
150
- },
151
- rules: {
152
- // Prettier: Disabled because running Prettier inside ESLint is redundant and slower.
153
- // We use `format:check` from package.json for formatting validation and editor Prettier integration.
154
- // The eslint-config-prettier (imported above) still disables conflicting ESLint rules.
155
- // @see https://prettier.io/docs/en/integrating-with-linters.html
156
- "prettier/prettier": "off",
157
-
158
- // Code organization
159
- "code-organization/enforce-statement-order": "error",
160
-
161
- // Import rules
162
- "no-restricted-imports": [
163
- "warn",
164
- {
165
- patterns: ["@/features/*/*"],
166
- },
167
- ],
168
-
169
- // File size - threshold loaded from eslint.thresholds.config.json
170
- "max-lines": [
171
- "error",
172
- {
173
- max: thresholds.maxLines,
174
- skipBlankLines: true,
175
- skipComments: true,
176
- },
177
- ],
178
-
179
- // Folder naming
180
- // NOTE: eslint-plugin-folders is not compatible with ESLint 9 flat config
181
- // The rule has no schema defined and ESLint 9 validates rule options strictly
182
- // This needs to be addressed in a separate PR or the plugin needs to be updated
183
- // "folders/match-regex": ["error", "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$", "/src/"],
184
-
185
- // SonarJS rules - threshold loaded from eslint.thresholds.config.json
186
- "sonarjs/cognitive-complexity": ["error", thresholds.cognitiveComplexity],
187
- "sonarjs/no-identical-functions": "error",
188
- "sonarjs/no-duplicate-string": "error",
189
- "sonarjs/no-nested-template-literals": "warn",
190
- "sonarjs/prefer-immediate-return": "warn",
191
- "sonarjs/prefer-single-boolean-return": "warn",
192
- "sonarjs/no-collapsible-if": "warn",
193
- // New rules in SonarJS v3 - disabled temporarily to allow migration
194
- // These need to be addressed in a separate cleanup task
195
- "sonarjs/pseudo-random": "error",
196
- "sonarjs/no-clear-text-protocols": "error",
197
- "sonarjs/prefer-read-only-props": "error",
198
- "sonarjs/no-empty-test-file": "warn",
199
- "sonarjs/no-nested-conditional": "off",
200
- "sonarjs/no-commented-code": "warn",
201
- "sonarjs/no-ignored-exceptions": "warn",
202
- "sonarjs/todo-tag": "warn",
203
- // Next takes forever and doesn't provide value
204
- "sonarjs/aws-restricted-ip-admin-access": "off",
205
-
206
- // ESLint comments
207
- "@eslint-community/eslint-comments/require-description": "error",
208
- "@eslint-community/eslint-comments/disable-enable-pair": "error",
209
- "@eslint-community/eslint-comments/no-unlimited-disable": "error",
210
-
211
- // Configuration enforcement - prevent direct process.env access
212
- // All configuration should go through ConfigService or getStandaloneConfig()
213
- // @see PROJECT_RULES.md
214
- "no-restricted-syntax": [
215
- "error",
216
- {
217
- selector:
218
- "MemberExpression[object.name='process'][property.name='env']",
219
- message:
220
- "Direct process.env access is forbidden. Use ConfigService (in NestJS context) or getStandaloneConfig() (in Lambda handlers). See PROJECT_RULES.md.",
221
- },
222
- ],
223
-
224
- // General rules
225
- "no-extra-boolean-cast": "off",
226
- "prefer-const": "error",
227
- "no-param-reassign": "error",
228
- "no-var": "error",
229
- "brace-style": "error",
230
- "prefer-template": "error",
231
- radix: "error",
232
- "space-before-blocks": "error",
233
- "no-unused-vars": "off",
234
-
235
- // TypeScript rules
236
- "@typescript-eslint/no-explicit-any": "error",
237
- "@typescript-eslint/no-unused-vars": [
238
- "error",
239
- {
240
- argsIgnorePattern: "^_",
241
- varsIgnorePattern: "^_|^unstable_settings$|^React$",
242
- caughtErrorsIgnorePattern: "^_",
243
- },
244
- ],
245
- // New rules in typescript-eslint v8 - disabled temporarily
246
- "@typescript-eslint/no-require-imports": "off",
247
- "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
248
- "@typescript-eslint/ban-ts-comment": "off",
249
- "@typescript-eslint/prefer-as-const": "off",
250
- "@typescript-eslint/no-empty-object-type": "off",
251
- "@typescript-eslint/no-unused-expressions": "off",
252
- "@typescript-eslint/no-unsafe-function-type": "off",
253
-
254
- // Functional rules - configured to avoid type-checking requirements
255
- // Rules that require type info are disabled
256
- "functional/no-mixed-types": "off",
257
- "functional/functional-parameters": "off",
258
- "functional/prefer-immutable-types": "off",
259
- "functional/no-expression-statements": "off",
260
- "functional/no-conditional-statements": "off",
261
- "functional/prefer-property-signatures": "off",
262
- "functional/no-return-void": "off",
263
- "functional/no-throw-statements": "off",
264
- "functional/prefer-readonly-type": "off",
265
- "functional/prefer-tacit": "off",
266
- "functional/readonly-type": "off",
267
- "functional/type-declaration-immutability": "off",
268
- // Rules we want - these work without type info
269
- // NOTE: functional/immutable-data requires type info - enabled in TypeScript file config below
270
- "functional/immutable-data": "off",
271
- "functional/no-let": "error",
272
- // Disabled: NestJS relies heavily on classes for modules, controllers, services, etc.
273
- "functional/no-classes": "off",
274
-
275
- // JSDoc rules
276
- "jsdoc/require-jsdoc": [
277
- "error",
278
- {
279
- require: {
280
- FunctionDeclaration: true,
281
- MethodDefinition: false,
282
- ClassDeclaration: false,
283
- ArrowFunctionExpression: false,
284
- FunctionExpression: false,
285
- },
286
- contexts: [
287
- "TSInterfaceDeclaration",
288
- "TSTypeAliasDeclaration",
289
- "VariableDeclaration[declarations.0.init.type='ArrowFunctionExpression']:has([id.name=/^[A-Z]/])",
290
- ],
291
- },
292
- ],
293
- "jsdoc/require-param-description": "error",
294
- "jsdoc/require-returns-description": "error",
295
- "jsdoc/require-property-description": "error",
296
- "jsdoc/check-tag-names": ["error", { definedTags: ["remarks"] }],
297
- "jsdoc/no-types": "off",
298
- "jsdoc/require-param-type": "off",
299
- "jsdoc/require-returns-type": "off",
300
- "jsdoc/require-property-type": "off",
301
- },
302
- },
303
-
304
- // JavaScript files override
305
- {
306
- files: ["**/*.js"],
307
- rules: {
308
- "sonarjs/cognitive-complexity": "off",
309
- "@typescript-eslint/no-require-imports": "off", // CommonJS files
310
- },
311
- },
312
-
313
- // Shared hooks and components
314
- {
315
- files: ["hooks/shared/**/*", "components/shared/**/*"],
316
- rules: {
317
- "no-restricted-imports": "off",
318
- },
319
- },
320
-
321
- // Test files and Jest setup
322
- {
323
- files: [
324
- "**/*.test.js",
325
- "**/*.test.ts",
326
- "**/*.spec.js",
327
- "**/*.spec.ts",
328
- "jest.setup.js",
329
- "jest.setup.ts",
330
- "jest.setup.pre.js",
331
- "**/__tests__/*",
332
- ],
333
- languageOptions: {
334
- globals: {
335
- ...globals.jest,
336
- },
337
- },
338
- rules: {
339
- "@typescript-eslint/no-explicit-any": "off",
340
- // Tests often need to mutate state for mocks, setup, and assertions
341
- "functional/immutable-data": "off",
342
- // Tests need to manipulate process.env for environment setup
343
- "no-restricted-syntax": "off",
344
- },
345
- },
346
-
347
- // TypeScript files - enable type-checked linting
348
- {
349
- files: ["**/*.ts"],
350
- // languageOptions: {
351
- // parserOptions: {
352
- // projectService: true,
353
- // tsconfigRootDir: __dirname,
354
- // },
355
- // },
356
- rules: {
357
- // Enable immutable-data rule now that type-checking is available
358
- "functional/immutable-data": [
359
- "off",
360
- {
361
- ignoreClasses: true,
362
- ignoreImmediateMutation: true,
363
- ignoreNonConstDeclarations: {
364
- treatParametersAsConst: true,
365
- },
366
- ignoreAccessorPattern: ["*.displayName", "*.current", "*.value"],
367
- },
368
- ],
369
- },
370
- },
371
-
372
- // TypeScript test files - disable immutable-data (must come after TypeScript config)
373
- {
374
- files: ["**/*.test.ts", "**/*.spec.ts"],
375
- rules: {
376
- // Tests often need to mutate state for mocks, setup, and assertions
377
- "functional/immutable-data": "off",
378
- },
379
- },
380
-
381
- // Configuration file - allowed to use process.env (single source of truth)
382
- {
383
- files: ["src/config/configuration.ts"],
384
- rules: {
385
- // This is the ONLY file allowed to access process.env directly
386
- // All other code must use ConfigService or getStandaloneConfig()
387
- "no-restricted-syntax": "off",
388
- },
389
- },
390
- ];