Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
import { RuleTester } from "oxlint/plugins-dev";
import { noManualTaggedConstructionRule } from "./no-manual-tagged-construction.ts";
new RuleTester().run(
"no-manual-tagged-construction",
noManualTaggedConstructionRule,
{
valid: [
'Match.when({ _tag: "Ready" }, handleReady);',
'Match.not({ "_tag": "Pending" });',
"Ready.make({ value });",
"new NotFound({ id });",
"({ _tag: tag, value });",
],
invalid: [
{
code: 'const value = { _tag: "Ready", payload };',
errors: [{ messageId: "manualConstruction" }],
},
{
code: 'const value = { ["_tag"]: "Ready" };',
errors: [{ messageId: "manualConstruction" }],
},
],
},
);