Skip to content

Add ARCCHR0006 for reactors that return commands without a replay decision - #76

Merged
woksin merged 6 commits into
mainfrom
feature/arcchr0006
Sep 26, 2026
Merged

woksin merged 6 commits into
mainfrom
feature/arcchr0006

Conversation

@woksin

@woksin woksin commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Arc for TypeScript 0.36.0 adds ARCCHR0006, the counterpart of the Arc for .NET analyzer that warns when a reactor executes a command without a replay decision. npm publication remains disabled.

Added

  • ARCCHR0006 in @cratis/eslint-plugin-arc-core's recommended-type-checked preset. It reports a Chronicle @reactor() event handler that returns an Arc @command() without a replay decision: @onceOnly() on the reactor or handler, or a @replay() handler for the same event. Replaying the reactor would otherwise execute the command again.
    • It follows async handlers, returned arrays and tuples, and helpers in the same class whose result the handler returns, including class-expression reactors.
    • It does not follow inherited or external helpers, handlers whose event parameter isn't typed as the event class, decorated classes that only come from .d.ts files, or commands executed manually through an Arc server. The ARCCHR0006 page lists these limits.

Changed

  • Projects that use recommended-type-checked can see new ARCCHR0006 diagnostics on reactors that return commands without @onceOnly() or @replay().
  • The code-analysis navigation lists the ARCCHR0003, ARCCHR0006, ARCCHR0007, ARCCHR0009, and ARCCHR0010 pages.

Refs #74

@woksin woksin added the minor New backward-compatible capabilities label Sep 26, 2026
@woksin woksin self-assigned this Sep 26, 2026
@woksin
woksin merged commit 834c7bd into main Sep 26, 2026
3 checks passed
@cratis-direct
cratis-direct Bot deleted the feature/arcchr0006 branch September 26, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New backward-compatible capabilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant