temporalio / temporalio/sdk-typescript
[Feature Request] Add lint rule that prevents Query handlers from mutating state
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 917
- Forks
- 224
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 43
Description
Is your feature request related to a problem? Please describe.
The only hole in TS's enforced determinism (besides intentionally escaping the vm) is mutating state in Query handlers.
Describe the solution you'd like
A lint rule that prevents mutations in Query handlers.
Additional context
From Roey:
https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-mutation.md
Unsure if there's a way to apply it to specific functions. May need to fork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced eslint-plugin-fp no-mutation rule and determine how Query handlers can be identified in the TypeScript SDK. Done means a lint rule prevents state mutation specifically within Query handlers, with the applicable behavior verified by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100