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