@codyswann/lisa 7.1.5 → 8.0.1
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/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +0 -2
- package/all/copy-overwrite/scripts/lib/push-timing.mjs +3 -6
- package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -32
- package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +201 -20
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -2
- package/dist/cli/admit-cmd.d.ts.map +1 -1
- package/dist/cli/admit-cmd.js +16 -10
- package/dist/cli/admit-cmd.js.map +1 -1
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +2 -2
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/check-cmd.d.ts.map +1 -1
- package/dist/cli/check-cmd.js +8 -4
- package/dist/cli/check-cmd.js.map +1 -1
- package/dist/cli/doctor-coderabbit.js +2 -2
- package/dist/cli/doctor-coderabbit.js.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts +5 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.js +44 -10
- package/dist/cli/doctor-readiness-supply-chain-python.js.map +1 -1
- package/dist/cli/doctor-readiness.js +2 -2
- package/dist/cli/doctor-readiness.js.map +1 -1
- package/dist/cli/doctor-worker-journey.js +2 -2
- package/dist/cli/doctor-worker-journey.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/file-upstream-cmd.d.ts.map +1 -1
- package/dist/cli/file-upstream-cmd.js +20 -25
- package/dist/cli/file-upstream-cmd.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -2
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +13 -6
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/health-cmd.d.ts.map +1 -1
- package/dist/cli/health-cmd.js +7 -19
- package/dist/cli/health-cmd.js.map +1 -1
- package/dist/cli/lisa-test-run-jest-merge.js +5 -5
- package/dist/cli/lisa-test-run-jest-merge.js.map +1 -1
- package/dist/cli/lisa-test-run.js +8 -4
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/cli/pr-landing.js +2 -2
- package/dist/cli/pr-landing.js.map +1 -1
- package/dist/cli/update-check.d.ts.map +1 -1
- package/dist/cli/update-check.js +7 -4
- package/dist/cli/update-check.js.map +1 -1
- package/dist/cli/update-cmd.d.ts.map +1 -1
- package/dist/cli/update-cmd.js +7 -4
- package/dist/cli/update-cmd.js.map +1 -1
- package/dist/cli/worktree-ownership.d.ts.map +1 -1
- package/dist/cli/worktree-ownership.js +3 -3
- package/dist/cli/worktree-ownership.js.map +1 -1
- package/dist/codex/hooks-catalog.d.ts +151 -0
- package/dist/codex/hooks-catalog.d.ts.map +1 -0
- package/dist/codex/hooks-catalog.js +315 -0
- package/dist/codex/hooks-catalog.js.map +1 -0
- package/dist/codex/hooks-compatibility.d.ts +14 -0
- package/dist/codex/hooks-compatibility.d.ts.map +1 -0
- package/dist/codex/hooks-compatibility.js +196 -0
- package/dist/codex/hooks-compatibility.js.map +1 -0
- package/dist/codex/hooks-installer.d.ts +2 -49
- package/dist/codex/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +5 -546
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/hooks-source-links.d.ts +11 -0
- package/dist/codex/hooks-source-links.d.ts.map +1 -0
- package/dist/codex/hooks-source-links.js +74 -0
- package/dist/codex/hooks-source-links.js.map +1 -0
- package/dist/codex/scripts/block-migration-edits.sh +2 -2
- package/dist/codex/scripts/block-suppress-directives.sh +3 -3
- package/dist/codex/scripts/format-on-edit.sh +2 -2
- package/dist/codex/scripts/lint-on-edit.sh +2 -2
- package/dist/codex/scripts/lisa-edit-gate.sh +19 -15
- package/dist/codex/scripts/rubocop-on-edit.sh +2 -2
- package/dist/codex/scripts/sg-scan-on-edit.sh +2 -2
- package/dist/configs/coverage-scope.d.ts +0 -23
- package/dist/configs/coverage-scope.d.ts.map +1 -1
- package/dist/configs/coverage-scope.js +2 -3
- package/dist/configs/coverage-scope.js.map +1 -1
- package/dist/configs/eslint/base.d.ts +2 -113
- package/dist/configs/eslint/base.d.ts.map +1 -1
- package/dist/configs/eslint/base.js +2 -165
- package/dist/configs/eslint/base.js.map +1 -1
- package/dist/configs/eslint/cdk.d.ts.map +1 -1
- package/dist/configs/eslint/cdk.js +82 -66
- package/dist/configs/eslint/cdk.js.map +1 -1
- package/dist/configs/eslint/expo-overrides.d.ts +103 -0
- package/dist/configs/eslint/expo-overrides.d.ts.map +1 -0
- package/dist/configs/eslint/expo-overrides.js +187 -0
- package/dist/configs/eslint/expo-overrides.js.map +1 -0
- package/dist/configs/eslint/expo.d.ts +2 -7
- package/dist/configs/eslint/expo.d.ts.map +1 -1
- package/dist/configs/eslint/expo.js +186 -258
- package/dist/configs/eslint/expo.js.map +1 -1
- package/dist/configs/eslint/nestjs.d.ts.map +1 -1
- package/dist/configs/eslint/nestjs.js +86 -70
- package/dist/configs/eslint/nestjs.js.map +1 -1
- package/dist/configs/eslint/process-environment-bans.d.ts +41 -0
- package/dist/configs/eslint/process-environment-bans.d.ts.map +1 -0
- package/dist/configs/eslint/process-environment-bans.js +50 -0
- package/dist/configs/eslint/process-environment-bans.js.map +1 -0
- package/dist/configs/eslint/shared-rules.d.ts +130 -0
- package/dist/configs/eslint/shared-rules.d.ts.map +1 -0
- package/dist/configs/eslint/shared-rules.js +233 -0
- package/dist/configs/eslint/shared-rules.js.map +1 -0
- package/dist/configs/eslint/typescript.d.ts.map +1 -1
- package/dist/configs/eslint/typescript.js +2 -4
- package/dist/configs/eslint/typescript.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +2 -2
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +5 -5
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.js +3 -2
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
- package/dist/configs/vitest/refusal-announcement.js +2 -2
- package/dist/configs/vitest/refusal-announcement.js.map +1 -1
- package/dist/core/admission-lock.js +2 -3
- package/dist/core/admission-lock.js.map +1 -1
- package/dist/core/admission-state.d.ts.map +1 -1
- package/dist/core/admission-state.js +11 -5
- package/dist/core/admission-state.js.map +1 -1
- package/dist/core/admission.d.ts.map +1 -1
- package/dist/core/admission.js +2 -2
- package/dist/core/admission.js.map +1 -1
- package/dist/core/bootstrap-environment.d.ts.map +1 -1
- package/dist/core/bootstrap-environment.js +8 -5
- package/dist/core/bootstrap-environment.js.map +1 -1
- package/dist/core/downstream-names.d.ts.map +1 -1
- package/dist/core/downstream-names.js +48 -47
- package/dist/core/downstream-names.js.map +1 -1
- package/dist/core/effectiveness-store.d.ts.map +1 -1
- package/dist/core/effectiveness-store.js +3 -5
- package/dist/core/effectiveness-store.js.map +1 -1
- package/dist/core/gate-declaration-drift.d.ts.map +1 -1
- package/dist/core/gate-declaration-drift.js +46 -27
- package/dist/core/gate-declaration-drift.js.map +1 -1
- package/dist/core/kane-cli-process.d.ts.map +1 -1
- package/dist/core/kane-cli-process.js +46 -33
- package/dist/core/kane-cli-process.js.map +1 -1
- package/dist/core/kane-cli.d.ts.map +1 -1
- package/dist/core/kane-cli.js +3 -4
- package/dist/core/kane-cli.js.map +1 -1
- package/dist/core/lisa-agent-emit-extra.d.ts +75 -0
- package/dist/core/lisa-agent-emit-extra.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit-extra.js +231 -0
- package/dist/core/lisa-agent-emit-extra.js.map +1 -0
- package/dist/core/lisa-agent-emit.d.ts +79 -0
- package/dist/core/lisa-agent-emit.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit.js +224 -0
- package/dist/core/lisa-agent-emit.js.map +1 -0
- package/dist/core/lisa-deletions.d.ts +116 -0
- package/dist/core/lisa-deletions.d.ts.map +1 -0
- package/dist/core/lisa-deletions.js +316 -0
- package/dist/core/lisa-deletions.js.map +1 -0
- package/dist/core/lisa-file-results.d.ts +58 -0
- package/dist/core/lisa-file-results.d.ts.map +1 -0
- package/dist/core/lisa-file-results.js +173 -0
- package/dist/core/lisa-file-results.js.map +1 -0
- package/dist/core/lisa-maintenance.d.ts +139 -0
- package/dist/core/lisa-maintenance.d.ts.map +1 -0
- package/dist/core/lisa-maintenance.js +324 -0
- package/dist/core/lisa-maintenance.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts +7 -5
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +44 -6036
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +6021 -0
- package/dist/core/lisa-plugin-sync.d.ts +96 -0
- package/dist/core/lisa-plugin-sync.d.ts.map +1 -0
- package/dist/core/lisa-plugin-sync.js +216 -0
- package/dist/core/lisa-plugin-sync.js.map +1 -0
- package/dist/core/lisa-plugins.d.ts +42 -0
- package/dist/core/lisa-plugins.d.ts.map +1 -0
- package/dist/core/lisa-plugins.js +155 -0
- package/dist/core/lisa-plugins.js.map +1 -0
- package/dist/core/lisa-state.d.ts +202 -0
- package/dist/core/lisa-state.d.ts.map +1 -0
- package/dist/core/lisa-state.js +205 -0
- package/dist/core/lisa-state.js.map +1 -0
- package/dist/core/lisa-summary-stats.d.ts +74 -0
- package/dist/core/lisa-summary-stats.d.ts.map +1 -0
- package/dist/core/lisa-summary-stats.js +189 -0
- package/dist/core/lisa-summary-stats.js.map +1 -0
- package/dist/core/lisa-summary.d.ts +34 -0
- package/dist/core/lisa-summary.d.ts.map +1 -0
- package/dist/core/lisa-summary.js +144 -0
- package/dist/core/lisa-summary.js.map +1 -0
- package/dist/core/lisa-templates.d.ts +98 -0
- package/dist/core/lisa-templates.d.ts.map +1 -0
- package/dist/core/lisa-templates.js +251 -0
- package/dist/core/lisa-templates.js.map +1 -0
- package/dist/core/lisa.d.ts +14 -903
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +30 -2275
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/plugin-command.d.ts.map +1 -1
- package/dist/core/plugin-command.js +117 -61
- package/dist/core/plugin-command.js.map +1 -1
- package/dist/core/template-ownership.d.ts.map +1 -1
- package/dist/core/template-ownership.js +0 -1
- package/dist/core/template-ownership.js.map +1 -1
- package/dist/core/upstream-attribution-body.d.ts +4 -11
- package/dist/core/upstream-attribution-body.d.ts.map +1 -1
- package/dist/core/upstream-attribution-body.js +61 -373
- package/dist/core/upstream-attribution-body.js.map +1 -1
- package/dist/core/upstream-attribution-fields.d.ts +40 -0
- package/dist/core/upstream-attribution-fields.d.ts.map +1 -0
- package/dist/core/upstream-attribution-fields.js +167 -0
- package/dist/core/upstream-attribution-fields.js.map +1 -0
- package/dist/core/upstream-attribution-files.d.ts +15 -0
- package/dist/core/upstream-attribution-files.d.ts.map +1 -0
- package/dist/core/upstream-attribution-files.js +156 -0
- package/dist/core/upstream-attribution-files.js.map +1 -0
- package/dist/core/upstream-attribution-guards.d.ts +80 -0
- package/dist/core/upstream-attribution-guards.d.ts.map +1 -0
- package/dist/core/upstream-attribution-guards.js +284 -0
- package/dist/core/upstream-attribution-guards.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +67 -30435
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +30520 -0
- package/dist/health/agentic-contract.d.ts +94 -0
- package/dist/health/agentic-contract.d.ts.map +1 -0
- package/dist/health/agentic-contract.js +2 -0
- package/dist/health/agentic-contract.js.map +1 -0
- package/dist/health/agentic-evidence.d.ts +16 -0
- package/dist/health/agentic-evidence.d.ts.map +1 -0
- package/dist/health/agentic-evidence.js +213 -0
- package/dist/health/agentic-evidence.js.map +1 -0
- package/dist/health/agentic.d.ts +11 -74
- package/dist/health/agentic.d.ts.map +1 -1
- package/dist/health/agentic.js +42 -216
- package/dist/health/agentic.js.map +1 -1
- package/dist/health/deadline.d.ts +4 -1
- package/dist/health/deadline.d.ts.map +1 -1
- package/dist/health/deadline.js +4 -3
- package/dist/health/deadline.js.map +1 -1
- package/dist/health/deterministic-inputs.d.ts.map +1 -1
- package/dist/health/deterministic-inputs.js +3 -11
- package/dist/health/deterministic-inputs.js.map +1 -1
- package/dist/health/deterministic-probes.d.ts +52 -0
- package/dist/health/deterministic-probes.d.ts.map +1 -0
- package/dist/health/deterministic-probes.js +142 -0
- package/dist/health/deterministic-probes.js.map +1 -0
- package/dist/health/deterministic.d.ts +2 -25
- package/dist/health/deterministic.d.ts.map +1 -1
- package/dist/health/deterministic.js +14 -106
- package/dist/health/deterministic.js.map +1 -1
- package/dist/health/finding-utils.d.ts +4 -3
- package/dist/health/finding-utils.d.ts.map +1 -1
- package/dist/health/finding-utils.js +4 -4
- package/dist/health/finding-utils.js.map +1 -1
- package/dist/health/governance-probes.d.ts +29 -24
- package/dist/health/governance-probes.d.ts.map +1 -1
- package/dist/health/governance-probes.js +29 -25
- package/dist/health/governance-probes.js.map +1 -1
- package/dist/health/hook-inspection.d.ts +4 -3
- package/dist/health/hook-inspection.d.ts.map +1 -1
- package/dist/health/hook-inspection.js +17 -11
- package/dist/health/hook-inspection.js.map +1 -1
- package/dist/health/plugin-inspection.d.ts +6 -4
- package/dist/health/plugin-inspection.d.ts.map +1 -1
- package/dist/health/plugin-inspection.js +10 -9
- package/dist/health/plugin-inspection.js.map +1 -1
- package/dist/health/prepare.js +24 -8
- package/dist/health/prepare.js.map +1 -1
- package/dist/health/project-probes.d.ts +14 -7
- package/dist/health/project-probes.d.ts.map +1 -1
- package/dist/health/project-probes.js +14 -9
- package/dist/health/project-probes.js.map +1 -1
- package/dist/health/ruleset-compare.d.ts +30 -0
- package/dist/health/ruleset-compare.d.ts.map +1 -0
- package/dist/health/ruleset-compare.js +143 -0
- package/dist/health/ruleset-compare.js.map +1 -0
- package/dist/health/ruleset-config-checks.d.ts +66 -0
- package/dist/health/ruleset-config-checks.d.ts.map +1 -0
- package/dist/health/ruleset-config-checks.js +190 -0
- package/dist/health/ruleset-config-checks.js.map +1 -0
- package/dist/health/ruleset-expected.d.ts +39 -0
- package/dist/health/ruleset-expected.d.ts.map +1 -0
- package/dist/health/ruleset-expected.js +181 -0
- package/dist/health/ruleset-expected.js.map +1 -0
- package/dist/health/ruleset-gh.d.ts +85 -0
- package/dist/health/ruleset-gh.d.ts.map +1 -0
- package/dist/health/ruleset-gh.js +177 -0
- package/dist/health/ruleset-gh.js.map +1 -0
- package/dist/health/ruleset-inspection.d.ts +13 -117
- package/dist/health/ruleset-inspection.d.ts.map +1 -1
- package/dist/health/ruleset-inspection.js +8 -738
- package/dist/health/ruleset-inspection.js.map +1 -1
- package/dist/health/ruleset-normalize.d.ts +32 -0
- package/dist/health/ruleset-normalize.d.ts.map +1 -0
- package/dist/health/ruleset-normalize.js +160 -0
- package/dist/health/ruleset-normalize.js.map +1 -0
- package/dist/health/template-compose.d.ts +9 -0
- package/dist/health/template-compose.d.ts.map +1 -0
- package/dist/health/template-compose.js +105 -0
- package/dist/health/template-compose.js.map +1 -0
- package/dist/health/template-inspection.d.ts +5 -52
- package/dist/health/template-inspection.d.ts.map +1 -1
- package/dist/health/template-inspection.js +13 -435
- package/dist/health/template-inspection.js.map +1 -1
- package/dist/health/template-plan.d.ts +33 -0
- package/dist/health/template-plan.d.ts.map +1 -0
- package/dist/health/template-plan.js +154 -0
- package/dist/health/template-plan.js.map +1 -0
- package/dist/health/template-shape.d.ts +19 -0
- package/dist/health/template-shape.d.ts.map +1 -0
- package/dist/health/template-shape.js +122 -0
- package/dist/health/template-shape.js.map +1 -0
- package/dist/health/workflow-excerpt.d.ts +15 -0
- package/dist/health/workflow-excerpt.d.ts.map +1 -0
- package/dist/health/workflow-excerpt.js +88 -0
- package/dist/health/workflow-excerpt.js.map +1 -0
- package/dist/health/workflow-inputs-inspection.d.ts +16 -0
- package/dist/health/workflow-inputs-inspection.d.ts.map +1 -0
- package/dist/health/workflow-inputs-inspection.js +116 -0
- package/dist/health/workflow-inputs-inspection.js.map +1 -0
- package/dist/opencode/plugin-templates/block-managed-file-edits.sh +201 -20
- package/dist/standards/capture.d.ts.map +1 -1
- package/dist/standards/capture.js +73 -25
- package/dist/standards/capture.js.map +1 -1
- package/dist/standards/contract.d.ts.map +1 -1
- package/dist/standards/contract.js +26 -9
- package/dist/standards/contract.js.map +1 -1
- package/dist/standards/git-state.d.ts.map +1 -1
- package/dist/standards/git-state.js +2 -2
- package/dist/standards/git-state.js.map +1 -1
- package/dist/standards/registry-checks.d.ts +34 -0
- package/dist/standards/registry-checks.d.ts.map +1 -0
- package/dist/standards/registry-checks.js +137 -0
- package/dist/standards/registry-checks.js.map +1 -0
- package/dist/standards/registry.d.ts +3 -13
- package/dist/standards/registry.d.ts.map +1 -1
- package/dist/standards/registry.js +105 -194
- package/dist/standards/registry.js.map +1 -1
- package/dist/standards/storage.js +8 -10
- package/dist/standards/storage.js.map +1 -1
- package/dist/strategies/deduplicate-arrays.d.ts +18 -0
- package/dist/strategies/deduplicate-arrays.d.ts.map +1 -0
- package/dist/strategies/deduplicate-arrays.js +25 -0
- package/dist/strategies/deduplicate-arrays.js.map +1 -0
- package/dist/strategies/package-lisa-detect.d.ts +10 -0
- package/dist/strategies/package-lisa-detect.d.ts.map +1 -0
- package/dist/strategies/package-lisa-detect.js +178 -0
- package/dist/strategies/package-lisa-detect.js.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts +16 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.js +37 -0
- package/dist/strategies/package-lisa-direct-floors.js.map +1 -0
- package/dist/strategies/package-lisa-host-pins.d.ts +43 -0
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -0
- package/dist/strategies/package-lisa-host-pins.js +254 -0
- package/dist/strategies/package-lisa-host-pins.js.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts +59 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.js +234 -0
- package/dist/strategies/package-lisa-manifest-guards.js.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts +34 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.js +106 -0
- package/dist/strategies/package-lisa-pin-alignment.js.map +1 -0
- package/dist/strategies/package-lisa-script-notes.d.ts +19 -0
- package/dist/strategies/package-lisa-script-notes.d.ts.map +1 -0
- package/dist/strategies/package-lisa-script-notes.js +145 -0
- package/dist/strategies/package-lisa-script-notes.js.map +1 -0
- package/dist/strategies/package-lisa-template-apply.d.ts +53 -0
- package/dist/strategies/package-lisa-template-apply.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-apply.js +216 -0
- package/dist/strategies/package-lisa-template-apply.js.map +1 -0
- package/dist/strategies/package-lisa-template-merge.d.ts +42 -0
- package/dist/strategies/package-lisa-template-merge.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-merge.js +202 -0
- package/dist/strategies/package-lisa-template-merge.js.map +1 -0
- package/dist/strategies/package-lisa-types.d.ts +5 -0
- package/dist/strategies/package-lisa-types.d.ts.map +1 -1
- package/dist/strategies/package-lisa.d.ts +1 -195
- package/dist/strategies/package-lisa.d.ts.map +1 -1
- package/dist/strategies/package-lisa.js +27 -1333
- package/dist/strategies/package-lisa.js.map +1 -1
- package/dist/strategies/tagged-merge-sections.d.ts +68 -0
- package/dist/strategies/tagged-merge-sections.d.ts.map +1 -0
- package/dist/strategies/tagged-merge-sections.js +113 -0
- package/dist/strategies/tagged-merge-sections.js.map +1 -0
- package/dist/strategies/tagged-merge.d.ts +1 -90
- package/dist/strategies/tagged-merge.d.ts.map +1 -1
- package/dist/strategies/tagged-merge.js +19 -190
- package/dist/strategies/tagged-merge.js.map +1 -1
- package/dist/utils/bounded-stream.d.ts +30 -0
- package/dist/utils/bounded-stream.d.ts.map +1 -0
- package/dist/utils/bounded-stream.js +63 -0
- package/dist/utils/bounded-stream.js.map +1 -0
- package/dist/utils/fibonacci.d.ts +3 -3
- package/dist/utils/fibonacci.d.ts.map +1 -1
- package/dist/utils/fibonacci.js +48 -10
- package/dist/utils/fibonacci.js.map +1 -1
- package/dist/utils/memo.d.ts +25 -0
- package/dist/utils/memo.d.ts.map +1 -0
- package/dist/utils/memo.js +32 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
- package/dist/utils/postinstall-trampoline.js +3 -20
- package/dist/utils/postinstall-trampoline.js.map +1 -1
- package/dist/utils/process-environment.d.ts +42 -0
- package/dist/utils/process-environment.d.ts.map +1 -0
- package/dist/utils/process-environment.js +52 -0
- package/dist/utils/process-environment.js.map +1 -0
- package/dist/utils/resolve-executable.d.ts +89 -0
- package/dist/utils/resolve-executable.d.ts.map +1 -0
- package/dist/utils/resolve-executable.js +224 -0
- package/dist/utils/resolve-executable.js.map +1 -0
- package/dist/utils/shell-command-line.d.ts +9 -0
- package/dist/utils/shell-command-line.d.ts.map +1 -0
- package/dist/utils/shell-command-line.js +43 -0
- package/dist/utils/shell-command-line.js.map +1 -0
- package/dist/utils/usage-accounting-totals.d.ts +19 -0
- package/dist/utils/usage-accounting-totals.d.ts.map +1 -0
- package/dist/utils/usage-accounting-totals.js +145 -0
- package/dist/utils/usage-accounting-totals.js.map +1 -0
- package/dist/utils/usage-accounting.d.ts +2 -14
- package/dist/utils/usage-accounting.d.ts.map +1 -1
- package/dist/utils/usage-accounting.js +2 -169
- package/dist/utils/usage-accounting.js.map +1 -1
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js +213 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-valid.test.js +251 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-violations.test.js +222 -0
- package/eslint-plugin-code-organization/__tests__/statement-order-tester.js +42 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +6 -8
- package/expo/copy-overwrite/jest.setup.ts +11 -10
- package/expo/create-only/scripts/zap-baseline.sh +6 -18
- package/harper-fabric/create-only/scripts/zap-baseline.sh +7 -9
- package/nestjs/create-only/scripts/zap-baseline.sh +6 -7
- package/package.json +5 -5
- package/phaser/copy-overwrite/.husky/pre-push.verify +2 -0
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/lisa/hooks/track-plan-sessions.sh +7 -131
- package/plugins/lisa/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-agy/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-copilot/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-copilot/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-copilot/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-cursor/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-cursor/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-cursor/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-devin/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-devin/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-devin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/.codex-plugin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-agy/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-copilot/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-cursor/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-devin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-copilot/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-cursor/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-devin/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/.codex-plugin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-agy/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-copilot/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-cursor/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-devin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-devin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-copilot/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-cursor/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-cursor/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-devin/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-cursor/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/src/base/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/src/base/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/src/base/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/src/base/hooks/track-plan-sessions.sh +7 -131
- package/plugins/src/base/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/src/base/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/src/harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/src/nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/src/nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/src/nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/src/rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/src/rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/src/typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/src/typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/scripts/build-plugins.sh +1 -1
- package/scripts/check-derived-artifacts.mjs +2 -2
- package/scripts/check-generated-artifact-merge-coverage.mjs +45 -4
- package/scripts/check-orphan-test-processes.mjs +0 -1
- package/scripts/check-self-dependency-pin.mjs +0 -2
- package/scripts/claude-remote-setup.sh +12 -7
- package/scripts/cleanup-amplify-branches.sh +0 -1
- package/scripts/generate-export-surface.mjs +131 -61
- package/scripts/generate-lisa-owned-hash-ledger.mjs +87 -102
- package/scripts/generate-upstream-evidence-manifest.mjs +56 -49
- package/scripts/github-status-check.sh +5 -25
- package/scripts/install-claude-plugins.sh +10 -8
- package/scripts/lib/merge-generated-json.mjs +274 -0
- package/scripts/lib/upstream-manifest-staleness.mjs +38 -34
- package/scripts/lib/upstream-public-commits.mjs +35 -18
- package/scripts/lisa-commit-and-pr-local.sh +1 -1
- package/scripts/lisa-enforcement-fallback.sh +31 -32
- package/scripts/lisa-github-environments.sh +5 -1
- package/scripts/lisa-github-repo-settings.sh +5 -1
- package/scripts/lisa-github-repo-setup.sh +1 -2
- package/scripts/lisa-github-rulesets.sh +8 -8
- package/scripts/lisa-remote-env/session-start.sh +18 -5
- package/scripts/lisa-rollback-release.mjs +0 -2
- package/scripts/lisa-update-local.sh +1 -1
- package/scripts/merge-generated-artifact.mjs +18 -6
- package/scripts/raise-self-dependency-pin.mjs +0 -2
- package/scripts/run-artifact-checks.mjs +1 -1
- package/scripts/verify-packed-learnings-contract.mjs +36 -3
- package/scripts/verify-self-pin-raise.mjs +0 -2
- package/typescript/copy-contents/.husky/commit-msg +8 -2
- package/typescript/copy-contents/.husky/post-checkout +2 -0
- package/typescript/copy-contents/.husky/post-merge +2 -0
- package/typescript/copy-contents/.husky/pre-commit +10 -3
- package/typescript/copy-contents/.husky/pre-push +29 -16
- package/typescript/copy-contents/.husky/prepare-commit-msg +2 -0
- package/typescript/create-only/.husky/pre-push.local +2 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +0 -643
package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
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
|
+
* Tests for enforce-statement-order: React and arrow-function violations.
|
|
8
|
+
*/
|
|
9
|
+
const {
|
|
10
|
+
DEFINITIONS,
|
|
11
|
+
SIDE_EFFECTS,
|
|
12
|
+
rule,
|
|
13
|
+
ruleTester,
|
|
14
|
+
} = require("./statement-order-tester");
|
|
15
|
+
|
|
16
|
+
ruleTester.run("enforce-statement-order", rule, {
|
|
17
|
+
valid: [],
|
|
18
|
+
|
|
19
|
+
invalid: [
|
|
20
|
+
// ===== REACT VIOLATIONS =====
|
|
21
|
+
|
|
22
|
+
// Variable after useEffect
|
|
23
|
+
{
|
|
24
|
+
code: `
|
|
25
|
+
const useExample = () => {
|
|
26
|
+
useEffect(() => {}, []);
|
|
27
|
+
const data = useMemo(() => [], []);
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
`,
|
|
31
|
+
errors: [
|
|
32
|
+
{
|
|
33
|
+
messageId: "wrongOrder",
|
|
34
|
+
data: {
|
|
35
|
+
current: DEFINITIONS,
|
|
36
|
+
previous: SIDE_EFFECTS,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// useCallback after useEffect
|
|
43
|
+
{
|
|
44
|
+
code: `
|
|
45
|
+
const MyComponent = () => {
|
|
46
|
+
const [state, setState] = useState(null);
|
|
47
|
+
useEffect(() => {}, []);
|
|
48
|
+
const handleClick = useCallback(() => {}, []);
|
|
49
|
+
return <div />;
|
|
50
|
+
};
|
|
51
|
+
`,
|
|
52
|
+
errors: [
|
|
53
|
+
{
|
|
54
|
+
messageId: "wrongOrder",
|
|
55
|
+
data: {
|
|
56
|
+
current: DEFINITIONS,
|
|
57
|
+
previous: SIDE_EFFECTS,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
// Function declaration after side effect
|
|
64
|
+
{
|
|
65
|
+
code: `
|
|
66
|
+
function MyComponent() {
|
|
67
|
+
useEffect(() => {}, []);
|
|
68
|
+
function handleClick() {}
|
|
69
|
+
return <div />;
|
|
70
|
+
}
|
|
71
|
+
`,
|
|
72
|
+
errors: [
|
|
73
|
+
{
|
|
74
|
+
messageId: "wrongOrder",
|
|
75
|
+
data: {
|
|
76
|
+
current: DEFINITIONS,
|
|
77
|
+
previous: SIDE_EFFECTS,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// ===== ARROW FUNCTION VIOLATIONS =====
|
|
84
|
+
|
|
85
|
+
// Arrow function with side effect before definition
|
|
86
|
+
{
|
|
87
|
+
code: `
|
|
88
|
+
const process = () => {
|
|
89
|
+
initialize();
|
|
90
|
+
const config = getConfig();
|
|
91
|
+
return config;
|
|
92
|
+
};
|
|
93
|
+
`,
|
|
94
|
+
errors: [
|
|
95
|
+
{
|
|
96
|
+
messageId: "wrongOrder",
|
|
97
|
+
data: {
|
|
98
|
+
current: DEFINITIONS,
|
|
99
|
+
previous: SIDE_EFFECTS,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
// Class method with side effect before definition
|
|
106
|
+
{
|
|
107
|
+
code: `
|
|
108
|
+
class Processor {
|
|
109
|
+
run() {
|
|
110
|
+
initialize();
|
|
111
|
+
const config = getConfig();
|
|
112
|
+
return config;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`,
|
|
116
|
+
errors: [
|
|
117
|
+
{
|
|
118
|
+
messageId: "wrongOrder",
|
|
119
|
+
data: {
|
|
120
|
+
current: DEFINITIONS,
|
|
121
|
+
previous: SIDE_EFFECTS,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
// super() neutrality must not mask real violations: a definition after a
|
|
128
|
+
// genuine side effect inside a derived constructor is still flagged
|
|
129
|
+
{
|
|
130
|
+
code: `
|
|
131
|
+
class NetworkStage extends Stage {
|
|
132
|
+
constructor(scope, id, props) {
|
|
133
|
+
super(scope, id, props);
|
|
134
|
+
configureNetwork(props);
|
|
135
|
+
const environment = props.environment;
|
|
136
|
+
this.environment = environment;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`,
|
|
140
|
+
errors: [
|
|
141
|
+
{
|
|
142
|
+
messageId: "wrongOrder",
|
|
143
|
+
data: {
|
|
144
|
+
current: DEFINITIONS,
|
|
145
|
+
previous: SIDE_EFFECTS,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
// Object method with side effect before definition
|
|
152
|
+
{
|
|
153
|
+
code: `
|
|
154
|
+
const processor = {
|
|
155
|
+
run() {
|
|
156
|
+
initialize();
|
|
157
|
+
const config = getConfig();
|
|
158
|
+
return config;
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
`,
|
|
162
|
+
errors: [
|
|
163
|
+
{
|
|
164
|
+
messageId: "wrongOrder",
|
|
165
|
+
data: {
|
|
166
|
+
current: DEFINITIONS,
|
|
167
|
+
previous: SIDE_EFFECTS,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
// Callback body with side effect before definition
|
|
174
|
+
{
|
|
175
|
+
code: `
|
|
176
|
+
items.map(item => {
|
|
177
|
+
track(item);
|
|
178
|
+
const label = item.label;
|
|
179
|
+
return label;
|
|
180
|
+
});
|
|
181
|
+
`,
|
|
182
|
+
errors: [
|
|
183
|
+
{
|
|
184
|
+
messageId: "wrongOrder",
|
|
185
|
+
data: {
|
|
186
|
+
current: DEFINITIONS,
|
|
187
|
+
previous: SIDE_EFFECTS,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
// Default-exported arrow function with side effect before definition
|
|
194
|
+
{
|
|
195
|
+
code: `
|
|
196
|
+
export default () => {
|
|
197
|
+
initialize();
|
|
198
|
+
const config = getConfig();
|
|
199
|
+
return config;
|
|
200
|
+
};
|
|
201
|
+
`,
|
|
202
|
+
errors: [
|
|
203
|
+
{
|
|
204
|
+
messageId: "wrongOrder",
|
|
205
|
+
data: {
|
|
206
|
+
current: DEFINITIONS,
|
|
207
|
+
previous: SIDE_EFFECTS,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
});
|
|
@@ -0,0 +1,251 @@
|
|
|
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
|
+
* Tests for enforce-statement-order: code in the expected order.
|
|
8
|
+
*/
|
|
9
|
+
const { rule, ruleTester } = require("./statement-order-tester");
|
|
10
|
+
|
|
11
|
+
ruleTester.run("enforce-statement-order", rule, {
|
|
12
|
+
valid: [
|
|
13
|
+
// ===== BASIC PATTERNS =====
|
|
14
|
+
|
|
15
|
+
// Correct order: definitions → side effects → return
|
|
16
|
+
{
|
|
17
|
+
code: `
|
|
18
|
+
function example() {
|
|
19
|
+
const x = 1;
|
|
20
|
+
doSomething();
|
|
21
|
+
return x;
|
|
22
|
+
}
|
|
23
|
+
`,
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
// Definitions only (no side effects)
|
|
27
|
+
{
|
|
28
|
+
code: `
|
|
29
|
+
function example() {
|
|
30
|
+
const x = 1;
|
|
31
|
+
const y = 2;
|
|
32
|
+
return x + y;
|
|
33
|
+
}
|
|
34
|
+
`,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// Multiple side effects in correct position
|
|
38
|
+
{
|
|
39
|
+
code: `
|
|
40
|
+
function example() {
|
|
41
|
+
const x = 1;
|
|
42
|
+
doSomething();
|
|
43
|
+
doSomethingElse();
|
|
44
|
+
logger.info("done");
|
|
45
|
+
return x;
|
|
46
|
+
}
|
|
47
|
+
`,
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// Function declaration followed by side effect
|
|
51
|
+
{
|
|
52
|
+
code: `
|
|
53
|
+
function example() {
|
|
54
|
+
const x = 1;
|
|
55
|
+
function helper() {}
|
|
56
|
+
doSomething();
|
|
57
|
+
return x;
|
|
58
|
+
}
|
|
59
|
+
`,
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// No return statement (void function)
|
|
63
|
+
{
|
|
64
|
+
code: `
|
|
65
|
+
function example() {
|
|
66
|
+
const x = 1;
|
|
67
|
+
doSomething();
|
|
68
|
+
}
|
|
69
|
+
`,
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
// Only side effects (no definitions, no return)
|
|
73
|
+
{
|
|
74
|
+
code: `
|
|
75
|
+
function example() {
|
|
76
|
+
doSomething();
|
|
77
|
+
doSomethingElse();
|
|
78
|
+
}
|
|
79
|
+
`,
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
// ===== REACT PATTERNS =====
|
|
83
|
+
|
|
84
|
+
// React hook with correct order
|
|
85
|
+
{
|
|
86
|
+
code: `
|
|
87
|
+
const useExample = () => {
|
|
88
|
+
const [state, setState] = useState(null);
|
|
89
|
+
const data = useMemo(() => [], []);
|
|
90
|
+
const handleClick = useCallback(() => {}, []);
|
|
91
|
+
|
|
92
|
+
useEffect(() => {}, []);
|
|
93
|
+
|
|
94
|
+
return data;
|
|
95
|
+
};
|
|
96
|
+
`,
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// React component with correct order
|
|
100
|
+
{
|
|
101
|
+
code: `
|
|
102
|
+
const MyComponent = () => {
|
|
103
|
+
const [state, setState] = useState(null);
|
|
104
|
+
const data = useMemo(() => [], []);
|
|
105
|
+
|
|
106
|
+
useEffect(() => {}, []);
|
|
107
|
+
logRender();
|
|
108
|
+
|
|
109
|
+
return <div>{data}</div>;
|
|
110
|
+
};
|
|
111
|
+
`,
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
// React component function declaration
|
|
115
|
+
{
|
|
116
|
+
code: `
|
|
117
|
+
function MyComponent() {
|
|
118
|
+
const [state, setState] = useState(null);
|
|
119
|
+
const handleClick = useCallback(() => {}, []);
|
|
120
|
+
|
|
121
|
+
useEffect(() => {}, []);
|
|
122
|
+
|
|
123
|
+
return <div />;
|
|
124
|
+
}
|
|
125
|
+
`,
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
// Early return pattern after side effects is valid
|
|
129
|
+
{
|
|
130
|
+
code: `
|
|
131
|
+
const MyComponent = () => {
|
|
132
|
+
const [loading, setLoading] = useState(true);
|
|
133
|
+
|
|
134
|
+
useEffect(() => {}, []);
|
|
135
|
+
|
|
136
|
+
if (loading) return null;
|
|
137
|
+
|
|
138
|
+
return <div />;
|
|
139
|
+
};
|
|
140
|
+
`,
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
// Early return with block statement after side effects
|
|
144
|
+
{
|
|
145
|
+
code: `
|
|
146
|
+
const MyComponent = () => {
|
|
147
|
+
const data = useMemo(() => [], []);
|
|
148
|
+
|
|
149
|
+
useEffect(() => {}, []);
|
|
150
|
+
|
|
151
|
+
if (!data) {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return <div />;
|
|
156
|
+
};
|
|
157
|
+
`,
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
// ===== ARROW FUNCTIONS =====
|
|
161
|
+
|
|
162
|
+
// Arrow function with correct order
|
|
163
|
+
{
|
|
164
|
+
code: `
|
|
165
|
+
const process = () => {
|
|
166
|
+
const config = getConfig();
|
|
167
|
+
initialize();
|
|
168
|
+
return config;
|
|
169
|
+
};
|
|
170
|
+
`,
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
// ===== EDGE CASES =====
|
|
174
|
+
|
|
175
|
+
// Empty function
|
|
176
|
+
{
|
|
177
|
+
code: `
|
|
178
|
+
function empty() {}
|
|
179
|
+
`,
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// Only return
|
|
183
|
+
{
|
|
184
|
+
code: `
|
|
185
|
+
function getValue() {
|
|
186
|
+
return 42;
|
|
187
|
+
}
|
|
188
|
+
`,
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
// Nested functions are checked independently
|
|
192
|
+
{
|
|
193
|
+
code: `
|
|
194
|
+
function outer() {
|
|
195
|
+
const x = 1;
|
|
196
|
+
const inner = () => {
|
|
197
|
+
const y = 2;
|
|
198
|
+
doSomething();
|
|
199
|
+
return y;
|
|
200
|
+
};
|
|
201
|
+
doSomething();
|
|
202
|
+
return x;
|
|
203
|
+
}
|
|
204
|
+
`,
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
// Compatibility mode preserves the legacy variable/function-declaration scan
|
|
208
|
+
{
|
|
209
|
+
code: `
|
|
210
|
+
class Processor {
|
|
211
|
+
run() {
|
|
212
|
+
initialize();
|
|
213
|
+
const config = getConfig();
|
|
214
|
+
return config;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`,
|
|
218
|
+
options: [{ checkAllFunctionBodies: false }],
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
// super() is a language-mandated prologue, not a side effect: definitions
|
|
222
|
+
// after it must not be flagged (derived constructors cannot avoid this)
|
|
223
|
+
{
|
|
224
|
+
code: `
|
|
225
|
+
class NetworkStage extends Stage {
|
|
226
|
+
constructor(scope, id, props) {
|
|
227
|
+
super(scope, id, props);
|
|
228
|
+
const environment = props.environment;
|
|
229
|
+
const natGatewayCount = environment === "production" ? 3 : 1;
|
|
230
|
+
configureNetwork(environment, natGatewayCount);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
`,
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
// super() alone with only definitions after it
|
|
237
|
+
{
|
|
238
|
+
code: `
|
|
239
|
+
class Widget extends Base {
|
|
240
|
+
constructor(options) {
|
|
241
|
+
super(options);
|
|
242
|
+
const name = options.name;
|
|
243
|
+
this.name = name;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
`,
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
|
|
250
|
+
invalid: [],
|
|
251
|
+
});
|
|
@@ -0,0 +1,222 @@
|
|
|
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
|
+
* Tests for enforce-statement-order: basic and non-React violations.
|
|
8
|
+
*/
|
|
9
|
+
const {
|
|
10
|
+
DEFINITIONS,
|
|
11
|
+
RETURN_STATEMENT,
|
|
12
|
+
SIDE_EFFECTS,
|
|
13
|
+
rule,
|
|
14
|
+
ruleTester,
|
|
15
|
+
} = require("./statement-order-tester");
|
|
16
|
+
|
|
17
|
+
ruleTester.run("enforce-statement-order", rule, {
|
|
18
|
+
valid: [],
|
|
19
|
+
|
|
20
|
+
invalid: [
|
|
21
|
+
// ===== BASIC VIOLATIONS =====
|
|
22
|
+
|
|
23
|
+
// The order is checked against the highest one seen, not the previous
|
|
24
|
+
// statement: a definition after the return does not reset the order, so a
|
|
25
|
+
// side effect after that definition is still out of place.
|
|
26
|
+
{
|
|
27
|
+
code: `
|
|
28
|
+
function example() {
|
|
29
|
+
const x = 1;
|
|
30
|
+
return x;
|
|
31
|
+
const y = 2;
|
|
32
|
+
doSomething(y);
|
|
33
|
+
}
|
|
34
|
+
`,
|
|
35
|
+
errors: [
|
|
36
|
+
{
|
|
37
|
+
messageId: "wrongOrder",
|
|
38
|
+
data: {
|
|
39
|
+
current: DEFINITIONS,
|
|
40
|
+
previous: RETURN_STATEMENT,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
messageId: "wrongOrder",
|
|
45
|
+
data: {
|
|
46
|
+
current: SIDE_EFFECTS,
|
|
47
|
+
previous: RETURN_STATEMENT,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
// Definition after side effect
|
|
54
|
+
{
|
|
55
|
+
code: `
|
|
56
|
+
function example() {
|
|
57
|
+
doSomething();
|
|
58
|
+
const x = 1;
|
|
59
|
+
return x;
|
|
60
|
+
}
|
|
61
|
+
`,
|
|
62
|
+
errors: [
|
|
63
|
+
{
|
|
64
|
+
messageId: "wrongOrder",
|
|
65
|
+
data: {
|
|
66
|
+
current: DEFINITIONS,
|
|
67
|
+
previous: SIDE_EFFECTS,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
// Side effect after return
|
|
74
|
+
{
|
|
75
|
+
code: `
|
|
76
|
+
function example() {
|
|
77
|
+
const x = 1;
|
|
78
|
+
return x;
|
|
79
|
+
doSomething();
|
|
80
|
+
}
|
|
81
|
+
`,
|
|
82
|
+
errors: [
|
|
83
|
+
{
|
|
84
|
+
messageId: "wrongOrder",
|
|
85
|
+
data: {
|
|
86
|
+
current: SIDE_EFFECTS,
|
|
87
|
+
previous: RETURN_STATEMENT,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// Definition after return
|
|
94
|
+
{
|
|
95
|
+
code: `
|
|
96
|
+
function example() {
|
|
97
|
+
return 1;
|
|
98
|
+
const x = 2;
|
|
99
|
+
}
|
|
100
|
+
`,
|
|
101
|
+
errors: [
|
|
102
|
+
{
|
|
103
|
+
messageId: "wrongOrder",
|
|
104
|
+
data: {
|
|
105
|
+
current: DEFINITIONS,
|
|
106
|
+
previous: RETURN_STATEMENT,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// Multiple violations
|
|
113
|
+
{
|
|
114
|
+
code: `
|
|
115
|
+
function example() {
|
|
116
|
+
doSomething();
|
|
117
|
+
const x = 1;
|
|
118
|
+
return x;
|
|
119
|
+
const y = 2;
|
|
120
|
+
}
|
|
121
|
+
`,
|
|
122
|
+
errors: [
|
|
123
|
+
{
|
|
124
|
+
messageId: "wrongOrder",
|
|
125
|
+
data: {
|
|
126
|
+
current: DEFINITIONS,
|
|
127
|
+
previous: SIDE_EFFECTS,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
messageId: "wrongOrder",
|
|
132
|
+
data: {
|
|
133
|
+
current: DEFINITIONS,
|
|
134
|
+
previous: RETURN_STATEMENT,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
// ===== NON-REACT VIOLATIONS =====
|
|
141
|
+
|
|
142
|
+
// Plain function call before definition
|
|
143
|
+
{
|
|
144
|
+
code: `
|
|
145
|
+
function process() {
|
|
146
|
+
initialize();
|
|
147
|
+
const config = {};
|
|
148
|
+
return config;
|
|
149
|
+
}
|
|
150
|
+
`,
|
|
151
|
+
errors: [
|
|
152
|
+
{
|
|
153
|
+
messageId: "wrongOrder",
|
|
154
|
+
data: {
|
|
155
|
+
current: DEFINITIONS,
|
|
156
|
+
previous: SIDE_EFFECTS,
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
// Logger call before definition
|
|
163
|
+
{
|
|
164
|
+
code: `
|
|
165
|
+
function getData() {
|
|
166
|
+
logger.info("fetching");
|
|
167
|
+
const data = fetch();
|
|
168
|
+
return data;
|
|
169
|
+
}
|
|
170
|
+
`,
|
|
171
|
+
errors: [
|
|
172
|
+
{
|
|
173
|
+
messageId: "wrongOrder",
|
|
174
|
+
data: {
|
|
175
|
+
current: DEFINITIONS,
|
|
176
|
+
previous: SIDE_EFFECTS,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// Awaited side effect before definition
|
|
183
|
+
{
|
|
184
|
+
code: `
|
|
185
|
+
async function loadData() {
|
|
186
|
+
await fetchData();
|
|
187
|
+
const data = [];
|
|
188
|
+
return data;
|
|
189
|
+
}
|
|
190
|
+
`,
|
|
191
|
+
errors: [
|
|
192
|
+
{
|
|
193
|
+
messageId: "wrongOrder",
|
|
194
|
+
data: {
|
|
195
|
+
current: DEFINITIONS,
|
|
196
|
+
previous: SIDE_EFFECTS,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
// Console.log before definition
|
|
203
|
+
{
|
|
204
|
+
code: `
|
|
205
|
+
function debug() {
|
|
206
|
+
console.log("starting");
|
|
207
|
+
const value = compute();
|
|
208
|
+
return value;
|
|
209
|
+
}
|
|
210
|
+
`,
|
|
211
|
+
errors: [
|
|
212
|
+
{
|
|
213
|
+
messageId: "wrongOrder",
|
|
214
|
+
data: {
|
|
215
|
+
current: DEFINITIONS,
|
|
216
|
+
previous: SIDE_EFFECTS,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
* Shared setup for the enforce-statement-order rule tests, which are split by
|
|
8
|
+
* concern across several files.
|
|
9
|
+
*
|
|
10
|
+
* Enforces the order: definitions → side effects → return
|
|
11
|
+
* 1. Definitions: const/let/var declarations, function declarations
|
|
12
|
+
* 2. Side effects: Expression statements that are function calls
|
|
13
|
+
* 3. Return statement
|
|
14
|
+
*/
|
|
15
|
+
const { RuleTester } = require("eslint");
|
|
16
|
+
|
|
17
|
+
const rule = require("../rules/enforce-statement-order");
|
|
18
|
+
|
|
19
|
+
/** Message data constants for test assertions */
|
|
20
|
+
const DEFINITIONS = "Definitions";
|
|
21
|
+
const SIDE_EFFECTS = "Side effects";
|
|
22
|
+
const RETURN_STATEMENT = "Return statement";
|
|
23
|
+
|
|
24
|
+
const ruleTester = new RuleTester({
|
|
25
|
+
languageOptions: {
|
|
26
|
+
ecmaVersion: 2020,
|
|
27
|
+
sourceType: "module",
|
|
28
|
+
parserOptions: {
|
|
29
|
+
ecmaFeatures: {
|
|
30
|
+
jsx: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
module.exports = {
|
|
37
|
+
DEFINITIONS,
|
|
38
|
+
RETURN_STATEMENT,
|
|
39
|
+
SIDE_EFFECTS,
|
|
40
|
+
rule,
|
|
41
|
+
ruleTester,
|
|
42
|
+
};
|