Skip to content

rulvar API reference


rulvar API reference / @rulvar/planner / lintScript

Function: lintScript()

ts
function lintScript(source): {
  diagnostics: PlanDiagnostic[];
  errors: PlanDiagnostic[];
  workflow?: CompiledWorkflow;
};

Defined in: packages/planner/src/plan.ts:69

Lints a script BODY with the workflows preset plus compileScript. The body is wrapped in an async function for parsing (top-level return/await are legal in the dialect); reported lines shift back so they index into the body source.

Parameters

ParameterType
sourcestring

Returns

ts
{
  diagnostics: PlanDiagnostic[];
  errors: PlanDiagnostic[];
  workflow?: CompiledWorkflow;
}
NameTypeDefined in
diagnosticsPlanDiagnostic[]packages/planner/src/plan.ts:70
errorsPlanDiagnostic[]packages/planner/src/plan.ts:71
workflow?CompiledWorkflowpackages/planner/src/plan.ts:72