@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,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  /**
2
7
  * Unit tests for the single-component-per-file ESLint rule
3
8
  *
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  /**
2
7
  * ESLint plugin for component structure standards
3
8
  *
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  const fs = require("fs");
2
7
  const path = require("path");
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  module.exports = {
2
7
  meta: {
3
8
  type: "problem",
@@ -11,7 +16,7 @@ module.exports = {
11
16
  schema: [],
12
17
  messages: {
13
18
  noReturnInView:
14
- "View components should use arrow function shorthand: () => (...) instead of () => { return (...) }",
19
+ "View components should use arrow function shorthand: () => (...) instead of () => { return (...) }. Hoist any definitions outside of the arrow function body or into the corresponding Container.",
15
20
  },
16
21
  },
17
22
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  /**
2
7
  * ESLint rule to enforce React.memo usage with displayName in View components
3
8
  *
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  /**
2
7
  * ESLint rule to enforce exactly one React component per file
3
8
  *
@@ -146,73 +146,6 @@ const MyComponent = () => (
146
146
 
147
147
  ---
148
148
 
149
- ### no-inline-styles
150
-
151
- Prevents inline style objects in favor of className-based styling.
152
-
153
- #### Rule Details
154
-
155
- This rule prohibits inline `style` props with object literals. All styling should use className with Tailwind/NativeWind classes.
156
-
157
- **Why this rule exists:**
158
- - Inline styles bypass the design system
159
- - Harder to maintain consistency
160
- - NativeWind provides better performance
161
- - Enables theme support
162
-
163
- #### Examples
164
-
165
- **Incorrect:**
166
-
167
- ```tsx
168
- const MyView = () => (
169
- <View style={{ padding: 16, backgroundColor: 'white' }}>
170
- <Text style={{ fontSize: 18, fontWeight: 'bold' }}>Title</Text>
171
- </View>
172
- );
173
- ```
174
-
175
- **Incorrect** (StyleSheet is also discouraged):
176
-
177
- ```tsx
178
- const styles = StyleSheet.create({
179
- container: { padding: 16 }
180
- });
181
-
182
- const MyView = () => (
183
- <View style={styles.container}>
184
- <Text>Content</Text>
185
- </View>
186
- );
187
- ```
188
-
189
- **Correct:**
190
-
191
- ```tsx
192
- const MyView = () => (
193
- <View className="p-4 bg-white">
194
- <Text className="text-lg font-bold">Title</Text>
195
- </View>
196
- );
197
- ```
198
-
199
- #### Configuration
200
-
201
- ```javascript
202
- // eslint.config.mjs
203
- {
204
- rules: {
205
- 'ui-standards/no-inline-styles': 'error'
206
- }
207
- }
208
- ```
209
-
210
- **Allowed exceptions:**
211
- - Dynamic styles computed at runtime (with eslint-disable comment)
212
- - Animation styles (Reanimated)
213
-
214
- ---
215
-
216
149
  ## Installation
217
150
 
218
151
  This plugin is installed locally as a file dependency:
@@ -239,7 +172,6 @@ export default [
239
172
  rules: {
240
173
  'ui-standards/no-classname-outside-ui': 'error',
241
174
  'ui-standards/no-direct-rn-imports': 'error',
242
- 'ui-standards/no-inline-styles': 'error',
243
175
  },
244
176
  },
245
177
  ];
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  /**
2
7
  * ESLint plugin for UI standards
3
8
  *
@@ -7,12 +12,10 @@
7
12
  * Rules:
8
13
  * - no-classname-outside-ui: Disallows className prop outside UI components
9
14
  * - no-direct-rn-imports: Disallows direct React Native imports
10
- * - no-inline-styles: Disallows inline style objects
11
15
  * @module eslint-plugin-ui-standards
12
16
  */
13
17
  const noClassnameOutsideUi = require("./rules/no-classname-outside-ui");
14
18
  const noDirectRnImports = require("./rules/no-direct-rn-imports");
15
- const noInlineStyles = require("./rules/no-inline-styles");
16
19
 
17
20
  const plugin = {
18
21
  meta: {
@@ -22,7 +25,6 @@ const plugin = {
22
25
  rules: {
23
26
  "no-classname-outside-ui": noClassnameOutsideUi,
24
27
  "no-direct-rn-imports": noDirectRnImports,
25
- "no-inline-styles": noInlineStyles,
26
28
  },
27
29
  };
28
30
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  module.exports = {
2
7
  meta: {
3
8
  type: "problem",
@@ -1,3 +1,8 @@
1
+ /**
2
+ * This file is managed by Lisa.
3
+ * Do not edit directly — changes will be overwritten on the next `lisa` run.
4
+ */
5
+
1
6
  module.exports = {
2
7
  meta: {
3
8
  type: "problem",
@@ -0,0 +1,53 @@
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 (Expo)
8
+ *
9
+ * This file imports the Expo-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.expo.ts
15
+ * └── eslint.typescript.ts
16
+ * └── eslint.base.ts
17
+ *
18
+ * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
19
+ * @module eslint.config
20
+ */
21
+ import path from "path";
22
+ import { fileURLToPath } from "url";
23
+
24
+ import {
25
+ defaultIgnores,
26
+ defaultThresholds,
27
+ getExpoConfig,
28
+ } from "./eslint.expo";
29
+
30
+ // Project-specific configuration loaded from JSON files
31
+ import ignoreConfig from "./eslint.ignore.config.json" with { type: "json" };
32
+ import thresholdsConfig from "./eslint.thresholds.json" with { type: "json" };
33
+
34
+ // Project-local customizations (create-only - safe to modify)
35
+ import localConfig from "./eslint.config.local";
36
+
37
+ const __filename = fileURLToPath(import.meta.url);
38
+ const __dirname = path.dirname(__filename);
39
+
40
+ const ignorePatterns = ignoreConfig.ignores || defaultIgnores;
41
+ const thresholds = { ...defaultThresholds, ...thresholdsConfig };
42
+
43
+ export default [
44
+ // Stack-specific configuration (Expo)
45
+ ...getExpoConfig({
46
+ tsconfigRootDir: __dirname,
47
+ ignorePatterns,
48
+ thresholds,
49
+ }),
50
+
51
+ // Project-local customizations
52
+ ...localConfig,
53
+ ];
@@ -0,0 +1,330 @@
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 - Expo Stack
9
+ *
10
+ * This configuration extends TypeScript config for Expo/React Native projects.
11
+ * It adds Expo-specific plugins and rules for React, Tailwind, accessibility,
12
+ * and component structure.
13
+ *
14
+ * Inheritance chain:
15
+ * eslint.expo.ts (this file)
16
+ * └── eslint.typescript.ts
17
+ * └── eslint.base.ts
18
+ * @see https://eslint.org/docs/latest/use/configure/configuration-files-new
19
+ * @module eslint.expo
20
+ */
21
+ import jsxA11y from "eslint-plugin-jsx-a11y";
22
+ import react from "eslint-plugin-react";
23
+ import reactCompiler from "eslint-plugin-react-compiler";
24
+ // @ts-expect-error -- eslint-plugin-react-perf lacks type declarations
25
+ import reactPerf from "eslint-plugin-react-perf";
26
+ import tailwind from "eslint-plugin-tailwindcss";
27
+ import { createRequire } from "module";
28
+
29
+ // Import TypeScript config and utilities
30
+ import {
31
+ codeOrganization,
32
+ defaultIgnores,
33
+ defaultThresholds,
34
+ getBaseConfigs,
35
+ getBaseLanguageOptions,
36
+ getJsFilesOverride,
37
+ getSharedFilesOverride,
38
+ getSharedRules,
39
+ getTestFilesOverride,
40
+ getTsFilesOverride,
41
+ getTsTestFilesOverride,
42
+ } from "./eslint.typescript";
43
+
44
+ // Re-export for downstream configs
45
+ export {
46
+ defaultIgnores,
47
+ defaultThresholds,
48
+ getBaseConfigs,
49
+ getBaseLanguageOptions,
50
+ getSharedRules,
51
+ };
52
+
53
+ // Custom plugins (CommonJS - use createRequire)
54
+ const require = createRequire(import.meta.url);
55
+ const componentStructure = require("./eslint-plugin-component-structure/index.js");
56
+ const uiStandards = require("./eslint-plugin-ui-standards/index.js");
57
+ const expoConfig = require("eslint-config-expo/flat");
58
+
59
+ /**
60
+ * Creates the Expo ESLint configuration.
61
+ * @param {object} options - Configuration options
62
+ * @param {string} options.tsconfigRootDir - Root directory for tsconfig.json
63
+ * @param {string[]} [options.ignorePatterns] - Patterns to ignore
64
+ * @param {object} [options.thresholds] - Threshold overrides
65
+ * @returns {Array} ESLint flat config array
66
+ */
67
+ export function getExpoConfig({
68
+ tsconfigRootDir,
69
+ ignorePatterns = defaultIgnores,
70
+ thresholds = defaultThresholds,
71
+ }: {
72
+ tsconfigRootDir: string;
73
+ ignorePatterns?: string[];
74
+ thresholds?: typeof defaultThresholds;
75
+ }) {
76
+ return [
77
+ // Global ignores
78
+ {
79
+ ignores: ignorePatterns,
80
+ },
81
+
82
+ // Base configurations from shared module
83
+ ...getBaseConfigs(),
84
+
85
+ // Expo-specific configurations
86
+ ...expoConfig,
87
+
88
+ // React configurations
89
+ react.configs.flat.recommended,
90
+ react.configs.flat["jsx-runtime"],
91
+
92
+ // Accessibility
93
+ jsxA11y.flatConfigs.strict,
94
+
95
+ // Tailwind CSS
96
+ ...tailwind.configs["flat/recommended"],
97
+
98
+ // Performance
99
+ reactPerf.configs.flat.recommended,
100
+
101
+ // Base configuration for all files
102
+ {
103
+ languageOptions: {
104
+ ...getBaseLanguageOptions(),
105
+ parserOptions: {
106
+ ...getBaseLanguageOptions().parserOptions,
107
+ ecmaFeatures: { jsx: true },
108
+ },
109
+ },
110
+ plugins: {
111
+ "component-structure": componentStructure,
112
+ "code-organization": codeOrganization,
113
+ "react-compiler": reactCompiler,
114
+ "ui-standards": uiStandards,
115
+ },
116
+ rules: {
117
+ // Shared rules from base
118
+ ...getSharedRules(thresholds),
119
+
120
+ // Code organization
121
+ "code-organization/enforce-statement-order": "error",
122
+
123
+ // UI standards (all off by default)
124
+ "ui-standards/no-classname-outside-ui": "off",
125
+ "ui-standards/no-direct-rn-imports": "off",
126
+
127
+ // Tailwind
128
+ "tailwindcss/classnames-order": [
129
+ "error",
130
+ {
131
+ callees: ["tva", "classnames", "clsx", "ctl", "cva", "tv"],
132
+ },
133
+ ],
134
+
135
+ // Import rules
136
+ // Slow rules - disabled by default, run via `lint:slow` script
137
+ // @see eslint.slow.config.ts
138
+ "import/no-cycle": "off",
139
+ "import/namespace": "off",
140
+ // End Slow rules - disabled by default, run via `lint:slow` script
141
+ "import/no-unresolved": "off", // Disabled: doesn't understand React Native platform extensions (.native.tsx, .web.tsx)
142
+ "import/prefer-default-export": "off",
143
+ "import/no-duplicates": "error",
144
+
145
+ // React performance
146
+ "react-perf/jsx-no-new-object-as-prop": "error",
147
+ "react-perf/jsx-no-new-array-as-prop": "error",
148
+ "react-perf/jsx-no-new-function-as-prop": "error",
149
+
150
+ // React rules
151
+ "react/jsx-no-constructed-context-values": "error",
152
+ "react/jsx-uses-react": "off",
153
+ "react/react-in-jsx-scope": "off",
154
+ "react-hooks/exhaustive-deps": "error",
155
+ "react-hooks/rules-of-hooks": "error",
156
+ "react-hooks/set-state-in-effect": "error",
157
+ "react-hooks/preserve-manual-memoization": "error",
158
+ "react-hooks/refs": "error",
159
+ "react-hooks/immutability": "error",
160
+ // Slow rules - disabled by default, run via `lint:slow` script
161
+ // @see eslint.slow.config.ts
162
+ "react-compiler/react-compiler": "off",
163
+ "react-hooks/static-components": "off",
164
+ // End Slow rules - disabled by default, run via `lint:slow` script
165
+ // Environment variables - enforce validated env module usage
166
+ // @see .claude/skills/expo-env-config/SKILL.md
167
+ "no-restricted-syntax": [
168
+ "error",
169
+ {
170
+ selector:
171
+ "MemberExpression[object.name='process'][property.name='env']",
172
+ message:
173
+ "Direct process.env access is forbidden. Import { env } from '@/lib/env' instead for type-safe, validated environment variables.",
174
+ },
175
+ ],
176
+
177
+ // Console warnings for Expo
178
+ "no-console": "warn",
179
+
180
+ // Functional programming - classes not allowed in Expo (functional components only)
181
+ "functional/no-classes": "error",
182
+
183
+ // JSDoc rules - Expo has relaxed requirements for classes/methods
184
+ "jsdoc/require-jsdoc": [
185
+ "error",
186
+ {
187
+ require: {
188
+ FunctionDeclaration: true,
189
+ MethodDefinition: false,
190
+ ClassDeclaration: false,
191
+ ArrowFunctionExpression: false,
192
+ FunctionExpression: false,
193
+ },
194
+ contexts: [
195
+ "TSInterfaceDeclaration",
196
+ "TSTypeAliasDeclaration",
197
+ "VariableDeclaration[declarations.0.init.type='ArrowFunctionExpression']:has([id.name=/^[A-Z]/])",
198
+ ],
199
+ },
200
+ ],
201
+ },
202
+ },
203
+
204
+ // JavaScript files override
205
+ getJsFilesOverride(),
206
+
207
+ // Shared hooks and components
208
+ getSharedFilesOverride(),
209
+
210
+ // UI components
211
+ {
212
+ files: [
213
+ "components/ui/**/*.tsx",
214
+ "components/ui/**/*.jsx",
215
+ "components/custom/ui/**/*.tsx",
216
+ "components/custom/ui/**/*.jsx",
217
+ ],
218
+ rules: {
219
+ "ui-standards/no-classname-outside-ui": "off",
220
+ },
221
+ },
222
+
223
+ // Test files and Jest setup (with JSX patterns)
224
+ getTestFilesOverride([
225
+ "**/*.test.jsx",
226
+ "**/*.test.tsx",
227
+ "**/*spec.jsx",
228
+ "**/*spec.tsx",
229
+ ]),
230
+
231
+ // TypeScript files - enable type-checked linting (includes TSX)
232
+ {
233
+ ...getTsFilesOverride(["**/*.ts", "**/*.tsx"], tsconfigRootDir),
234
+ rules: {
235
+ ...getTsFilesOverride(["**/*.ts", "**/*.tsx"], tsconfigRootDir).rules,
236
+ "react/prop-types": "off",
237
+ },
238
+ },
239
+
240
+ // TSX files - disable require-returns for components
241
+ {
242
+ files: ["**/*.tsx"],
243
+ rules: {
244
+ "jsdoc/require-returns": "off",
245
+ },
246
+ },
247
+
248
+ // TypeScript test files - disable immutable-data (must come after TypeScript config)
249
+ getTsTestFilesOverride([
250
+ "**/*.test.ts",
251
+ "**/*.test.tsx",
252
+ "**/*spec.ts",
253
+ "**/*spec.tsx",
254
+ ]),
255
+
256
+ // Component structure rules
257
+ {
258
+ files: [
259
+ "features/**/components/**/*.ts",
260
+ "features/**/components/**/*.tsx",
261
+ "features/**/components/**/*.jsx",
262
+ "features/**/screens/**/*.ts",
263
+ "features/**/screens/**/*.tsx",
264
+ "features/**/screens/**/*.jsx",
265
+ "components/**/*.ts",
266
+ "components/**/*.tsx",
267
+ "components/**/*.jsx",
268
+ ],
269
+ ignores: [
270
+ "components/ui/**",
271
+ "components/shared/**",
272
+ "components/icons/**",
273
+ ],
274
+ rules: {
275
+ "component-structure/enforce-component-structure": "error",
276
+ "component-structure/single-component-per-file": "error",
277
+ },
278
+ },
279
+
280
+ // View component rules
281
+ {
282
+ files: ["**/*View.tsx", "**/*View.jsx"],
283
+ rules: {
284
+ "component-structure/no-return-in-view": "error",
285
+ },
286
+ },
287
+
288
+ // View memo requirement (excluding UI components)
289
+ {
290
+ files: ["**/*View.tsx", "**/*View.jsx"],
291
+ ignores: ["components/ui/**"],
292
+ rules: {
293
+ "component-structure/require-memo-in-view": "error",
294
+ },
295
+ },
296
+
297
+ // Environment validation module - allowed to access process.env
298
+ // This is the ONLY file that should directly read environment variables
299
+ // @see .claude/skills/expo-env-config/SKILL.md
300
+ {
301
+ files: ["src/lib/env.ts", "lib/env.ts", "lib/__tests__/env.test.ts"],
302
+ rules: {
303
+ "no-restricted-syntax": "off",
304
+ },
305
+ },
306
+
307
+ // Test files that mock process.env for environment variable testing
308
+ // These need direct access to process.env to set up test fixtures
309
+ {
310
+ files: [
311
+ "lib/apollo/sentryLink.test.ts",
312
+ "lib/build/info.test.ts",
313
+ "lib/sentry/config.test.ts",
314
+ ],
315
+ rules: {
316
+ "no-restricted-syntax": "off",
317
+ },
318
+ },
319
+
320
+ // Configuration files - allowed to use process.env directly
321
+ {
322
+ files: ["**/*config.*", "lighthouserc.js", "codegen.ts"],
323
+ rules: {
324
+ "no-restricted-syntax": "off",
325
+ },
326
+ },
327
+ ];
328
+ }
329
+
330
+ /* eslint-enable max-lines-per-function -- config file needs a lot of lines */
@@ -0,0 +1,86 @@
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 (Expo)
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
+ * - react-compiler/react-compiler - React Compiler compatibility checks (slow)
17
+ * - react-hooks/static-components - Static component optimization checks (slow)
18
+ *
19
+ * @see https://github.com/import-js/eslint-plugin-import
20
+ * @see https://react.dev/learn/react-compiler
21
+ * @module eslint.slow.config
22
+ */
23
+ import importPlugin from "eslint-plugin-import";
24
+ import reactCompiler from "eslint-plugin-react-compiler";
25
+ import reactHooks from "eslint-plugin-react-hooks";
26
+ import sonarjsPlugin from "eslint-plugin-sonarjs";
27
+ import tseslint from "typescript-eslint";
28
+
29
+ import ignoreConfig from "./eslint.ignore.config.json" with { type: "json" };
30
+
31
+ const ignorePatterns = ignoreConfig.ignores || [];
32
+
33
+ // Get the TypeScript flat config from the import plugin
34
+ const importTypescriptConfig = importPlugin.flatConfigs.typescript;
35
+
36
+ export default [
37
+ // Use same ignores as main config, plus ignore all non-TS files
38
+ // This prevents errors from inline eslint directives in JS files
39
+ // that reference rules not loaded in this minimal config
40
+ {
41
+ ignores: [...ignorePatterns, "**/*.js", "**/*.mjs", "**/*.cjs"],
42
+ },
43
+
44
+ // TypeScript/TSX files - slow import and React rules only
45
+ {
46
+ files: ["**/*.ts", "**/*.tsx"],
47
+ languageOptions: {
48
+ parser: tseslint.parser,
49
+ parserOptions: {
50
+ project: "tsconfig.eslint.json",
51
+ ecmaFeatures: { jsx: true },
52
+ },
53
+ },
54
+ plugins: {
55
+ ...importTypescriptConfig?.plugins,
56
+ sonarjs: sonarjsPlugin,
57
+ "react-compiler": reactCompiler,
58
+ "react-hooks": reactHooks,
59
+ },
60
+ settings: {
61
+ ...(importTypescriptConfig?.settings ?? {}),
62
+ "import/resolver": {
63
+ ...((importTypescriptConfig?.settings?.["import/resolver"] as Record<
64
+ string,
65
+ unknown
66
+ >) ?? {}),
67
+ typescript: true,
68
+ },
69
+ },
70
+ rules: {
71
+ // ONLY slow rules - everything else runs in the main config
72
+
73
+ // Import rules (slow)
74
+ "import/namespace": "error",
75
+ "import/no-cycle": "error",
76
+
77
+ "sonarjs/deprecation": "error",
78
+
79
+ // React Compiler compatibility (slow)
80
+ "react-compiler/react-compiler": "error",
81
+
82
+ // Static component optimization (slow)
83
+ "react-hooks/static-components": "error",
84
+ },
85
+ },
86
+ ];