@ai-digital-factory/eslint-plugin-state-flow
v0.2.0
Published
ESLint rules for State Flow flows.
Readme
State Flow consumer linting
Compile checks handler bindings and exhaustive outcome types. Consumers should also enable type-aware linting so asynchronous work is awaited or explicitly returned.
import { serviceConfig } from "@ai-digital-factory/eslint-plugin-state-flow/eslint.services.config.js";
export default serviceConfig({ tsconfigRootDir: import.meta.dirname });Handler packages use handlersConfig from eslint.handlers.config.js in the same way. Handlers cannot import runtime constructors: the application owns execution. Both require a tsconfig covering the selected files. The service configuration requires await using runtime = await createRuntime(...) or scoped withRuntime ownership and prevents imports of legacy execution constructors; reusable durable dispatchers and unrelated WebSocket send methods remain valid. Fire-and-forget work requires an explicit rejection handler; void alone does not satisfy promise observation.
The flow-authoring configuration remains available from eslint.flows.config.js. Run lint alongside build and typecheck in CI; compile-time types alone do not enforce promise observation or authorization policy.
state-flow/managed-runtime checks standalone runtime creation through resolved signatures, including import aliases and namespace imports. It requires an await using binding so asynchronous disposal runs when the scope exits. Framework lifecycle adapters that explicitly own shutdown can override this rule at that seam.
License
Proprietary software. All third-party use requires prior written permission from [email protected]. See LICENSE.
