Skip to content
Myr

Scaffold the fence: workspaces, tsgo diagnostics, oxlint with anti-slop, brand check

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- Bun 1.4.2 workspaces with a catalog, exact pins and a one-day release-age gate; Turborepo runs per-package typecheck and test. - tsconfig.base.json from Rat Stack's verified diagnostics map; outdatedApi, unstableApiUsage and experimentalApiUsage at error, with unstable APIs allowed per path through overrides. - oxlint (Ultracite core and vitest, type-aware) with anti-slop vendored at c44ef22, its Effect group, and bans on v3 and host-bound Effect imports. oxfmt leaves Markdown alone. - packages/brand holds the name and a leak scanner; scripts/brand.ts runs it over every file git would commit. packages/config holds the vitest preset. - `bun run verify`: lockfile check, lint and format, typecheck, test, brand:check. - MIT LICENSE, LICENSES/ and PROVENANCE.md. AGENTS.md marks import direction and git hooks as "No fence yet".

authored by oscabriel · committed by oscabriel · parent e100fdc · Browse files · 65 files+5618 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

65 files+5618 added−6 removed

  • tests:+68 added−0 removed
  • other:+5550 added−6 removed

65 files+5618 added−6 removed

added:LICENSES/anti-slop.MIT.txt+21 added
1MIT License23Copyright (c) 2026 Dillon Mulroy45Permission is hereby granted, free of charge, to any person obtaining a copy6of this software and associated documentation files (the "Software"), to deal7in the Software without restriction, including without limitation the rights8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9copies of the Software, and to permit persons to whom the Software is10furnished to do so, subject to the following conditions:1112The above copyright notice and this permission notice shall be included in all13copies or substantial portions of the Software.1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21SOFTWARE.
added:LICENSES/rat-stack.MIT.txt+21 added
1MIT License23Copyright (c) 2026 Joel Hooks45Permission is hereby granted, free of charge, to any person obtaining a copy6of this software and associated documentation files (the "Software"), to deal7in the Software without restriction, including without limitation the rights8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9copies of the Software, and to permit persons to whom the Software is10furnished to do so, subject to the following conditions:1112The above copyright notice and this permission notice shall be included in all13copies or substantial portions of the Software.1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21SOFTWARE.
added:packages/brand/src/index.ts+21 added
added:packages/brand/src/leaks.ts+52 added
added:packages/brand/test/leaks.test.ts+68 added
added:packages/brand/package.json+22 added
added:packages/brand/tsconfig.json+7 added
added:packages/brand/vitest.config.ts+1 added
added:packages/config/src/vitest.ts+8 added
1import { defineConfig } from "vitest/config";23/** The one vitest setup every package uses: tests live in `test/`, run in Node. */4export const preset = defineConfig({5 test: {6 include: ["test/**/*.test.ts"],7 },8});
added:packages/config/package.json+15 added
1{2 "name": "@repo/config",3 "private": true,4 "type": "module",5 "exports": {6 "./vitest": "./src/vitest.ts"7 },8 "scripts": {9 "typecheck": "tsc --noEmit -p tsconfig.json"10 },11 "devDependencies": {12 "typescript": "catalog:",13 "vitest": "catalog:"14 }15}
added:packages/config/tsconfig.json+7 added
1{2 "extends": "../../tsconfig.base.json",3 "compilerOptions": {4 "allowImportingTsExtensions": true5 },6 "include": ["src/**/*.ts", "test/**/*.ts", "*.config.ts"]7}
added:packages/config/vitest.config.ts+1 added
1export { preset as default } from "./src/vitest.ts";
added:scripts/brand.ts+64 added
1/**2 * brand:check: fails when any file git would commit spells the product's name3 * outside `packages/brand` and prose. Files come from git, so ignored files4 * (the closed `.env*` values among them) are never opened.5 */6import { BunRuntime, BunServices } from "@effect/platform-bun";7import { findLeaks } from "@repo/brand/leaks";8import { Console, Data, Effect, FileSystem, pipe } from "effect";9import { ChildProcess, ChildProcessSpawner } from "effect/process";1011class BrandLeaks extends Data.TaggedError("BrandLeaks")<{12 readonly count: number;13}> {}1415const listCommittable = Effect.gen(function* listCommittable() {16 const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;1718 const lines = yield* spawner.lines(19 ChildProcess.make("git", [20 "ls-files",21 "--cached",22 "--others",23 "--exclude-standard",24 "--deduplicate",25 ])26 );2728 return lines.filter((line) => line.length > 0);29});3031const check = Effect.gen(function* check() {32 const fs = yield* FileSystem.FileSystem;33 const paths = yield* listCommittable;3435 const files = yield* pipe(36 paths,37 Effect.forEach((path) =>38 fs.exists(path).pipe(39 Effect.flatMap((exists) =>40 exists ? fs.readFileString(path) : Effect.succeed("")41 ),42 Effect.map((content) => ({ content, path }))43 )44 )45 );4647 const leaks = findLeaks(files);4849 if (leaks.length === 0) {50 return yield* Console.log(`brand:check: ${files.length} files, no leaks`);51 }5253 for (const leak of leaks) {54 yield* Console.error(`${leak.path}:${leak.line}: ${leak.text}`);55 }5657 yield* Console.error(58 "brand:check: take the name from @repo/brand instead of spelling it."59 );6061 return yield* new BrandLeaks({ count: leaks.length });62});6364BunRuntime.runMain(check.pipe(Effect.provide(BunServices.layer)));
added:tools/oxlint/anti-slop/effect/rules/no-manual-effect-error-tag.ts+52 added
1import { defineRule } from "@oxlint/plugins";23import {4 isInsideBroadEffectHandler,5 isReasonTagMember,6 isTagMember,7 tagMemberFromComparison,8} from "../shared/tagged-values.ts";910export const noManualEffectErrorTagRule = defineRule({11 meta: {12 type: "problem",13 docs: {14 description:15 "Use Effect tagged error handlers instead of manually branching on `_tag` in a catch handler.",16 },17 messages: {18 tag: "Use Effect.catchTag or Effect.catchTags instead of manually discriminating a tagged error in a broad Effect catch handler.",19 reason:20 "Use Effect.catchReason or Effect.catchReasons instead of manually discriminating a tagged `reason` in a broad Effect catch handler.",21 },22 },23 createOnce(context) {24 return {25 BinaryExpression(node) {26 const tagMember = tagMemberFromComparison(node);27 if (28 tagMember === undefined ||29 !isInsideBroadEffectHandler(node)30 ) {31 return;32 }33 context.report({34 node,35 messageId: isReasonTagMember(tagMember) ? "reason" : "tag",36 });37 },38 SwitchStatement(node) {39 if (40 !isTagMember(node.discriminant) ||41 !isInsideBroadEffectHandler(node)42 ) {43 return;44 }45 context.report({46 node,47 messageId: isReasonTagMember(node.discriminant) ? "reason" : "tag",48 });49 },50 };51 },52});
added:tools/oxlint/anti-slop/effect/rules/no-manual-tag-comparison.ts+45 added
1import { defineRule } from "@oxlint/plugins";23import {4 isInsideBroadEffectHandler,5 isTagMember,6 tagMemberFromComparison,7} from "../shared/tagged-values.ts";89export const noManualTagComparisonRule = defineRule({10 meta: {11 type: "problem",12 docs: {13 description:14 "Use Effect Match or Predicate helpers instead of manually branching on `_tag`.",15 },16 messages: {17 manualComparison:18 "Use Match.tag/Match.tags for tagged-value branching, or Predicate.isTagged for a simple reusable predicate.",19 manualSwitch:20 "Use Match.value(value).pipe(Match.tag/Match.tags/Match.tagsExhaustive) or the tagged enum `$match` helper instead of switching on `_tag`.",21 },22 },23 createOnce(context) {24 return {25 BinaryExpression(node) {26 if (27 tagMemberFromComparison(node) === undefined ||28 isInsideBroadEffectHandler(node)29 ) {30 return;31 }32 context.report({ node, messageId: "manualComparison" });33 },34 SwitchStatement(node) {35 if (36 !isTagMember(node.discriminant) ||37 isInsideBroadEffectHandler(node)38 ) {39 return;40 }41 context.report({ node, messageId: "manualSwitch" });42 },43 };44 },45});
added:tools/oxlint/anti-slop/effect/rules/no-manual-tagged-construction.ts+37 added
1import { defineRule } from "@oxlint/plugins";23import {4 isMatchPatternObject,5 isStringLiteral,6 propertyName,7} from "../shared/tagged-values.ts";89export const noManualTaggedConstructionRule = defineRule({10 meta: {11 type: "problem",12 docs: {13 description:14 "Construct tagged values with their existing Effect constructor instead of writing `_tag` manually.",15 },16 messages: {17 manualConstruction:18 "Use the existing Schema tagged `.make`, tagged class/error constructor, or Data.taggedEnum variant constructor instead of writing a literal `_tag` object.",19 },20 },21 createOnce(context) {22 return {23 ObjectExpression(node) {24 if (isMatchPatternObject(node)) return;25 const tag = node.properties.find(26 (property) =>27 property.type === "Property" &&28 propertyName(property) === "_tag" &&29 isStringLiteral(property.value),30 );31 if (tag !== undefined) {32 context.report({ node: tag, messageId: "manualConstruction" });33 }34 },35 };36 },37});
added:tools/oxlint/anti-slop/effect/rules/no-service-constructor-imports.ts+52 added
1import { defineRule } from "@oxlint/plugins";23import type { ESTree } from "@oxlint/plugins";45const SERVICE_CONSTRUCTOR_NAME = /^make[A-Z]/u;6const TEST_FILE = /\.(?:test|spec)\.[cm]?[jt]sx?$/u;78function isProjectLocalImport(source: string): boolean {9 return source.startsWith("./") || source.startsWith("../");10}1112function getImportedName(specifier: ESTree.ImportSpecifier): string {13 if (specifier.imported.type === "Identifier") return specifier.imported.name;14 return specifier.imported.value;15}1617/** Keep dependency-bearing Effect service constructors local to their owning capability modules. */18export const noServiceConstructorImportsRule = defineRule({19 meta: {20 type: "problem",21 docs: {22 description:23 "Disallow project-local make<CapabilityName> imports outside test and spec files.",24 },25 messages: {26 serviceConstructorImport:27 'Do not import Effect service constructor "{{name}}" into runtime code. Import the owning Layer, yield the contextual service, and allow its requirements to propagate to the composition root.',28 },29 },30 create(context) {31 const isTestFile = TEST_FILE.test(context.filename.replaceAll("\\", "/"));3233 return {34 ImportDeclaration(node) {35 if (isTestFile || !isProjectLocalImport(node.source.value)) return;3637 for (const specifier of node.specifiers) {38 if (specifier.type !== "ImportSpecifier") continue;3940 const importedName = getImportedName(specifier);41 if (!SERVICE_CONSTRUCTOR_NAME.test(importedName)) continue;4243 context.report({44 node: specifier,45 messageId: "serviceConstructorImport",46 data: { name: importedName },47 });48 }49 },50 };51 },52});
added:tools/oxlint/anti-slop/effect/rules/prefer-effect-match.ts+54 added
1import { defineRule, type ESTree } from "@oxlint/plugins";23const equalityOperators = new Set(["==", "===", "!=", "!=="]);45export const preferEffectMatchRule = defineRule({6 meta: {7 type: "problem",8 docs: {9 description:10 "Use Match from Effect for chained literal ternaries over the same value.",11 },12 messages: {13 preferMatch:14 "Use Match from Effect instead of a chained literal ternary.",15 },16 },17 createOnce(context) {18 const isLiteral = (node: ESTree.Node): boolean =>19 node.type === "Literal" ||20 (node.type === "TemplateLiteral" && node.expressions.length === 0);2122 const comparedValue = (node: ESTree.Expression): string | undefined => {23 if (24 node.type !== "BinaryExpression" ||25 !equalityOperators.has(node.operator)26 ) {27 return undefined;28 }29 if (isLiteral(node.left)) return context.sourceCode.getText(node.right);30 if (isLiteral(node.right)) return context.sourceCode.getText(node.left);31 return undefined;32 };3334 return {35 ConditionalExpression(node) {36 if (node.parent?.type === "ConditionalExpression") return;37 const value = comparedValue(node.test);38 if (value === undefined) return;3940 let alternate = node.alternate;41 let literalChecks = 1;42 while (alternate.type === "ConditionalExpression") {43 if (comparedValue(alternate.test) !== value) return;44 literalChecks += 1;45 alternate = alternate.alternate;46 }4748 if (literalChecks > 1) {49 context.report({ node, messageId: "preferMatch" });50 }51 },52 };53 },54});
added:tools/oxlint/anti-slop/effect/shared/tagged-values.ts+97 added
1import type { ESTree } from "@oxlint/plugins";23const equalityOperators = new Set(["==", "===", "!=", "!=="]);4const broadEffectCatchMethods = new Set(["catch", "catchAll", "catchIf"]);56export const isStringLiteral = (7 node: ESTree.Node | null | undefined,8): node is ESTree.StringLiteral =>9 node?.type === "Literal" && typeof node.value === "string";1011export const isTagMember = (12 node: ESTree.Node | null | undefined,13): node is ESTree.MemberExpression =>14 node?.type === "MemberExpression" &&15 ((!node.computed &&16 node.property.type === "Identifier" &&17 node.property.name === "_tag") ||18 (node.computed &&19 isStringLiteral(node.property) &&20 node.property.value === "_tag"));2122export const tagMemberFromComparison = (23 node: ESTree.BinaryExpression,24): ESTree.MemberExpression | undefined => {25 if (!equalityOperators.has(node.operator)) return undefined;26 if (isTagMember(node.left) && isStringLiteral(node.right)) return node.left;27 if (isTagMember(node.right) && isStringLiteral(node.left)) return node.right;28 return undefined;29};3031const isBroadEffectCatchCall = (32 node: ESTree.Node | null | undefined,33): node is ESTree.CallExpression =>34 node?.type === "CallExpression" &&35 node.callee.type === "MemberExpression" &&36 node.callee.object.type === "Identifier" &&37 node.callee.object.name === "Effect" &&38 !node.callee.computed &&39 node.callee.property.type === "Identifier" &&40 broadEffectCatchMethods.has(node.callee.property.name);4142export const isInsideBroadEffectHandler = (node: ESTree.Node): boolean => {43 let current: ESTree.Node | null | undefined = node.parent;44 while (current !== null && current !== undefined) {45 if (46 current.type === "ArrowFunctionExpression" ||47 current.type === "FunctionExpression"48 ) {49 return (50 isBroadEffectCatchCall(current.parent) &&51 current.parent.arguments.includes(current)52 );53 }54 current = current.parent;55 }56 return false;57};5859export const isReasonTagMember = (node: ESTree.MemberExpression): boolean =>60 node.object.type === "MemberExpression" &&61 ((!node.object.computed &&62 node.object.property.type === "Identifier" &&63 node.object.property.name === "reason") ||64 (node.object.computed &&65 isStringLiteral(node.object.property) &&66 node.object.property.value === "reason"));6768export const propertyName = (69 property: ESTree.ObjectProperty,70): string | undefined => {71 if (!property.computed && property.key.type === "Identifier") {72 return property.key.name;73 }74 if (75 property.key.type === "Literal" &&76 typeof property.key.value === "string"77 ) {78 return property.key.value;79 }80 return undefined;81};8283export const isMatchPatternObject = (node: ESTree.ObjectExpression): boolean => {84 const call = node.parent;85 if (call?.type !== "CallExpression" || !call.arguments.includes(node)) {86 return false;87 }88 const callee = call.callee;89 return (90 callee.type === "MemberExpression" &&91 callee.object.type === "Identifier" &&92 callee.object.name === "Match" &&93 !callee.computed &&94 callee.property.type === "Identifier" &&95 (callee.property.name === "when" || callee.property.name === "not")96 );97};
added:tools/oxlint/anti-slop/effect/index.ts+21 added
1import { eslintCompatPlugin } from "@oxlint/plugins";23import { noManualEffectErrorTagRule } from "./rules/no-manual-effect-error-tag.ts";4import { noManualTagComparisonRule } from "./rules/no-manual-tag-comparison.ts";5import { noManualTaggedConstructionRule } from "./rules/no-manual-tagged-construction.ts";6import { noServiceConstructorImportsRule } from "./rules/no-service-constructor-imports.ts";7import { preferEffectMatchRule } from "./rules/prefer-effect-match.ts";89/** Opt-in Oxlint rules for Effect service and Layer architecture. */10const antiSlopEffectPlugin = eslintCompatPlugin({11 meta: { name: "anti-slop-effect" },12 rules: {13 "no-manual-effect-error-tag": noManualEffectErrorTagRule,14 "no-manual-tag-comparison": noManualTagComparisonRule,15 "no-manual-tagged-construction": noManualTaggedConstructionRule,16 "no-service-constructor-imports": noServiceConstructorImportsRule,17 "prefer-effect-match": preferEffectMatchRule,18 },19});2021export default antiSlopEffectPlugin;
added:tools/oxlint/anti-slop/rules/no-array-filter-map.ts+28 added
1import { defineRule } from "@oxlint/plugins";23import { arrayMethodTarget, isKnownArrayExpression, unwrapArrayExpression } from "../shared/array-method.ts";45/** Reject eager array filter/map pipelines; lazy iterator helpers remain allowed. */6export const noArrayFilterMapRule = defineRule({7 meta: {8 type: "suggestion",9 docs: { description: "Disallow adjacent array filter/map passes in favor of lazy iterator helpers or a single transformation." },10 messages: {11 arrayFilterMap: "Avoid consecutive array `{{first}}` and `{{second}}` passes. Prefer `.values().{{first}}(...).{{second}}(...).toArray()` where iterator helpers are supported, or a single `flatMap`/mutating reducer. Preserve callback ordering, indexes, and filtering semantics.",12 },13 },14 createOnce(context) {15 return {16 CallExpression(node) {17 const outer = arrayMethodTarget(node.callee);18 if (outer === null || (outer.name !== "map" && outer.name !== "filter")) return;19 const innerCall = unwrapArrayExpression(outer.object);20 if (innerCall.type !== "CallExpression") return;21 const inner = arrayMethodTarget(innerCall.callee);22 if (inner === null || inner.name !== (outer.name === "map" ? "filter" : "map")) return;23 if (!isKnownArrayExpression(context.sourceCode, inner.object)) return;24 context.report({ node, messageId: "arrayFilterMap", data: { first: inner.name, second: outer.name } });25 },26 };27 },28});
added:tools/oxlint/anti-slop/rules/no-chained-type-assertions.ts+77 added
1import { defineRule } from "@oxlint/plugins";2import type { ESTree } from "@oxlint/plugins";34type TypeAssertionExpression = ESTree.TSAsExpression | ESTree.TSTypeAssertion;56function isTypeAssertionExpression(node: ESTree.Node): node is TypeAssertionExpression {7 return node.type === "TSAsExpression" || node.type === "TSTypeAssertion";8}910function unwrapParenthesizedExpression(expression: ESTree.Expression): ESTree.Expression {11 let current = expression;12 while (current.type === "ParenthesizedExpression") {13 current = current.expression;14 }15 return current;16}1718function isConstAssertion(node: TypeAssertionExpression): boolean {19 const { typeAnnotation } = node;20 return (21 typeAnnotation.type === "TSTypeReference" &&22 typeAnnotation.typeName.type === "Identifier" &&23 typeAnnotation.typeName.name === "const"24 );25}2627function isOutermostAssertionInChain(node: TypeAssertionExpression): boolean {28 let current: ESTree.Expression = node;29 let parent = node.parent;3031 while (parent.type === "ParenthesizedExpression" && parent.expression === current) {32 current = parent;33 parent = parent.parent;34 }3536 return !isTypeAssertionExpression(parent) || parent.expression !== current;37}3839function isForbiddenAssertionChain(node: TypeAssertionExpression): boolean {40 let assertionCount = 0;41 let hasNonConstAssertion = false;42 let current: ESTree.Expression = node;4344 while (isTypeAssertionExpression(current)) {45 assertionCount += 1;46 hasNonConstAssertion ||= !isConstAssertion(current);47 current = unwrapParenthesizedExpression(current.expression);48 }4950 return assertionCount > 1 && hasNonConstAssertion;51}5253/** Disallow nested TypeScript type assertions, while permitting chains made only of const assertions. */54export const noChainedTypeAssertionsRule = defineRule({55 meta: {56 type: "problem",57 docs: {58 description:59 "Disallow chained TypeScript as and angle-bracket assertions, including parenthesized chains.",60 },61 messages: {62 chained:63 "This assertion chain discards type evidence. Keep the original precise type, or parse untrusted input at its boundary before narrowing it.",64 },65 },66 createOnce(context) {67 const checkTypeAssertion = (node: TypeAssertionExpression) => {68 if (!isOutermostAssertionInChain(node) || !isForbiddenAssertionChain(node)) return;69 context.report({ node, messageId: "chained" });70 };7172 return {73 TSAsExpression: checkTypeAssertion,74 TSTypeAssertion: checkTypeAssertion,75 };76 },77});
added:tools/oxlint/anti-slop/rules/no-conditional-empty-object-spread.ts+49 added
1import { defineRule } from "@oxlint/plugins";2import type { ESTree } from "@oxlint/plugins";34function unwrapParentheses(node: ESTree.Expression): ESTree.Expression {5 let current = node;6 while (current.type === "ParenthesizedExpression") {7 current = current.expression;8 }9 return current;10}1112function isEmptyObjectExpression(node: ESTree.Expression): boolean {13 return node.type === "ObjectExpression" && node.properties.length === 0;14}1516function isConditionalEmptyObjectSpread(node: ESTree.Expression): boolean {17 const conditional = unwrapParentheses(node);18 return (19 conditional.type === "ConditionalExpression" &&20 (isEmptyObjectExpression(conditional.consequent) ||21 isEmptyObjectExpression(conditional.alternate))22 );23}2425/** Ban conditional empty-object spreads without changing their omission semantics. */26export const noConditionalEmptyObjectSpreadRule = defineRule({27 meta: {28 type: "suggestion",29 docs: {30 description:31 "Disallow object spreads that conditionally spread an empty object to omit fields.",32 },33 messages: {34 avoid:35 "This conditional spread hides property omission behind an empty object. Build the object in separate statements and add the property only when present.",36 },37 },38 createOnce(context) {39 return {40 SpreadElement(node) {41 if (node.parent.type !== "ObjectExpression") return;4243 if (isConditionalEmptyObjectSpread(node.argument)) {44 context.report({ node, messageId: "avoid" });45 }46 },47 };48 },49});
added:tools/oxlint/anti-slop/rules/no-known-value-widening.ts+415 added
1import { defineRule } from "@oxlint/plugins";23import {4 classifyUnsafeDictionaryValue,5 classifyWideningTarget,6 createTypeEnvironment,7 isKnownEvidenceExpression,8 type TypeEnvironment,9 type WideningTarget,10} from "../shared/dictionary-types.ts";11import {12 containsUnknownType,13 functionParameterBindingName,14 functionParameterTypeAnnotation,15} from "../shared/function-parameters.ts";16import { resolveVariable } from "../shared/scope.ts";1718import type { ESTree, SourceCode, Variable } from "@oxlint/plugins";1920type FunctionExpression = ESTree.ArrowFunctionExpression | ESTree.Function;2122function unwrapExpression(expression: ESTree.Expression): ESTree.Expression {23 let current = expression;24 while (25 current.type === "ParenthesizedExpression" ||26 current.type === "TSAsExpression" ||27 current.type === "TSSatisfiesExpression" ||28 current.type === "TSTypeAssertion" ||29 current.type === "TSNonNullExpression"30 ) {31 current = current.expression;32 }33 return current;34}3536function variableDeclarator(variable: Variable): ESTree.VariableDeclarator | null {37 if (variable.defs.length !== 1) return null;38 const [definition] = variable.defs;39 return definition?.type === "Variable" && definition.node.type === "VariableDeclarator"40 ? definition.node41 : null;42}4344function isStableConstVariable(variable: Variable, declarator: ESTree.VariableDeclarator): boolean {45 return (46 declarator.parent.type === "VariableDeclaration" &&47 declarator.parent.kind === "const" &&48 variable.references.every((reference) => reference.init || !reference.isWrite())49 );50}5152function hasKnownEvidence(53 sourceCode: SourceCode,54 expression: ESTree.Expression,55 visitedVariables = new Set<Variable>(),56): boolean {57 if (isKnownEvidenceExpression(expression)) return true;58 const unwrapped = unwrapExpression(expression);59 if (unwrapped.type !== "Identifier") return false;60 const variable = resolveVariable(sourceCode, unwrapped);61 if (variable === null || visitedVariables.has(variable)) return false;62 const declarator = variableDeclarator(variable);63 if (64 declarator === null ||65 declarator.init === null ||66 !isStableConstVariable(variable, declarator)67 ) {68 return false;69 }70 visitedVariables.add(variable);71 return hasKnownEvidence(sourceCode, declarator.init, visitedVariables);72}7374function isFunctionExpression(node: ESTree.Node): node is FunctionExpression {75 return (76 node.type === "ArrowFunctionExpression" ||77 node.type === "FunctionDeclaration" ||78 node.type === "FunctionExpression" ||79 node.type === "TSDeclareFunction" ||80 node.type === "TSEmptyBodyFunctionExpression"81 );82}8384function localFunctionForCall(85 sourceCode: SourceCode,86 callee: ESTree.Expression,87): FunctionExpression | null {88 const unwrapped = unwrapExpression(callee);89 if (isFunctionExpression(unwrapped)) return unwrapped;90 if (unwrapped.type !== "Identifier") return null;91 const variable = resolveVariable(sourceCode, unwrapped);92 if (variable === null || variable.defs.length !== 1) return null;93 const [definition] = variable.defs;94 if (definition === undefined) return null;95 if (definition.type === "FunctionName" && isFunctionExpression(definition.node)) {96 return definition.node;97 }98 if (definition.type !== "Variable" || definition.node.type !== "VariableDeclarator") {99 return null;100 }101 const initializer = definition.node.init;102 if (initializer === null) return null;103 const unwrappedInitializer = unwrapExpression(initializer);104 return isFunctionExpression(unwrappedInitializer) ? unwrappedInitializer : null;105}106107function variableTypeAnnotation(108 sourceCode: SourceCode,109 variable: Variable,110): ESTree.TSTypeAnnotation | null {111 if (variable.defs.length !== 1) return null;112 const [definition] = variable.defs;113 if (definition === undefined) return null;114 if (115 definition.type === "Variable" &&116 definition.node.type === "VariableDeclarator" &&117 definition.node.id.type === "Identifier"118 ) {119 return definition.node.id.typeAnnotation ?? null;120 }121 if (definition.type !== "Parameter" || !isFunctionExpression(definition.node)) {122 return null;123 }124 const parameter = definition.node.params.find(125 (candidate) =>126 functionParameterBindingName(candidate, sourceCode) === variable.name,127 );128 return parameter === undefined ? null : (functionParameterTypeAnnotation(parameter) ?? null);129}130131function hasInformativeType(132 type: ESTree.TSType,133 environment: TypeEnvironment,134): boolean {135 return classifyUnsafeDictionaryValue(type, environment) === null;136}137138function hasKnownCallArgumentEvidence(139 sourceCode: SourceCode,140 expression: ESTree.Expression,141 environment: TypeEnvironment,142 visitedVariables = new Set<Variable>(),143): boolean {144 if (expression.type === "ParenthesizedExpression" || expression.type === "TSNonNullExpression") {145 return hasKnownCallArgumentEvidence(146 sourceCode,147 expression.expression,148 environment,149 visitedVariables,150 );151 }152 if (expression.type === "TSAsExpression" || expression.type === "TSTypeAssertion") {153 return hasInformativeType(expression.typeAnnotation, environment);154 }155 if (expression.type === "TSSatisfiesExpression") {156 return hasKnownCallArgumentEvidence(157 sourceCode,158 expression.expression,159 environment,160 visitedVariables,161 );162 }163 if (expression.type === "CallExpression") {164 const owner = localFunctionForCall(sourceCode, expression.callee);165 const returnType = owner?.returnType?.typeAnnotation;166 return returnType !== undefined && hasInformativeType(returnType, environment);167 }168 if (expression.type !== "Identifier") return isKnownEvidenceExpression(expression);169 const variable = resolveVariable(sourceCode, expression);170 if (variable === null || visitedVariables.has(variable)) return false;171 const annotation = variableTypeAnnotation(sourceCode, variable);172 if (annotation !== null) {173 return hasInformativeType(annotation.typeAnnotation, environment);174 }175 const declarator = variableDeclarator(variable);176 if (177 declarator === null ||178 declarator.init === null ||179 !isStableConstVariable(variable, declarator)180 ) {181 return false;182 }183 visitedVariables.add(variable);184 return hasKnownCallArgumentEvidence(185 sourceCode,186 declarator.init,187 environment,188 visitedVariables,189 );190}191192function typePredicateSubjectIndex(193 sourceCode: SourceCode,194 owner: FunctionExpression,195): number | null {196 const predicate = owner.returnType?.typeAnnotation;197 if (predicate?.type !== "TSTypePredicate" || predicate.parameterName.type !== "Identifier") {198 return null;199 }200 const predicateParameterName = predicate.parameterName.name;201 const index = owner.params.findIndex(202 (parameter) =>203 functionParameterBindingName(parameter, sourceCode) === predicateParameterName,204 );205 return index === -1 ? null : index;206}207208function annotationTarget(209 annotation: ESTree.TSTypeAnnotation | null | undefined,210 environment: TypeEnvironment,211): WideningTarget | null {212 return annotation === null || annotation === undefined213 ? null214 : classifyWideningTarget(annotation.typeAnnotation, environment);215}216217function enclosingFunction(node: ESTree.Node): FunctionExpression | null {218 let current: ESTree.Node | null = node.parent;219 while (current !== null && current.type !== "Program") {220 if (221 current.type === "ArrowFunctionExpression" ||222 current.type === "FunctionDeclaration" ||223 current.type === "FunctionExpression"224 ) {225 return current;226 }227 current = current.parent;228 }229 return null;230}231232function sourceKeyName(sourceCode: SourceCode, key: ESTree.PropertyKey): string {233 if (key.type === "Identifier" || key.type === "PrivateIdentifier") return key.name;234 if (key.type === "Literal") return String(key.value);235 return sourceCode.getText(key);236}237238function functionName(sourceCode: SourceCode, owner: FunctionExpression | null): string {239 if (owner === null) return "anonymous function";240 if (owner.id !== null) return owner.id.name;241 const parent = owner.parent;242 if (parent.type === "VariableDeclarator" && parent.id.type === "Identifier")243 return parent.id.name;244 if (parent.type === "MethodDefinition") return sourceKeyName(sourceCode, parent.key);245 return "anonymous function";246}247248function isEmptyObjectExpression(expression: ESTree.Expression): boolean {249 const unwrapped = unwrapExpression(expression);250 return unwrapped.type === "ObjectExpression" && unwrapped.properties.length === 0;251}252253function isDictionaryAccumulatorTarget(destination: WideningTarget): boolean {254 return destination.kind === "open dictionary" || destination.kind === "generic container";255}256257function hasParentAssertion(node: ESTree.Node): boolean {258 return node.parent?.type === "TSAsExpression" || node.parent?.type === "TSTypeAssertion";259}260261/** Detect sound syntactic cases where a known value is explicitly widened and loses evidence. */262export const noKnownValueWideningRule = defineRule({263 meta: {264 type: "problem",265 docs: {266 description:267 "Disallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.",268 },269 messages: {270 widening:271 "The explicit {{target}} type on {{subject}} discards known type evidence. Keep inference, validate with `satisfies`, or use a named owner contract.",272 },273 },274 createOnce(context) {275 let environment: TypeEnvironment | null = null;276277 const reportFlow = (278 expression: ESTree.Expression,279 destination: WideningTarget | null,280 subject: string,281 ) => {282 if (destination === null) return;283 if (284 isDictionaryAccumulatorTarget(destination) &&285 isEmptyObjectExpression(expression)286 ) {287 return;288 }289 if (!hasKnownEvidence(context.sourceCode, expression)) return;290 context.report({291 node: expression,292 messageId: "widening",293 data: { subject, target: destination.kind },294 });295 };296297 const targetFromAnnotation = (annotation: ESTree.TSTypeAnnotation | null | undefined) =>298 environment === null ? null : annotationTarget(annotation, environment);299300 return {301 Program(node) {302 environment = createTypeEnvironment(303 node,304 context.sourceCode.visitorKeys,305 );306 },307 VariableDeclarator(node) {308 if (node.init === null || node.id.type !== "Identifier") return;309 reportFlow(310 node.init,311 targetFromAnnotation(node.id.typeAnnotation),312 `binding \`${node.id.name}\``,313 );314 },315 PropertyDefinition(node) {316 if (node.value === null) return;317 reportFlow(318 node.value,319 targetFromAnnotation(node.typeAnnotation),320 `property \`${sourceKeyName(context.sourceCode, node.key)}\``,321 );322 },323 AccessorProperty(node) {324 if (node.value === null) return;325 reportFlow(326 node.value,327 targetFromAnnotation(node.typeAnnotation),328 `property \`${sourceKeyName(context.sourceCode, node.key)}\``,329 );330 },331 AssignmentExpression(node) {332 if (node.operator !== "=" || node.left.type !== "Identifier") return;333 const variable = resolveVariable(context.sourceCode, node.left);334 if (variable === null) return;335 const declarator = variableDeclarator(variable);336 if (declarator === null || declarator.id.type !== "Identifier") return;337 reportFlow(338 node.right,339 targetFromAnnotation(declarator.id.typeAnnotation),340 `binding \`${declarator.id.name}\``,341 );342 },343 CallExpression(node) {344 if (environment === null) return;345 const owner = localFunctionForCall(context.sourceCode, node.callee);346 if (owner === null) return;347 const parameterIndex = typePredicateSubjectIndex(context.sourceCode, owner);348 if (parameterIndex === null) return;349 const parameter = owner.params[parameterIndex];350 const argument = node.arguments[parameterIndex];351 if (parameter === undefined || argument === undefined || argument.type === "SpreadElement") {352 return;353 }354 const parameterAnnotation = functionParameterTypeAnnotation(parameter);355 if (356 parameterAnnotation === null ||357 parameterAnnotation === undefined ||358 !containsUnknownType(parameterAnnotation.typeAnnotation)359 ) {360 return;361 }362 if (363 !hasKnownCallArgumentEvidence(364 context.sourceCode,365 argument,366 environment,367 )368 ) {369 return;370 }371 context.report({372 node: argument,373 messageId: "widening",374 data: {375 subject: `argument for parameter \`${functionParameterBindingName(parameter, context.sourceCode)}\` of \`${functionName(context.sourceCode, owner)}\``,376 target: "unknown",377 },378 });379 },380 ReturnStatement(node) {381 if (node.argument === null) return;382 const owner = enclosingFunction(node);383 reportFlow(384 node.argument,385 targetFromAnnotation(owner?.returnType),386 `return value of \`${functionName(context.sourceCode, owner)}\``,387 );388 },389 ArrowFunctionExpression(node) {390 if (node.body.type === "BlockStatement") return;391 reportFlow(392 node.body,393 targetFromAnnotation(node.returnType),394 `return value of \`${functionName(context.sourceCode, node)}\``,395 );396 },397 TSAsExpression(node) {398 if (environment === null || hasParentAssertion(node)) return;399 reportFlow(400 node.expression,401 classifyWideningTarget(node.typeAnnotation, environment),402 "assertion",403 );404 },405 TSTypeAssertion(node) {406 if (environment === null || hasParentAssertion(node)) return;407 reportFlow(408 node.expression,409 classifyWideningTarget(node.typeAnnotation, environment),410 "assertion",411 );412 },413 };414 },415});
added:tools/oxlint/anti-slop/rules/no-module-mocking.ts+80 added
1import { defineRule } from "@oxlint/plugins";23import { resolveVariable } from "../shared/scope.ts";45import type { ESTree, SourceCode } from "@oxlint/plugins";67const moduleMockMethods = new Set(["doMock", "mock", "unstable_mockModule"]);89function importedName(node: ESTree.Node): string | null {10 if (node.type !== "ImportSpecifier") return null;11 return node.imported.type === "Identifier" ? node.imported.name : node.imported.value;12}1314function isTestFrameworkObject(15 sourceCode: SourceCode,16 expression: ESTree.Expression,17): expression is ESTree.IdentifierReference {18 if (expression.type !== "Identifier") return false;19 if (20 (expression.name === "vi" || expression.name === "jest") &&21 sourceCode.isGlobalReference(expression)22 ) {23 return true;24 }2526 const variable = resolveVariable(sourceCode, expression);27 if (variable === null || variable.defs.length === 0) {28 return expression.name === "vi" || expression.name === "jest";29 }30 return variable.defs.some((definition) => {31 if (definition.type !== "ImportBinding" || definition.parent?.type !== "ImportDeclaration") {32 return false;33 }34 const source = definition.parent.source.value;35 const name = importedName(definition.node);36 return (source === "vitest" && name === "vi") || (source === "@jest/globals" && name === "jest");37 });38}3940function moduleMockCall(sourceCode: SourceCode, callee: ESTree.Expression): boolean {41 if (!("property" in callee) || !("object" in callee) || !("computed" in callee)) return false;42 if (!isTestFrameworkObject(sourceCode, callee.object)) return false;43 const property = callee.property;44 const method = callee.computed45 ? property.type === "Literal" &&46 (property.value === "doMock" ||47 property.value === "mock" ||48 property.value === "unstable_mockModule")49 ? property.value50 : null51 : property.type === "Identifier"52 ? property.name53 : null;54 return method !== null && moduleMockMethods.has(method);55}5657/** Ban test framework module mocking in favor of real dependency seams. */58export const noModuleMockingRule = defineRule({59 meta: {60 type: "problem",61 docs: {62 description:63 "Disallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.",64 },65 messages: {66 moduleMock:67 "Replace module mocking with dependency injection through a real interface, service layer, or faithful test implementation.",68 },69 },70 createOnce(context) {71 return {72 CallExpression(node) {73 if (node.callee.type === "Super" || node.callee.type === "V8IntrinsicExpression") return;74 if (moduleMockCall(context.sourceCode, node.callee)) {75 context.report({ node, messageId: "moduleMock" });76 }77 },78 };79 },80});
added:tools/oxlint/anti-slop/rules/no-object-parameters.ts+83 added
1import { defineRule } from "@oxlint/plugins";23import type { ESTree } from "@oxlint/plugins";45import {6 functionParameterBindingName,7 functionParameterTypeAnnotation,8} from "../shared/function-parameters.ts";9import {10 createTypeAliasEnvironment,11 resolvedTypeMatches,12 type TypeAliasEnvironment,13} from "../shared/type-alias-resolution.ts";14type ParameterOwner =15 | ESTree.ArrowFunctionExpression16 | ESTree.Function17 | ESTree.TSCallSignatureDeclaration18 | ESTree.TSConstructSignatureDeclaration19 | ESTree.TSConstructorType20 | ESTree.TSFunctionType21 | ESTree.TSMethodSignature;2223/** Ban the broad object type on function inputs, including local aliases to object. */24export const noObjectParametersRule = defineRule({25 meta: {26 type: "problem",27 docs: {28 description:29 "Disallow object function parameters; inputs must use an owner-provided type and be parsed at their boundary.",30 },31 messages: {32 objectParameter:33 "Parameter `{{parameter}}` uses the broad `object` type. Accept a named owner type; parse external input at its boundary before calling this function.",34 },35 },36 createOnce(context) {37 let environment: TypeAliasEnvironment | null = null;3839 const resolvesToObject = (type: ESTree.TSType): boolean =>40 environment !== null &&41 resolvedTypeMatches(type, environment, (resolved, matches) => {42 if (resolved.type === "TSObjectKeyword") return true;43 if (resolved.type === "TSParenthesizedType") {44 return matches(resolved.typeAnnotation);45 }46 return (47 resolved.type === "TSUnionType" && resolved.types.some(matches)48 );49 });5051 const checkParameters = (node: ParameterOwner) => {52 for (const parameter of node.params) {53 const annotation = functionParameterTypeAnnotation(parameter);54 if (annotation === null || annotation === undefined) continue;55 if (!resolvesToObject(annotation.typeAnnotation)) continue;56 context.report({57 node: annotation.typeAnnotation,58 messageId: "objectParameter",59 data: { parameter: functionParameterBindingName(parameter, context.sourceCode) },60 });61 }62 };6364 return {65 Program(node) {66 environment = createTypeAliasEnvironment(67 node,68 context.sourceCode.visitorKeys,69 );70 },71 ArrowFunctionExpression: checkParameters,72 FunctionDeclaration: checkParameters,73 FunctionExpression: checkParameters,74 TSCallSignatureDeclaration: checkParameters,75 TSConstructSignatureDeclaration: checkParameters,76 TSConstructorType: checkParameters,77 TSDeclareFunction: checkParameters,78 TSEmptyBodyFunctionExpression: checkParameters,79 TSFunctionType: checkParameters,80 TSMethodSignature: checkParameters,81 };82 },83});
added:tools/oxlint/anti-slop/rules/no-reduce-accumulator-copy.ts+109 added
1import { defineRule } from "@oxlint/plugins";2import type { ESTree, SourceCode, Variable } from "@oxlint/plugins";34import {5 arrayMethodTarget,6 isKnownArrayExpression,7 resolveArrayBinding,8 unwrapArrayExpression,9} from "../shared/array-method.ts";1011function enclosingReducer(node: ESTree.Node) {12 let parent = node.parent;13 while (parent !== null) {14 if (parent.type === "FunctionDeclaration") return null;15 if (parent.type === "ArrowFunctionExpression" || parent.type === "FunctionExpression") {16 const callback = parent;17 let owner: ESTree.Node | null = callback.parent;18 while (owner !== null && unwrapArrayExpression(owner) === callback) owner = owner.parent;19 if (owner?.type !== "CallExpression") return null;20 const method = arrayMethodTarget(owner.callee);21 const firstArgument = owner.arguments[0];22 if (23 method === null || (method.name !== "reduce" && method.name !== "reduceRight") ||24 owner.arguments.length > 2 || firstArgument === undefined ||25 unwrapArrayExpression(firstArgument) !== callback26 ) return null;27 const firstParameter = callback.params[0];28 const accumulator = firstParameter?.type === "AssignmentPattern" ? firstParameter.left : firstParameter;29 if (accumulator?.type !== "Identifier") return null;30 return { callback, accumulator, initialValue: owner.arguments[1] };31 }32 parent = parent.parent;33 }34 return null;35}3637function referencesAccumulator(38 sourceCode: SourceCode,39 node: ESTree.Node,40 accumulator: Variable,41 visited = new Set<Variable>(),42): boolean {43 const variable = resolveArrayBinding(sourceCode, node);44 if (variable === null || visited.has(variable)) return false;45 if (variable === accumulator) return true;46 visited.add(variable);47 if (variable.references.some(reference => reference.isWrite() && !reference.init)) return false;48 for (const definition of variable.defs) {49 if (50 definition.type === "Variable" && definition.node.type === "VariableDeclarator" &&51 definition.node.id.type === "Identifier" && definition.node.init !== null &&52 definition.node.parent.type === "VariableDeclaration" && definition.node.parent.kind === "const"53 ) {54 return referencesAccumulator(sourceCode, definition.node.init, accumulator, visited);55 }56 }57 return false;58}5960function isGlobalCopyOwner(sourceCode: SourceCode, node: ESTree.Node, name: string): boolean {61 node = unwrapArrayExpression(node);62 if (node.type !== "Identifier" || node.name !== name) return false;63 const variable = resolveArrayBinding(sourceCode, node);64 return variable === null || variable.defs.length === 0;65}6667/** Reject non-spread copies of reducer accumulators; pair with oxc/no-accumulating-spread. */68export const noReduceAccumulatorCopyRule = defineRule({69 meta: {70 type: "problem",71 docs: { description: "Disallow copying growing reducer accumulators with Object.assign, Array.from, or array copy methods." },72 messages: {73 accumulatorCopy: "Do not copy the reducer accumulator on every iteration; growing copies can cause quadratic work. Mutate a fresh, locally owned accumulator and return it, or use an iterator pipeline/flatMap.",74 },75 },76 createOnce(context) {77 return {78 CallExpression(node) {79 const method = arrayMethodTarget(node.callee);80 if (method === null) return;81 const reducer = enclosingReducer(node);82 if (reducer === null) return;83 const accumulator = context.sourceCode.getDeclaredVariables(reducer.callback).find(variable =>84 variable.identifiers.some(identifier => identifier.start === reducer.accumulator.start),85 );86 if (accumulator === undefined) return;87 const isAccumulator = (expression: ESTree.Node) =>88 referencesAccumulator(context.sourceCode, expression, accumulator);89 let copiesAccumulator = false;90 if (method.name === "assign" && isGlobalCopyOwner(context.sourceCode, method.object, "Object")) {91 const target = node.arguments[0];92 copiesAccumulator = (93 target !== undefined && unwrapArrayExpression(target).type === "ObjectExpression" &&94 node.arguments.slice(1).some(isAccumulator)95 );96 } else if (method.name === "from" && isGlobalCopyOwner(context.sourceCode, method.object, "Array")) {97 const source = node.arguments[0];98 copiesAccumulator = source !== undefined && isAccumulator(source);99 } else if (["concat", "slice", "toSpliced", "toSorted", "toReversed", "with"].includes(method.name)) {100 const initialValue = reducer.initialValue;101 const arrayAccumulator = initialValue !== undefined &&102 isKnownArrayExpression(context.sourceCode, initialValue);103 copiesAccumulator = arrayAccumulator && isAccumulator(method.object);104 }105 if (copiesAccumulator) context.report({ node, messageId: "accumulatorCopy" });106 },107 };108 },109});
added:tools/oxlint/anti-slop/rules/no-reflect-apply.ts+28 added
1import { defineRule } from "@oxlint/plugins";23import { isGlobalReflectMethodCall } from "../shared/reflect-method.ts";45/** Ban Reflect.apply, which bypasses ordinary typed function calls. */6export const noReflectApplyRule = defineRule({7 meta: {8 type: "problem",9 docs: {10 description:11 "Disallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.",12 },13 messages: {14 reflectApply:15 "Replace `Reflect.apply` with a typed function call. Model dynamic dispatch behind a named interface.",16 },17 },18 createOnce(context) {19 return {20 CallExpression(node) {21 if (node.callee.type === "Super" || node.callee.type === "V8IntrinsicExpression") return;22 if (isGlobalReflectMethodCall(context.sourceCode, node.callee, "apply")) {23 context.report({ node, messageId: "reflectApply" });24 }25 },26 };27 },28});
added:tools/oxlint/anti-slop/rules/no-reflect-get.ts+28 added
1import { defineRule } from "@oxlint/plugins";23import { isGlobalReflectMethodCall } from "../shared/reflect-method.ts";45/** Ban Reflect.get, which bypasses ordinary property access and useful type evidence. */6export const noReflectGetRule = defineRule({7 meta: {8 type: "problem",9 docs: {10 description:11 "Disallow Reflect.get; use typed property access or parse dynamic input into a domain type.",12 },13 messages: {14 reflectGet:15 "Replace `Reflect.get` with typed property access. Parse dynamic input into a named domain type before reading it.",16 },17 },18 createOnce(context) {19 return {20 CallExpression(node) {21 if (node.callee.type === "Super" || node.callee.type === "V8IntrinsicExpression") return;22 if (isGlobalReflectMethodCall(context.sourceCode, node.callee, "get")) {23 context.report({ node, messageId: "reflectGet" });24 }25 },26 };27 },28});
added:tools/oxlint/anti-slop/rules/no-runtime-typeof.ts+77 added
1import { defineRule } from "@oxlint/plugins";23import type { ESTree } from "@oxlint/plugins";45type RuntimeFunction = ESTree.ArrowFunctionExpression | ESTree.Function;67function isRuntimeFunction(node: ESTree.Node): node is RuntimeFunction {8 return (9 node.type === "ArrowFunctionExpression" ||10 node.type === "FunctionDeclaration" ||11 node.type === "FunctionExpression"12 );13}1415function isInsideTypeGuard(node: ESTree.Node): boolean {16 let current: ESTree.Node | null = node.parent;17 while (current !== null && current.type !== "Program") {18 if (isRuntimeFunction(current)) {19 return current.returnType?.typeAnnotation.type === "TSTypePredicate";20 }21 current = current.parent;22 }23 return false;24}2526/** Return whether typeof safely probes for the existence of a possibly absent binding. */27function isExistenceProbe(node: ESTree.UnaryExpression): boolean {28 const parent = node.parent;29 if (parent.type !== "BinaryExpression") return false;30 if (!["===", "!==", "==", "!="].includes(parent.operator)) return false;31 const other = parent.left === node ? parent.right : parent.left;32 return other.type === "Literal" && other.value === "undefined";33}3435/** Disallow runtime typeof checks that narrow unparsed values instead of decoding them. */36export const noRuntimeTypeofRule = defineRule({37 meta: {38 type: "problem",39 docs: {40 description:41 "Disallow runtime typeof checks; external values must be decoded into meaningful types at their I/O boundary.",42 },43 messages: {44 runtimeTypeof:45 "A `typeof` check narrows a representation without establishing its contract. Parse input at its I/O boundary, then branch on the domain value.",46 },47 schema: [48 {49 type: "object",50 properties: {51 allowInTypeGuards: { type: "boolean" },52 },53 additionalProperties: false,54 },55 ],56 defaultOptions: [{ allowInTypeGuards: false }],57 },58 createOnce(context) {59 return {60 UnaryExpression(node) {61 const option = context.options?.[0];62 const allowInTypeGuards =63 typeof option === "object" &&64 option !== null &&65 !Array.isArray(option) &&66 option.allowInTypeGuards === true;67 if (68 node.operator === "typeof" &&69 !isExistenceProbe(node) &&70 (!allowInTypeGuards || !isInsideTypeGuard(node))71 ) {72 context.report({ node, messageId: "runtimeTypeof" });73 }74 },75 };76 },77});
added:tools/oxlint/anti-slop/rules/no-shape-in-symbol-names.ts+46 added
1import { defineRule } from "@oxlint/plugins";2import type { ESTree } from "@oxlint/plugins";34const FORBIDDEN_SYMBOL_NAME = "shape";56function containsForbiddenSymbolName(name: string): boolean {7 return name.toLowerCase().includes(FORBIDDEN_SYMBOL_NAME);8}910/** Return whether an identifier names a statically accessed member owned by another value. */11function isBorrowedMemberName(node: ESTree.Node): boolean {12 const parent = node.parent;13 if (parent === null || parent.type !== "MemberExpression") return false;14 return parent.property === node && parent.computed === false;15}1617/** Ban the case-insensitive substring "shape" in every JavaScript and TypeScript symbol name. */18export const noForbiddenTermInSymbolNamesRule = defineRule({19 meta: {20 type: "problem",21 docs: {22 description:23 'Disallow the case-insensitive substring "shape" in JavaScript, TypeScript, private, and JSX symbol names.',24 },25 messages: {26 forbiddenSymbolName:27 'Rename symbol "{{name}}" for its domain role; "shape" describes structure rather than ownership.',28 },29 },30 createOnce(context) {31 const reportForbiddenSymbolName = (node: ESTree.Node & { name: string }) => {32 if (!containsForbiddenSymbolName(node.name) || isBorrowedMemberName(node)) return;33 context.report({34 node,35 messageId: "forbiddenSymbolName",36 data: { name: node.name },37 });38 };3940 return {41 Identifier: reportForbiddenSymbolName,42 PrivateIdentifier: reportForbiddenSymbolName,43 JSXIdentifier: reportForbiddenSymbolName,44 };45 },46});
added:tools/oxlint/anti-slop/rules/no-unknown-parameters.ts+69 added
1import { defineRule } from "@oxlint/plugins";2import type { ESTree } from "@oxlint/plugins";34import {5 containsUnknownType,6 functionParameterBindingName,7 functionParameterTypeAnnotation,8} from "../shared/function-parameters.ts";9type ParameterOwner =10 | ESTree.ArrowFunctionExpression11 | ESTree.Function12 | ESTree.TSCallSignatureDeclaration13 | ESTree.TSConstructSignatureDeclaration14 | ESTree.TSConstructorType15 | ESTree.TSFunctionType16 | ESTree.TSMethodSignature;1718function isTypePredicateSubject(owner: ParameterOwner, parameterName: string): boolean {19 const predicate = owner.returnType?.typeAnnotation;20 return (21 predicate?.type === "TSTypePredicate" &&22 predicate.parameterName.type === "Identifier" &&23 predicate.parameterName.name === parameterName24 );25}2627/** Disallow unknown inputs except explicitly named error-cause enrichment. */28export const noUnknownParametersRule = defineRule({29 meta: {30 type: "problem",31 docs: {32 description:33 "Disallow explicitly unknown function parameters except `cause` and type-predicate subjects; decode unknown input at its I/O boundary instead.",34 },35 messages: {36 unknownParameter:37 "Parameter `{{parameter}}` leaves input unparsed. Accept a named domain type; run the expected schema or parser at the I/O boundary before calling this function.",38 },39 },40 createOnce(context) {41 const checkParameters = (node: ParameterOwner) => {42 for (const parameter of node.params) {43 const annotation = functionParameterTypeAnnotation(parameter);44 if (annotation === null || annotation === undefined) continue;45 if (!containsUnknownType(annotation.typeAnnotation)) continue;46 const name = functionParameterBindingName(parameter, context.sourceCode);47 if (name === "cause" || isTypePredicateSubject(node, name)) continue;48 context.report({49 node: annotation.typeAnnotation,50 messageId: "unknownParameter",51 data: { parameter: name },52 });53 }54 };5556 return {57 ArrowFunctionExpression: checkParameters,58 FunctionDeclaration: checkParameters,59 FunctionExpression: checkParameters,60 TSCallSignatureDeclaration: checkParameters,61 TSConstructSignatureDeclaration: checkParameters,62 TSConstructorType: checkParameters,63 TSDeclareFunction: checkParameters,64 TSEmptyBodyFunctionExpression: checkParameters,65 TSFunctionType: checkParameters,66 TSMethodSignature: checkParameters,67 };68 },69});
added:tools/oxlint/anti-slop/rules/no-unknown-returns.ts+82 added
1import { defineRule } from "@oxlint/plugins";23import type { ESTree } from "@oxlint/plugins";45import {6 createTypeAliasEnvironment,7 resolvedTypeMatches,8 type TypeAliasEnvironment,9} from "../shared/type-alias-resolution.ts";1011type FunctionWithReturnType =12 | ESTree.ArrowFunctionExpression13 | ESTree.Function14 | ESTree.TSCallSignatureDeclaration15 | ESTree.TSConstructSignatureDeclaration16 | ESTree.TSConstructorType17 | ESTree.TSFunctionType18 | ESTree.TSMethodSignature;1920/** Ban function contracts that return unknown instead of a parsed domain type. */21export const noUnknownReturnsRule = defineRule({22 meta: {23 type: "problem",24 docs: {25 description:26 "Disallow functions whose explicit return contract is unknown or Promise<unknown>.",27 },28 messages: {29 unknownReturn:30 "This function exposes `unknown` to its caller. Parse the value at its boundary and return a named domain type.",31 },32 },33 createOnce(context) {34 let environment: TypeAliasEnvironment | null = null;3536 const resolvesToUnknown = (type: ESTree.TSType): boolean =>37 environment !== null &&38 resolvedTypeMatches(type, environment, (resolved, matches) => {39 if (resolved.type === "TSUnknownKeyword") return true;40 if (resolved.type === "TSParenthesizedType") {41 return matches(resolved.typeAnnotation);42 }43 if (resolved.type === "TSUnionType") return resolved.types.some(matches);44 if (45 resolved.type !== "TSTypeReference" ||46 resolved.typeName.type !== "Identifier" ||47 (resolved.typeName.name !== "Promise" &&48 resolved.typeName.name !== "PromiseLike")49 ) {50 return false;51 }52 const value = resolved.typeArguments?.params[0];53 return value !== undefined && matches(value);54 });5556 const checkReturnType = (node: FunctionWithReturnType) => {57 const annotation = node.returnType;58 if (annotation === null || annotation === undefined) return;59 if (!resolvesToUnknown(annotation.typeAnnotation)) return;60 context.report({ node: annotation.typeAnnotation, messageId: "unknownReturn" });61 };6263 return {64 Program(node) {65 environment = createTypeAliasEnvironment(66 node,67 context.sourceCode.visitorKeys,68 );69 },70 ArrowFunctionExpression: checkReturnType,71 FunctionDeclaration: checkReturnType,72 FunctionExpression: checkReturnType,73 TSCallSignatureDeclaration: checkReturnType,74 TSConstructSignatureDeclaration: checkReturnType,75 TSConstructorType: checkReturnType,76 TSDeclareFunction: checkReturnType,77 TSEmptyBodyFunctionExpression: checkReturnType,78 TSFunctionType: checkReturnType,79 TSMethodSignature: checkReturnType,80 };81 },82});
added:tools/oxlint/anti-slop/rules/no-unknown-type-aliases.ts+54 added
1import { defineRule } from "@oxlint/plugins";23import type { ESTree } from "@oxlint/plugins";45import {6 createTypeAliasEnvironment,7 resolvedTypeMatches,8 type TypeAliasEnvironment,9} from "../shared/type-alias-resolution.ts";1011/** Ban named aliases that merely conceal TypeScript's unknown top type. */12export const noUnknownTypeAliasesRule = defineRule({13 meta: {14 type: "problem",15 docs: {16 description:17 "Disallow type aliases whose resolved type is unknown; unknown must remain visible at an allowed boundary.",18 },19 messages: {20 unknownAlias:21 "Type alias `{{alias}}` hides `unknown`. Keep `unknown` explicit at the parsing boundary or on an allowed `cause` field; otherwise use the parsed owner type.",22 },23 },24 createOnce(context) {25 let environment: TypeAliasEnvironment | null = null;2627 const resolvesToUnknown = (type: ESTree.TSType): boolean =>28 environment !== null &&29 resolvedTypeMatches(type, environment, (resolved, matches) => {30 if (resolved.type === "TSUnknownKeyword") return true;31 if (resolved.type === "TSParenthesizedType") {32 return matches(resolved.typeAnnotation);33 }34 return resolved.type === "TSUnionType" && resolved.types.some(matches);35 });3637 return {38 Program(node) {39 environment = createTypeAliasEnvironment(40 node,41 context.sourceCode.visitorKeys,42 );43 },44 TSTypeAliasDeclaration(node) {45 if (!resolvesToUnknown(node.typeAnnotation)) return;46 context.report({47 node: node.id,48 messageId: "unknownAlias",49 data: { alias: node.id.name },50 });51 },52 };53 },54});
added:tools/oxlint/anti-slop/rules/no-unsafe-dictionary-type.ts+154 added
1import { defineRule } from "@oxlint/plugins";23import {4 classifyUnsafeDictionary,5 classifyUnsafeDictionaryValue,6 createTypeEnvironment,7 type TypeEnvironment,8} from "../shared/dictionary-types.ts";9import { visibleTypeAlias } from "../shared/type-alias-resolution.ts";1011import type { ESTree } from "@oxlint/plugins";1213const typeNodeKinds: ReadonlySet<string> = new Set([14 "JSDocNonNullableType",15 "JSDocNullableType",16 "JSDocUnknownType",17 "TSAnyKeyword",18 "TSArrayType",19 "TSBigIntKeyword",20 "TSBooleanKeyword",21 "TSConditionalType",22 "TSConstructorType",23 "TSFunctionType",24 "TSImportType",25 "TSIndexedAccessType",26 "TSInferType",27 "TSIntersectionType",28 "TSIntrinsicKeyword",29 "TSLiteralType",30 "TSMappedType",31 "TSNamedTupleMember",32 "TSNeverKeyword",33 "TSNullKeyword",34 "TSNumberKeyword",35 "TSObjectKeyword",36 "TSParenthesizedType",37 "TSStringKeyword",38 "TSSymbolKeyword",39 "TSTemplateLiteralType",40 "TSThisType",41 "TSTupleType",42 "TSTypeLiteral",43 "TSTypeOperator",44 "TSTypePredicate",45 "TSTypeQuery",46 "TSTypeReference",47 "TSUndefinedKeyword",48 "TSUnionType",49 "TSUnknownKeyword",50 "TSVoidKeyword",51]);5253function isTypeNode(node: ESTree.Node): node is ESTree.TSType {54 return typeNodeKinds.has(node.type);55}5657function typeReferenceName(type: ESTree.TSTypeReference): string | null {58 return type.typeName.type === "Identifier" ? type.typeName.name : null;59}6061function isInsideTypeAliasDeclaration(node: ESTree.Node): boolean {62 let current: ESTree.Node | null = node.parent;63 while (current !== null && current.type !== "Program") {64 if (current.type === "TSTypeAliasDeclaration") return true;65 current = current.parent;66 }67 return false;68}6970function isPlainAliasConsumerUse(node: ESTree.TSType, environment: TypeEnvironment): boolean {71 if (node.type !== "TSTypeReference" || node.typeArguments?.params.length) return false;72 const name = typeReferenceName(node);73 return (74 name !== null &&75 visibleTypeAlias(name, node, environment.typeAliases) !== null &&76 !isInsideTypeAliasDeclaration(node)77 );78}7980function isInsideTypeParameterConstraint(node: ESTree.TSType): boolean {81 let child: ESTree.Node = node;82 let parent: ESTree.Node | null = child.parent;83 while (parent !== null && parent.type !== "Program") {84 if (parent.type === "TSTypeParameter" && parent.constraint === child) return true;85 child = parent;86 parent = child.parent;87 }88 return false;89}9091function shouldReportType(node: ESTree.TSType, environment: TypeEnvironment): boolean {92 if (isInsideTypeParameterConstraint(node)) return false;93 if (isPlainAliasConsumerUse(node, environment)) return false;94 if (classifyUnsafeDictionary(node, environment) === null) return false;95 let current: ESTree.Node | null = node.parent;96 while (current !== null && current.type !== "Program") {97 if (isTypeNode(current) && classifyUnsafeDictionary(current, environment) !== null)98 return false;99 current = current.parent;100 }101 return true;102}103104/** Disallow object-dictionary contracts whose direct value type is an unsafe escape hatch. */105export const noUnsafeDictionaryTypeRule = defineRule({106 meta: {107 type: "problem",108 docs: {109 description:110 "Disallow object-dictionary contracts whose direct value type is unknown, any, object, {}, or a union/alias containing one of those escape hatches.",111 },112 messages: {113 unsafeDictionary:114 "This dictionary's {{value}} value type gives callers no concrete value contract. Use an owner/schema-derived value type; parse external payloads before insertion.",115 },116 },117 createOnce(context) {118 let environment: TypeEnvironment | null = null;119 const report = (node: ESTree.Node, value: string) => {120 context.report({ node, messageId: "unsafeDictionary", data: { value } });121 };122 const reportIfUnsafe = (node: ESTree.TSType) => {123 if (environment === null || !shouldReportType(node, environment)) return;124 const unsafe = classifyUnsafeDictionary(node, environment);125 if (unsafe === null) return;126 report(node, unsafe.unsafeValue);127 };128129 return {130 Program(node) {131 environment = createTypeEnvironment(132 node,133 context.sourceCode.visitorKeys,134 );135 },136 TSTypeReference: reportIfUnsafe,137 TSTypeLiteral: reportIfUnsafe,138 TSMappedType: reportIfUnsafe,139 TSIndexSignature(node) {140 if (141 environment === null ||142 node.typeAnnotation === null ||143 node.parent.type === "TSTypeLiteral"144 )145 return;146 const unsafe = classifyUnsafeDictionaryValue(147 node.typeAnnotation.typeAnnotation,148 environment,149 );150 if (unsafe !== null) report(node, unsafe.unsafeValue);151 },152 };153 },154});
added:tools/oxlint/anti-slop/rules/no-widen-then-assert.ts+366 added
1import { defineRule } from "@oxlint/plugins";2import type { ESTree, Variable } from "@oxlint/plugins";34type BroadTypeKind = "top" | "object" | "record";56type KnownValueEvidence = {7 readonly type: ESTree.TSType | null;8};910const functionBoundaryTypes = new Set([11 "ArrowFunctionExpression",12 "FunctionDeclaration",13 "FunctionExpression",14 "TSDeclareFunction",15 "TSEmptyBodyFunctionExpression",16]);1718function unwrapExpressionParentheses(expression: ESTree.Expression): ESTree.Expression {19 let current = expression;20 while (current.type === "ParenthesizedExpression") current = current.expression;21 return current;22}2324function unwrapTypeParentheses(type: ESTree.TSType): ESTree.TSType {25 let current = type;26 while (current.type === "TSParenthesizedType") current = current.typeAnnotation;27 return current;28}2930function typeReferenceName(type: ESTree.TSTypeReference): string | null {31 return type.typeName.type === "Identifier" ? type.typeName.name : null;32}3334function isUnknownOrAnyType(type: ESTree.TSType): boolean {35 const unwrapped = unwrapTypeParentheses(type);36 return unwrapped.type === "TSUnknownKeyword" || unwrapped.type === "TSAnyKeyword";37}3839function isBroadRecordKeyType(type: ESTree.TSType): boolean {40 const unwrapped = unwrapTypeParentheses(type);41 if (42 unwrapped.type === "TSStringKeyword" ||43 unwrapped.type === "TSNumberKeyword" ||44 unwrapped.type === "TSSymbolKeyword"45 ) {46 return true;47 }48 if (unwrapped.type === "TSUnionType") return unwrapped.types.every(isBroadRecordKeyType);49 return unwrapped.type === "TSTypeReference" && typeReferenceName(unwrapped) === "PropertyKey";50}5152function isBroadRecordType(type: ESTree.TSType): boolean {53 const unwrapped = unwrapTypeParentheses(type);5455 if (unwrapped.type === "TSTypeReference") {56 if (typeReferenceName(unwrapped) === "Readonly") {57 const [inner] = unwrapped.typeArguments?.params ?? [];58 return inner !== undefined && isBroadRecordType(inner);59 }6061 if (typeReferenceName(unwrapped) !== "Record") return false;62 const parameters = unwrapped.typeArguments?.params ?? [];63 return (64 parameters.length === 2 &&65 parameters[0] !== undefined &&66 parameters[1] !== undefined &&67 isBroadRecordKeyType(parameters[0]) &&68 isUnknownOrAnyType(parameters[1])69 );70 }7172 if (unwrapped.type !== "TSTypeLiteral" || unwrapped.members.length !== 1) return false;73 const [member] = unwrapped.members;74 const [parameter] = member?.type === "TSIndexSignature" ? member.parameters : [];75 return (76 member?.type === "TSIndexSignature" &&77 member.parameters.length === 1 &&78 parameter !== undefined &&79 isBroadRecordKeyType(parameter.typeAnnotation.typeAnnotation) &&80 isUnknownOrAnyType(member.typeAnnotation.typeAnnotation)81 );82}8384function broadTypeKind(type: ESTree.TSType): BroadTypeKind | null {85 const unwrapped = unwrapTypeParentheses(type);86 if (unwrapped.type === "TSUnknownKeyword" || unwrapped.type === "TSAnyKeyword") return "top";87 if (unwrapped.type === "TSObjectKeyword") return "object";88 return isBroadRecordType(unwrapped) ? "record" : null;89}9091function assertedExpression(92 node: ESTree.TSAsExpression | ESTree.TSTypeAssertion,93): ESTree.Expression {94 return unwrapExpressionParentheses(node.expression);95}9697function assertionFromExpression(98 expression: ESTree.Expression,99): ESTree.TSAsExpression | ESTree.TSTypeAssertion | null {100 const unwrapped = unwrapExpressionParentheses(expression);101 return unwrapped.type === "TSAsExpression" || unwrapped.type === "TSTypeAssertion"102 ? unwrapped103 : null;104}105106function normalizedTypeText(sourceText: string, type: ESTree.TSType): string {107 return sourceText.slice(type.start, type.end).replaceAll(/\s+/gu, "");108}109110function typesHaveSameSyntax(111 sourceText: string,112 left: ESTree.TSType | null,113 right: ESTree.TSType,114): boolean {115 return (116 left !== null &&117 normalizedTypeText(sourceText, unwrapTypeParentheses(left)) ===118 normalizedTypeText(sourceText, unwrapTypeParentheses(right))119 );120}121122function isDefinitelyObjectType(type: ESTree.TSType): boolean {123 const unwrapped = unwrapTypeParentheses(type);124 switch (unwrapped.type) {125 case "TSArrayType":126 case "TSConstructorType":127 case "TSFunctionType":128 case "TSMappedType":129 case "TSObjectKeyword":130 case "TSTupleType":131 return true;132 case "TSTypeLiteral":133 return unwrapped.members.length > 0;134 case "TSIntersectionType":135 return unwrapped.types.every(isDefinitelyObjectType);136 case "TSTypeOperator":137 return unwrapped.operator === "readonly" && isDefinitelyObjectType(unwrapped.typeAnnotation);138 default:139 return false;140 }141}142143function isDefinitelyNarrowerRecordType(type: ESTree.TSType): boolean {144 const unwrapped = unwrapTypeParentheses(type);145 if (unwrapped.type === "TSTypeLiteral") {146 return unwrapped.members.some((member) => member.type !== "TSIndexSignature");147 }148149 if (unwrapped.type !== "TSTypeReference") return false;150 if (typeReferenceName(unwrapped) === "Readonly") {151 const [inner] = unwrapped.typeArguments?.params ?? [];152 return inner !== undefined && isDefinitelyNarrowerRecordType(inner);153 }154 if (typeReferenceName(unwrapped) !== "Record") return false;155156 const parameters = unwrapped.typeArguments?.params ?? [];157 return (158 parameters.length === 2 && parameters[1] !== undefined && !isUnknownOrAnyType(parameters[1])159 );160}161162function functionBoundary(node: ESTree.Node): ESTree.Node | null {163 let current = node.parent;164 while (current !== null && current.type !== "Program") {165 if (functionBoundaryTypes.has(current.type)) return current;166 current = current.parent;167 }168 return null;169}170171function resolvedVariableForIdentifier(172 scopes: readonly {173 readonly references: readonly {174 readonly identifier: ESTree.Node;175 readonly resolved: Variable | null;176 }[];177 }[],178 identifier: ESTree.IdentifierReference,179): Variable | null {180 for (const scope of scopes) {181 const reference = scope.references.find(182 (candidate) =>183 candidate.identifier.start === identifier.start &&184 candidate.identifier.end === identifier.end,185 );186 if (reference !== undefined) return reference.resolved;187 }188 return null;189}190191function variableDeclarator(variable: Variable): ESTree.VariableDeclarator | null {192 for (const definition of variable.defs) {193 if (definition.type === "Variable" && definition.node.type === "VariableDeclarator") {194 return definition.node;195 }196 }197 return null;198}199200function knownValueEvidence(201 expression: ESTree.Expression,202 scopes: Parameters<typeof resolvedVariableForIdentifier>[0],203 boundary: ESTree.Node | null,204 visitedVariables: ReadonlySet<Variable>,205): KnownValueEvidence | null {206 const unwrapped = unwrapExpressionParentheses(expression);207208 if (unwrapped.type === "TSAsExpression" || unwrapped.type === "TSTypeAssertion") {209 if (broadTypeKind(unwrapped.typeAnnotation) !== null) return null;210 return { type: unwrapped.typeAnnotation };211 }212213 if (unwrapped.type === "Literal" || unwrapped.type === "TemplateLiteral") {214 return { type: null };215 }216217 if (218 unwrapped.type === "ArrayExpression" ||219 unwrapped.type === "ArrowFunctionExpression" ||220 unwrapped.type === "ClassExpression" ||221 unwrapped.type === "FunctionExpression" ||222 unwrapped.type === "NewExpression" ||223 unwrapped.type === "ObjectExpression"224 ) {225 return { type: null };226 }227228 if (unwrapped.type !== "Identifier") return null;229 const variable = resolvedVariableForIdentifier(scopes, unwrapped);230 if (variable === null || visitedVariables.has(variable)) return null;231232 const annotatedIdentifier = variable.identifiers.find(233 (identifier) => identifier.typeAnnotation !== null && identifier.typeAnnotation !== undefined,234 );235 const annotation = annotatedIdentifier?.typeAnnotation?.typeAnnotation;236 if (annotation !== undefined && annotatedIdentifier !== undefined) {237 if (functionBoundary(annotatedIdentifier) !== boundary || broadTypeKind(annotation) !== null) {238 return null;239 }240 return { type: annotation };241 }242243 const declarator = variableDeclarator(variable);244 if (245 declarator === null ||246 declarator.parent.type !== "VariableDeclaration" ||247 declarator.parent.kind !== "const" ||248 declarator.init === null ||249 variable.references.some((reference) => reference.isWrite() && !reference.init) ||250 functionBoundary(declarator) !== boundary251 ) {252 return null;253 }254255 return knownValueEvidence(256 declarator.init,257 scopes,258 boundary,259 new Set([...visitedVariables, variable]),260 );261}262263function widenedBinding(264 variable: Variable,265 scopes: Parameters<typeof resolvedVariableForIdentifier>[0],266): {267 readonly broadKind: BroadTypeKind;268 readonly evidence: KnownValueEvidence;269 readonly declaredAt: number;270 readonly boundary: ESTree.Node | null;271} | null {272 const declarator = variableDeclarator(variable);273 if (274 declarator === null ||275 declarator.parent.type !== "VariableDeclaration" ||276 declarator.parent.kind !== "const" ||277 declarator.id.type !== "Identifier" ||278 declarator.init === null ||279 variable.references.some((reference) => reference.isWrite() && !reference.init)280 ) {281 return null;282 }283284 const boundary = functionBoundary(declarator);285 const declaredType = declarator.id.typeAnnotation?.typeAnnotation;286 const initializerAssertion = assertionFromExpression(declarator.init);287 const initializerBroadKind =288 initializerAssertion === null ? null : broadTypeKind(initializerAssertion.typeAnnotation);289 const declaredBroadKind = declaredType === undefined ? null : broadTypeKind(declaredType);290 const broadKind = declaredBroadKind ?? initializerBroadKind;291 if (broadKind === null) return null;292293 const originalExpression =294 initializerAssertion !== null && initializerBroadKind !== null295 ? assertedExpression(initializerAssertion)296 : declarator.init;297 const evidence = knownValueEvidence(originalExpression, scopes, boundary, new Set([variable]));298 return evidence === null ? null : { broadKind, evidence, declaredAt: declarator.end, boundary };299}300301function assertionIsNarrower(302 sourceText: string,303 broadKind: BroadTypeKind,304 evidence: KnownValueEvidence,305 assertedType: ESTree.TSType,306): boolean {307 if (broadTypeKind(assertedType) !== null) return false;308 if (broadKind === "top") return true;309 if (typesHaveSameSyntax(sourceText, evidence.type, assertedType)) return true;310 if (broadKind === "object") return isDefinitelyObjectType(assertedType);311 return isDefinitelyNarrowerRecordType(assertedType);312}313314/** Detect immutable local bindings that erase a known type and are later asserted back to a narrower type. */315export const noWidenThenAssertRule = defineRule({316 meta: {317 type: "problem",318 docs: {319 description:320 "Disallow local const flows that explicitly widen a known value before asserting the widened binding to a narrower type.",321 },322 messages: {323 widenThenAssert:324 'Binding "{{name}}" discards type evidence and later recreates it with an assertion. Keep the precise type from initialization through use; parse boundary input once.',325 },326 },327 createOnce(context) {328 let scopes: Parameters<typeof resolvedVariableForIdentifier>[0] = [];329330 const checkAssertion = (node: ESTree.TSAsExpression | ESTree.TSTypeAssertion) => {331 const expression = assertedExpression(node);332 if (expression.type !== "Identifier") return;333334 const variable = resolvedVariableForIdentifier(scopes, expression);335 if (variable === null) return;336 const widened = widenedBinding(variable, scopes);337 if (338 widened === null ||339 node.start <= widened.declaredAt ||340 functionBoundary(node) !== widened.boundary ||341 !assertionIsNarrower(342 context.sourceCode.text,343 widened.broadKind,344 widened.evidence,345 node.typeAnnotation,346 )347 ) {348 return;349 }350351 context.report({352 node,353 messageId: "widenThenAssert",354 data: { name: expression.name },355 });356 };357358 return {359 Program() {360 scopes = context.sourceCode.scopeManager.scopes;361 },362 TSAsExpression: checkAssertion,363 TSTypeAssertion: checkAssertion,364 };365 },366});
added:tools/oxlint/anti-slop/rules/require-readable-spacing.ts+47 added
1import type { CreateRule } from "@oxlint/plugins";23import createPaddingLineRule from "../vendor/eslint-stylistic/padding-line-between-statements.ts";45const paddingRule = createPaddingLineRule([6 { blankLine: "always", prev: "import", next: "*" },7 { blankLine: "always", prev: "*", next: { selector: "Program > :not(ImportDeclaration)" } },8 { blankLine: "always", prev: { selector: "Program > :not(ImportDeclaration)" }, next: "*" },9 { blankLine: "always", prev: "*", next: ["function", "class", "interface", "type"] },10 { blankLine: "always", prev: ["function", "class", "interface", "type"], next: "*" },11 {12 blankLine: "always",13 prev: "*",14 next: ["multiline-const", "multiline-let", "multiline-var", "multiline-using"],15 },16 {17 blankLine: "always",18 prev: ["multiline-const", "multiline-let", "multiline-var", "multiline-using"],19 next: "*",20 },21 { blankLine: "always", prev: "*", next: ["return", "if", "switch", "try", "for", "while", "do"] },22 { blankLine: "always", prev: "block-like", next: "*" },23 { blankLine: "any", prev: "import", next: "import" },24 {25 blankLine: "any",26 prev: {27 selector:28 ':matches(TSDeclareFunction, ExportNamedDeclaration[declaration.type="TSDeclareFunction"])',29 },30 next: {31 selector:32 ':matches(TSDeclareFunction, FunctionDeclaration, ExportNamedDeclaration[declaration.type="TSDeclareFunction"], ExportNamedDeclaration[declaration.type="FunctionDeclaration"])',33 },34 },35]);3637/** Restore structural blank lines with whitespace-only fixes; keep local short bindings and overloads grouped. */38export const requireReadableSpacingRule: CreateRule = {39 ...paddingRule,40 meta: {41 ...paddingRule.meta,42 docs: {43 description: "Require readable spacing between declarations and logical statement groups.",44 },45 schema: [],46 },47};
added:tools/oxlint/anti-slop/rules/require-safety-comment-for-type-assertion.ts+131 added
1import { defineRule } from "@oxlint/plugins";23import type { ESTree, SourceCode } from "@oxlint/plugins";45type TypeAssertion = ESTree.TSAsExpression | ESTree.TSTypeAssertion;67const DEFAULT_SAFETY_MARKERS = ["SAFETY"] as const;89const commentOwnerKinds = new Set([10 "ExpressionStatement",11 "PropertyDefinition",12 "ReturnStatement",13 "ThrowStatement",14 "VariableDeclaration",15]);1617function isConstAssertion(node: TypeAssertion): boolean {18 return (19 node.typeAnnotation.type === "TSTypeReference" &&20 node.typeAnnotation.typeName.type === "Identifier" &&21 node.typeAnnotation.typeName.name === "const"22 );23}2425function configuredSafetyMarkers(option: unknown): readonly string[] {26 if (typeof option !== "object" || option === null || !("markers" in option)) {27 return DEFAULT_SAFETY_MARKERS;28 }29 const configured = option.markers;30 if (!Array.isArray(configured)) return DEFAULT_SAFETY_MARKERS;31 const markers = configured.flatMap((marker) =>32 typeof marker === "string" && marker.trim().length > 0 ? [marker.trim()] : [],33 );34 return markers.length > 0 ? markers : DEFAULT_SAFETY_MARKERS;35}3637function markerPattern(markers: readonly string[]): RegExp {38 const alternation = markers39 .map((marker) => marker.replaceAll(/[.*+?^${}()|[\]\\]/gu, String.raw`\$&`))40 .join("|");41 return new RegExp(42 String.raw`(?:^|[^\p{L}\p{N}_])(?:${alternation})\s*:\s*\S`,43 "u",44 );45}4647function hasSafetyJustificationBefore(48 sourceCode: SourceCode,49 owner: ESTree.Node,50 assertion: TypeAssertion,51 pattern: RegExp,52): boolean {53 return sourceCode54 .getCommentsBefore(owner)55 .some(56 (comment) => comment.end <= assertion.start && pattern.test(comment.value),57 );58}5960function hasSafetyComment(61 sourceCode: SourceCode,62 node: TypeAssertion,63 pattern: RegExp,64): boolean {65 let current: ESTree.Node = node;66 while (true) {67 if (hasSafetyJustificationBefore(sourceCode, current, node, pattern)) return true;68 if (commentOwnerKinds.has(current.type)) {69 const exportDeclaration = current.parent;70 return (71 exportDeclaration.type === "ExportNamedDeclaration" &&72 exportDeclaration.declaration === current &&73 hasSafetyJustificationBefore(sourceCode, exportDeclaration, node, pattern)74 );75 }76 if (current.parent.type === "Program") return false;77 current = current.parent;78 }79}8081/** Require every non-const type assertion to state the invariant TypeScript cannot express. */82export const requireSafetyCommentForTypeAssertionRule = defineRule({83 meta: {84 type: "problem",85 docs: {86 description:87 "Require a nearby SAFETY comment for every TypeScript type assertion except const assertions.",88 },89 messages: {90 missingSafetyComment:91 "This type assertion has no `{{marker}}:` justification. State the checked invariant immediately before the assertion or its containing statement.",92 },93 schema: [94 {95 type: "object",96 properties: {97 markers: {98 type: "array",99 items: { type: "string", minLength: 1 },100 minItems: 1,101 uniqueItems: true,102 },103 },104 additionalProperties: false,105 },106 ],107 defaultOptions: [{ markers: ["SAFETY"] }],108 },109 createOnce(context) {110 const patterns = new Map<string, RegExp>();111112 const checkAssertion = (node: TypeAssertion) => {113 if (isConstAssertion(node)) return;114 const markers = configuredSafetyMarkers(context.options?.[0]);115 const patternKey = markers.join("\u0000");116 const pattern = patterns.get(patternKey) ?? markerPattern(markers);117 patterns.set(patternKey, pattern);118 if (hasSafetyComment(context.sourceCode, node, pattern)) return;119 context.report({120 node,121 messageId: "missingSafetyComment",122 data: { marker: markers[0] ?? DEFAULT_SAFETY_MARKERS[0] },123 });124 };125126 return {127 TSAsExpression: checkAssertion,128 TSTypeAssertion: checkAssertion,129 };130 },131});
added:tools/oxlint/anti-slop/shared/array-method.ts+94 added
1import type { ESTree, Scope, SourceCode, Variable } from "@oxlint/plugins";23/** Unwrap syntax-only wrappers when inspecting array methods and accumulator references. */4export function unwrapArrayExpression(node: ESTree.Node): ESTree.Node {5 while (6 node.type === "ParenthesizedExpression" ||7 node.type === "ChainExpression" ||8 node.type === "TSAsExpression" ||9 node.type === "TSTypeAssertion" ||10 node.type === "TSNonNullExpression" ||11 node.type === "TSSatisfiesExpression"12 ) {13 node = node.expression;14 }15 return node;16}1718/** Resolve a local binding by scope, not by identifier spelling. */19export function resolveArrayBinding(sourceCode: SourceCode, node: ESTree.Node): Variable | null {20 node = unwrapArrayExpression(node);21 if (node.type !== "Identifier") return null;22 let scope: Scope | null = sourceCode.getScope(node);23 while (scope !== null) {24 const variable = scope.set.get(node.name);25 if (variable !== undefined) return variable;26 scope = scope.upper;27 }28 return null;29}3031/** Read static method names, including computed string literals, without evaluating expressions. */32export function arrayMethodTarget(33 node: ESTree.Node,34): { readonly name: string; readonly object: ESTree.Node } | null {35 node = unwrapArrayExpression(node);36 if (node.type !== "MemberExpression") return null;37 const property = node.property;38 if (!node.computed && property.type === "Identifier") {39 return { name: property.name, object: node.object };40 }41 if (node.computed && property.type === "Literal" && typeof property.value === "string") {42 return { name: property.value, object: node.object };43 }44 return null;45}4647function isArrayAnnotation(type: ESTree.TSType): boolean {48 if (type.type === "TSArrayType" || type.type === "TSTupleType") return true;49 if (type.type === "TSParenthesizedType") return isArrayAnnotation(type.typeAnnotation);50 if (type.type === "TSTypeOperator" && type.operator === "readonly") {51 return isArrayAnnotation(type.typeAnnotation);52 }53 return (54 type.type === "TSTypeReference" && type.typeName.type === "Identifier" &&55 (type.typeName.name === "Array" || type.typeName.name === "ReadonlyArray")56 );57}5859/** Recognize local array evidence; unknown receivers and iterator pipelines are deliberately excluded. */60export function isKnownArrayExpression(61 sourceCode: SourceCode,62 node: ESTree.Node,63 visited = new Set<Variable>(),64): boolean {65 node = unwrapArrayExpression(node);66 if (node.type === "ArrayExpression") return true;67 if (node.type === "CallExpression") {68 const method = arrayMethodTarget(node.callee);69 return (70 method !== null &&71 ["map", "filter", "flatMap", "slice", "concat", "toSorted", "toReversed", "toSpliced"].includes(method.name) &&72 isKnownArrayExpression(sourceCode, method.object, visited)73 );74 }75 if (node.type !== "Identifier") return false;76 const variable = resolveArrayBinding(sourceCode, node);77 if (variable === null || visited.has(variable)) return false;78 visited.add(variable);79 if (variable.references.some(reference => reference.isWrite() && !reference.init)) return false;80 for (const identifier of variable.identifiers) {81 const annotation = identifier.typeAnnotation?.typeAnnotation;82 if (annotation !== undefined) return isArrayAnnotation(annotation);83 }84 for (const definition of variable.defs) {85 if (86 definition.type === "Variable" && definition.node.type === "VariableDeclarator" &&87 definition.node.id.type === "Identifier" && definition.node.init !== null &&88 definition.node.parent.type === "VariableDeclaration" && definition.node.parent.kind === "const"89 ) {90 return isKnownArrayExpression(sourceCode, definition.node.init, visited);91 }92 }93 return false;94}
added:tools/oxlint/anti-slop/shared/dictionary-types.ts+515 added
1import type { ESTree } from "@oxlint/plugins";23import {4 createTypeAliasEnvironment,5 hasVisibleTypeBinding,6 visibleTypeAlias,7 type TypeAliasEnvironment as LexicalTypeAliasEnvironment,8} from "./type-alias-resolution.ts";910const BUILT_INS = new Set([11 "Record",12 "Readonly",13 "Partial",14 "Required",15 "Pick",16 "Omit",17 "PropertyKey",18 "NonNullable",19]);20const TRANSPARENT_WRAPPERS = new Set(["Readonly", "Partial", "Required", "NonNullable"]);2122type TypeAliasEnvironment = ReadonlyMap<string, ESTree.TSType>;2324type ResolvedType = {25 readonly type: ESTree.TSType;26 readonly substitutions: TypeAliasEnvironment;27};2829export type UnsafeDictionary = {30 readonly kind: "unsafe-dictionary";31 readonly unsafeValue: "any" | "empty-object" | "object" | "union" | "unknown";32};3334export type WideningTargetKind =35 | "anonymous object"36 | "generic container"37 | "object"38 | "open dictionary"39 | "unknown";4041export type WideningTarget = {42 readonly kind: WideningTargetKind;43};4445export type TypeEnvironment = {46 readonly interfaces: ReadonlyMap<string, readonly ESTree.TSInterfaceDeclaration[]>;47 readonly typeAliases: LexicalTypeAliasEnvironment;48};4950function declaredStatement(statement: ESTree.Statement): ESTree.Node | null {51 return statement.type === "ExportNamedDeclaration" ||52 statement.type === "ExportDefaultDeclaration"53 ? (statement.declaration ?? null)54 : statement;55}5657export function createTypeEnvironment(58 program: ESTree.Program,59 visitorKeys: Readonly<Record<string, readonly string[]>>,60): TypeEnvironment {61 const interfaces = new Map<string, ESTree.TSInterfaceDeclaration[]>();6263 for (const statement of program.body) {64 const declaration = declaredStatement(statement);65 if (declaration?.type !== "TSInterfaceDeclaration") continue;66 const declarations = interfaces.get(declaration.id.name) ?? [];67 declarations.push(declaration);68 interfaces.set(declaration.id.name, declarations);69 }7071 return {72 interfaces,73 typeAliases: createTypeAliasEnvironment(program, visitorKeys),74 };75}7677function typeReferenceName(type: ESTree.TSTypeReference): string | null {78 return type.typeName.type === "Identifier" ? type.typeName.name : null;79}8081function isBuiltIn(82 name: string,83 use: ESTree.Node,84 environment: TypeEnvironment,85): boolean {86 return (87 BUILT_INS.has(name) &&88 !hasVisibleTypeBinding(name, use, environment.typeAliases)89 );90}9192function isUnappliedReferenceTo(type: ESTree.TSType, name: string): boolean {93 const unwrapped = unwrapTransparentType(type);94 return (95 unwrapped.type === "TSTypeReference" &&96 typeReferenceName(unwrapped) === name &&97 (unwrapped.typeArguments === null ||98 unwrapped.typeArguments === undefined ||99 unwrapped.typeArguments.params.length === 0)100 );101}102103function unwrapTransparentType(type: ESTree.TSType): ESTree.TSType {104 let current = type;105 while (106 current.type === "TSParenthesizedType" ||107 (current.type === "TSTypeOperator" && current.operator === "readonly")108 ) {109 current = current.typeAnnotation;110 }111 return current;112}113114function isNeverType(type: ESTree.TSType): boolean {115 return unwrapTransparentType(type).type === "TSNeverKeyword";116}117118function isEffectivelyEmptyMember(member: ESTree.TSSignature): boolean {119 return (120 member.type === "TSPropertySignature" &&121 member.optional === true &&122 member.typeAnnotation !== null &&123 member.typeAnnotation !== undefined &&124 isNeverType(member.typeAnnotation.typeAnnotation)125 );126}127128function isEffectivelyEmptyTypeLiteral(type: ESTree.TSTypeLiteral): boolean {129 return type.members.length === 0 || type.members.every(isEffectivelyEmptyMember);130}131132function isEffectivelyEmptyInterface(133 declarations: readonly ESTree.TSInterfaceDeclaration[],134): boolean {135 if (declarations.length !== 1) return false;136 const [type] = declarations;137 return (138 type !== undefined &&139 type.extends.length === 0 &&140 (type.body.body.length === 0 || type.body.body.every(isEffectivelyEmptyMember))141 );142}143144function resolvedSubstitutionArgument(145 type: ESTree.TSType,146 base: TypeAliasEnvironment,147 resolving: ReadonlySet<string> = new Set(),148): ESTree.TSType {149 const unwrapped = unwrapTransparentType(type);150 if (unwrapped.type !== "TSTypeReference") return type;151 const name = typeReferenceName(unwrapped);152 if (name === null || resolving.has(name)) return type;153 const substitution = base.get(name);154 if (substitution === undefined) return type;155 const nextResolving = new Set(resolving);156 nextResolving.add(name);157 return resolvedSubstitutionArgument(substitution, base, nextResolving);158}159160function aliasSubstitution(161 alias: ESTree.TSTypeAliasDeclaration,162 type: ESTree.TSTypeReference,163 base: TypeAliasEnvironment,164): TypeAliasEnvironment | null {165 const parameters = alias.typeParameters?.params ?? [];166 const arguments_ = type.typeArguments?.params ?? [];167 const next = new Map(base);168 for (const [index, parameter] of parameters.entries()) {169 const argument = arguments_[index] ?? parameter.default;170 if (argument === null || argument === undefined) return null;171 next.set(parameter.name.name, resolvedSubstitutionArgument(argument, next));172 }173 return next;174}175176function unsafeDirectValue(177 type: ESTree.TSType,178 environment: TypeEnvironment,179 substitutions: TypeAliasEnvironment,180 resolvingAliases: ReadonlySet<string>,181): UnsafeDictionary["unsafeValue"] | null {182 const unwrapped = unwrapTransparentType(type);183 if (unwrapped.type === "TSUnknownKeyword") return "unknown";184 if (unwrapped.type === "TSAnyKeyword") return "any";185 if (unwrapped.type === "TSObjectKeyword") return "object";186 if (unwrapped.type === "TSTypeLiteral" && isEffectivelyEmptyTypeLiteral(unwrapped))187 return "empty-object";188 if (unwrapped.type === "TSUnionType") {189 return unwrapped.types.some(190 (member) => unsafeDirectValue(member, environment, substitutions, resolvingAliases) !== null,191 )192 ? "union"193 : null;194 }195 if (unwrapped.type === "TSIntersectionType") {196 const unsafeMembers = unwrapped.types.map((member) =>197 unsafeDirectValue(member, environment, substitutions, resolvingAliases),198 );199 if (unsafeMembers.includes("any")) return "any";200 return unsafeMembers.length > 0 && unsafeMembers.every((member) => member !== null)201 ? unsafeMembers[0]202 : null;203 }204 if (unwrapped.type !== "TSTypeReference") return null;205 const name = typeReferenceName(unwrapped);206 if (name === null) return null;207 if (TRANSPARENT_WRAPPERS.has(name) && isBuiltIn(name, unwrapped, environment)) {208 const wrapped = unwrapped.typeArguments?.params[0];209 return wrapped === undefined210 ? null211 : unsafeDirectValue(wrapped, environment, substitutions, resolvingAliases);212 }213 const substitution = substitutions.get(name);214 if (substitution !== undefined) {215 return isUnappliedReferenceTo(substitution, name)216 ? null217 : unsafeDirectValue(substitution, environment, substitutions, resolvingAliases);218 }219 const interfaceDeclarations = environment.interfaces.get(name);220 if (interfaceDeclarations !== undefined) {221 return isEffectivelyEmptyInterface(interfaceDeclarations) ? "empty-object" : null;222 }223 const alias = visibleTypeAlias(name, unwrapped, environment.typeAliases);224 if (alias === null || resolvingAliases.has(name)) return null;225 const nextSubstitutions = aliasSubstitution(alias, unwrapped, substitutions);226 if (nextSubstitutions === null) return null;227 const nextResolving = new Set(resolvingAliases);228 nextResolving.add(name);229 return unsafeDirectValue(alias.typeAnnotation, environment, nextSubstitutions, nextResolving);230}231232function dictionaryValueTypes(233 type: ESTree.TSType,234 environment: TypeEnvironment,235 substitutions: TypeAliasEnvironment,236 resolvingAliases: ReadonlySet<string>,237): readonly ResolvedType[] {238 const unwrapped = unwrapTransparentType(type);239240 if (unwrapped.type === "TSTypeLiteral") {241 return unwrapped.members.flatMap((member): readonly ResolvedType[] =>242 member.type === "TSIndexSignature" && member.typeAnnotation !== null243 ? [{ type: member.typeAnnotation.typeAnnotation, substitutions }]244 : [],245 );246 }247248 if (unwrapped.type === "TSMappedType") {249 return unwrapped.typeAnnotation === null250 ? []251 : [{ type: unwrapped.typeAnnotation, substitutions }];252 }253254 if (unwrapped.type !== "TSTypeReference") return [];255 const name = typeReferenceName(unwrapped);256 if (name === null) return [];257258 const substitution = substitutions.get(name);259 if (substitution !== undefined) {260 return isUnappliedReferenceTo(substitution, name)261 ? []262 : dictionaryValueTypes(substitution, environment, substitutions, resolvingAliases);263 }264265 if (TRANSPARENT_WRAPPERS.has(name) && isBuiltIn(name, unwrapped, environment)) {266 const wrapped = unwrapped.typeArguments?.params[0];267 return wrapped === undefined268 ? []269 : dictionaryValueTypes(wrapped, environment, substitutions, resolvingAliases);270 }271272 if (name === "Record" && isBuiltIn(name, unwrapped, environment)) {273 const value = unwrapped.typeArguments?.params[1] ?? null;274 return value === null ? [] : [{ type: value, substitutions }];275 }276277 if (278 (name === "Pick" || name === "Omit") &&279 isBuiltIn(name, unwrapped, environment)280 ) {281 const source = unwrapped.typeArguments?.params[0];282 return source === undefined283 ? []284 : dictionaryValueTypes(source, environment, substitutions, resolvingAliases);285 }286287 const alias = visibleTypeAlias(name, unwrapped, environment.typeAliases);288 if (alias === null || resolvingAliases.has(name)) return [];289 const nextSubstitutions = aliasSubstitution(alias, unwrapped, substitutions);290 if (nextSubstitutions === null) return [];291 const nextResolving = new Set(resolvingAliases);292 nextResolving.add(name);293 return dictionaryValueTypes(alias.typeAnnotation, environment, nextSubstitutions, nextResolving);294}295296export function classifyUnsafeDictionaryValue(297 valueType: ESTree.TSType,298 environment: TypeEnvironment,299): UnsafeDictionary | null {300 const unsafeValue = unsafeDirectValue(valueType, environment, new Map(), new Set());301 return unsafeValue === null ? null : { kind: "unsafe-dictionary", unsafeValue };302}303304export function classifyUnsafeDictionary(305 type: ESTree.TSType,306 environment: TypeEnvironment,307): UnsafeDictionary | null {308 for (const valueType of dictionaryValueTypes(type, environment, new Map(), new Set())) {309 const unsafeValue = unsafeDirectValue(310 valueType.type,311 environment,312 valueType.substitutions,313 new Set(),314 );315 if (unsafeValue !== null) return { kind: "unsafe-dictionary", unsafeValue };316 }317 return null;318}319320export function classifyWideningTarget(321 type: ESTree.TSType,322 environment: TypeEnvironment,323): WideningTarget | null {324 const unwrapped = unwrapTransparentType(type);325 if (unwrapped.type === "TSUnknownKeyword") return { kind: "unknown" };326 if (unwrapped.type === "TSObjectKeyword") return { kind: "object" };327 if (unwrapped.type === "TSTypeLiteral") {328 return unwrapped.members.some((member) => member.type === "TSIndexSignature")329 ? { kind: "open dictionary" }330 : unwrapped.members.length > 0331 ? { kind: "anonymous object" }332 : null;333 }334 if (unwrapped.type === "TSMappedType") return { kind: "open dictionary" };335 if (unwrapped.type !== "TSTypeReference") return null;336 const name = typeReferenceName(unwrapped);337 if (name === null) return null;338 if (TRANSPARENT_WRAPPERS.has(name) && isBuiltIn(name, unwrapped, environment)) {339 const wrapped = unwrapped.typeArguments?.params[0];340 return wrapped === undefined ? null : classifyWideningTarget(wrapped, environment);341 }342 if (name === "Record" && isBuiltIn(name, unwrapped, environment)) {343 return hasBroadRecordKey(unwrapped, environment, new Map())344 ? { kind: "open dictionary" }345 : null;346 }347 const alias = visibleTypeAlias(name, unwrapped, environment.typeAliases);348 if (alias === null) return null;349 if ((alias.typeParameters?.params.length ?? 0) > 0) {350 const substitutions = aliasSubstitution(alias, unwrapped, new Map());351 const resolved =352 substitutions === null353 ? null354 : classifyAliasBroadTarget(355 alias.typeAnnotation,356 environment,357 substitutions,358 new Set([name]),359 );360 return resolved?.kind === "open dictionary" ? { kind: "generic container" } : null;361 }362 const substitutions = aliasSubstitution(alias, unwrapped, new Map());363 if (substitutions === null) return null;364 const resolved = classifyAliasBroadTarget(365 alias.typeAnnotation,366 environment,367 substitutions,368 new Set([name]),369 );370 return resolved;371}372373function hasBroadRecordKey(374 type: ESTree.TSTypeReference,375 environment: TypeEnvironment,376 substitutions: TypeAliasEnvironment,377): boolean {378 const key = type.typeArguments?.params[0];379 return key === undefined || isBroadMappedKey(key, environment, substitutions);380}381382function isBroadMappedKey(383 type: ESTree.TSType,384 environment: TypeEnvironment,385 substitutions: TypeAliasEnvironment,386 visitedAliases: ReadonlySet<string> = new Set(),387): boolean {388 const unwrapped = unwrapTransparentType(type);389 if (390 unwrapped.type === "TSStringKeyword" ||391 unwrapped.type === "TSNumberKeyword" ||392 unwrapped.type === "TSSymbolKeyword"393 ) {394 return true;395 }396 if (unwrapped.type === "TSUnionType") {397 return unwrapped.types.some((member) =>398 isBroadMappedKey(member, environment, substitutions, visitedAliases),399 );400 }401 if (unwrapped.type !== "TSTypeReference") return false;402 const name = typeReferenceName(unwrapped);403 if (name === null) return false;404 const substitution = substitutions.get(name);405 if (substitution !== undefined && !isUnappliedReferenceTo(substitution, name)) {406 return isBroadMappedKey(substitution, environment, substitutions, visitedAliases);407 }408 if (name === "PropertyKey" && isBuiltIn(name, unwrapped, environment)) return true;409 const alias = visibleTypeAlias(name, unwrapped, environment.typeAliases);410 if (411 alias === null ||412 (alias.typeParameters?.params.length ?? 0) > 0 ||413 visitedAliases.has(name)414 ) {415 return false;416 }417 const nextVisited = new Set(visitedAliases);418 nextVisited.add(name);419 return isBroadMappedKey(alias.typeAnnotation, environment, substitutions, nextVisited);420}421422function classifyAliasBroadTarget(423 type: ESTree.TSType,424 environment: TypeEnvironment,425 substitutions: TypeAliasEnvironment,426 resolvingAliases: ReadonlySet<string>,427): WideningTarget | null {428 const unwrapped = unwrapTransparentType(type);429 if (unwrapped.type === "TSUnknownKeyword") return { kind: "unknown" };430 if (unwrapped.type === "TSObjectKeyword") return { kind: "object" };431 if (unwrapped.type === "TSTypeLiteral") {432 return unwrapped.members.some((member) => member.type === "TSIndexSignature")433 ? { kind: "open dictionary" }434 : null;435 }436 if (unwrapped.type === "TSMappedType") {437 return isBroadMappedKey(unwrapped.constraint, environment, substitutions)438 ? { kind: "open dictionary" }439 : null;440 }441 if (unwrapped.type !== "TSTypeReference") return null;442 const name = typeReferenceName(unwrapped);443 if (name === null) return null;444 const substitution = substitutions.get(name);445 if (substitution !== undefined) {446 return isUnappliedReferenceTo(substitution, name)447 ? null448 : classifyAliasBroadTarget(449 substitution,450 environment,451 substitutions,452 resolvingAliases,453 );454 }455 if (TRANSPARENT_WRAPPERS.has(name) && isBuiltIn(name, unwrapped, environment)) {456 const wrapped = unwrapped.typeArguments?.params[0];457 return wrapped === undefined458 ? null459 : classifyAliasBroadTarget(wrapped, environment, substitutions, resolvingAliases);460 }461 if (name === "Record" && isBuiltIn(name, unwrapped, environment)) {462 return hasBroadRecordKey(unwrapped, environment, substitutions)463 ? { kind: "open dictionary" }464 : null;465 }466 const alias = visibleTypeAlias(name, unwrapped, environment.typeAliases);467 if (alias === null || resolvingAliases.has(name)) return null;468 const nextSubstitutions = aliasSubstitution(alias, unwrapped, substitutions);469 if (nextSubstitutions === null) return null;470 const nextResolving = new Set(resolvingAliases);471 nextResolving.add(name);472 return classifyAliasBroadTarget(473 alias.typeAnnotation,474 environment,475 nextSubstitutions,476 nextResolving,477 );478}479480export function isPopulatedObjectExpression(expression: ESTree.Expression): boolean {481 let current = expression;482 while (483 current.type === "ParenthesizedExpression" ||484 current.type === "TSAsExpression" ||485 current.type === "TSTypeAssertion" ||486 current.type === "TSNonNullExpression"487 ) {488 current = current.expression;489 }490 return current.type === "ObjectExpression" && current.properties.length > 0;491}492493export function isKnownEvidenceExpression(expression: ESTree.Expression): boolean {494 let current = expression;495 while (496 current.type === "ParenthesizedExpression" ||497 current.type === "TSAsExpression" ||498 current.type === "TSTypeAssertion" ||499 current.type === "TSNonNullExpression" ||500 current.type === "TSSatisfiesExpression"501 ) {502 current = current.expression;503 }504 if (current.type === "ObjectExpression") return true;505 return (506 current.type === "ArrayExpression" ||507 current.type === "ArrowFunctionExpression" ||508 current.type === "ClassExpression" ||509 current.type === "FunctionExpression" ||510 current.type === "NewExpression" ||511 current.type === "Literal" ||512 current.type === "TemplateLiteral" ||513 current.type === "UnaryExpression"514 );515}
added:tools/oxlint/anti-slop/shared/function-parameters.ts+49 added
1import type { ESTree, SourceCode } from "@oxlint/plugins";23export type FunctionParameter = ESTree.ParamPattern;45/** Return whether a type is or contains TypeScript's absorbing unknown top type. */6export function containsUnknownType(type: ESTree.TSType): boolean {7 if (type.type === "TSUnknownKeyword") return true;8 if (type.type === "TSParenthesizedType") return containsUnknownType(type.typeAnnotation);9 return type.type === "TSUnionType" && type.types.some(containsUnknownType);10}1112/** Return the TypeScript annotation attached to a function parameter or its wrapped binding. */13export function functionParameterTypeAnnotation(14 parameter: FunctionParameter,15): ESTree.TSTypeAnnotation | null | undefined {16 if (parameter.type === "TSParameterProperty") {17 return functionParameterTypeAnnotation(parameter.parameter);18 }19 if (parameter.type === "RestElement") {20 return parameter.typeAnnotation ?? functionParameterTypeAnnotation(parameter.argument);21 }22 if (parameter.type === "AssignmentPattern") {23 return parameter.typeAnnotation ?? functionParameterTypeAnnotation(parameter.left);24 }25 return parameter.typeAnnotation;26}2728/** Return only a function parameter's local binding, excluding its annotation and default value. */29export function functionParameterBindingName(30 parameter: FunctionParameter,31 sourceCode: SourceCode,32): string {33 if (parameter.type === "TSParameterProperty") {34 return functionParameterBindingName(parameter.parameter, sourceCode);35 }36 if (parameter.type === "AssignmentPattern") {37 return functionParameterBindingName(parameter.left, sourceCode);38 }39 if (parameter.type === "RestElement") {40 return functionParameterBindingName(parameter.argument, sourceCode);41 }42 if (parameter.type === "Identifier") return parameter.name;4344 const sourceText = sourceCode.getText(parameter);45 const annotationStart = parameter.typeAnnotation?.start;46 return annotationStart === undefined47 ? sourceText48 : sourceText.slice(0, annotationStart - parameter.start).trimEnd();49}
added:tools/oxlint/anti-slop/shared/lexical-type-parameters.ts+61 added
1import type { ESTree } from "@oxlint/plugins";23type VisitorKeys = Readonly<Record<string, readonly string[]>>;45function isNode(value: unknown): value is ESTree.Node {6 return (7 typeof value === "object" &&8 value !== null &&9 "type" in value &&10 typeof value.type === "string"11 );12}1314function collectInferTypeParameterNames(15 node: ESTree.Node,16 visitorKeys: VisitorKeys,17 names: Set<string>,18): void {19 if (node.type === "TSInferType") names.add(node.typeParameter.name.name);20 const record = node as unknown as Readonly<Record<string, unknown>>;21 for (const key of visitorKeys[node.type] ?? []) {22 const value = record[key];23 if (isNode(value)) {24 collectInferTypeParameterNames(value, visitorKeys, names);25 continue;26 }27 if (!Array.isArray(value)) continue;28 for (const child of value) {29 if (isNode(child)) collectInferTypeParameterNames(child, visitorKeys, names);30 }31 }32}3334/** Collect type binders that are in scope at a node and can shadow module aliases. */35export function lexicalTypeParameterNames(36 node: ESTree.Node,37 visitorKeys: VisitorKeys,38): ReadonlySet<string> {39 const names = new Set<string>();40 let descendant: ESTree.Node = node;41 let current: ESTree.Node | null = node;42 while (current !== null && current.type !== "Program") {43 if ("typeParameters" in current) {44 for (const parameter of current.typeParameters?.params ?? []) {45 names.add(parameter.name.name);46 }47 }48 if (49 current.type === "TSMappedType" &&50 (descendant === current.nameType || descendant === current.typeAnnotation)51 ) {52 names.add(current.key.name);53 }54 if (current.type === "TSConditionalType" && descendant === current.trueType) {55 collectInferTypeParameterNames(current.extendsType, visitorKeys, names);56 }57 descendant = current;58 current = current.parent;59 }60 return names;61}
added:tools/oxlint/anti-slop/shared/reflect-method.ts+24 added
1import { resolveVariable } from "./scope.ts";23import type { ESTree, SourceCode } from "@oxlint/plugins";45function isGlobalReflect(sourceCode: SourceCode, expression: ESTree.Expression): boolean {6 if (expression.type !== "Identifier" || expression.name !== "Reflect") return false;7 if (sourceCode.isGlobalReference(expression)) return true;8 const variable = resolveVariable(sourceCode, expression);9 return variable === null || variable.defs.length === 0;10}1112/** Reports whether a call target names one method on the global Reflect object. */13export function isGlobalReflectMethodCall(14 sourceCode: SourceCode,15 callee: ESTree.Expression,16 methodName: string,17): boolean {18 if (!("property" in callee) || !("object" in callee) || !("computed" in callee)) return false;19 if (!isGlobalReflect(sourceCode, callee.object)) return false;20 const property = callee.property;21 return callee.computed22 ? property.type === "Literal" && property.value === methodName23 : property.type === "Identifier" && property.name === methodName;24}
added:tools/oxlint/anti-slop/shared/scope.ts+15 added
1import type { ESTree, Scope, SourceCode, Variable } from "@oxlint/plugins";23/** Resolve an identifier to its binding by walking lexical scopes upward. */4export function resolveVariable(5 sourceCode: SourceCode,6 identifier: ESTree.IdentifierReference,7): Variable | null {8 let scope: Scope | null = sourceCode.getScope(identifier);9 while (scope !== null) {10 const variable = scope.set.get(identifier.name);11 if (variable !== undefined) return variable;12 scope = scope.upper;13 }14 return null;15}
added:tools/oxlint/anti-slop/shared/type-alias-resolution.ts+250 added
1import type { ESTree } from "@oxlint/plugins";23import { lexicalTypeParameterNames } from "./lexical-type-parameters.ts";45type VisitorKeys = Readonly<Record<string, readonly string[]>>;6type TypeScope = ESTree.Node;78type TypeBinding = {9 readonly alias: ESTree.TSTypeAliasDeclaration | null;10 readonly name: string;11 readonly scope: TypeScope;12};1314type Substitution = {15 readonly substitutions: Substitutions;16 readonly type: ESTree.TSType;17};1819type Substitutions = ReadonlyMap<string, Substitution>;2021export type TypeAliasEnvironment = {22 readonly aliases: readonly ESTree.TSTypeAliasDeclaration[];23 readonly bindingsByName: ReadonlyMap<string, readonly TypeBinding[]>;24 readonly visitorKeys: VisitorKeys;25};2627export type ResolvedTypeMatcher = (28 type: ESTree.TSType,29 matches: (child: ESTree.TSType) => boolean,30) => boolean;3132const environmentsByProgram = new WeakMap<ESTree.Program, TypeAliasEnvironment>();3334function isNode(value: unknown): value is ESTree.Node {35 return (36 typeof value === "object" &&37 value !== null &&38 "type" in value &&39 typeof value.type === "string"40 );41}4243function enclosingTypeScope(node: ESTree.Node): TypeScope {44 let current: ESTree.Node | null = node.parent;45 while (current !== null) {46 if (47 current.type === "Program" ||48 current.type === "BlockStatement" ||49 current.type === "TSModuleBlock" ||50 current.type === "StaticBlock" ||51 current.type === "SwitchStatement"52 ) {53 return current;54 }55 current = current.parent;56 }57 return node;58}5960function declaredTypeBinding(node: ESTree.Node): {61 readonly alias: ESTree.TSTypeAliasDeclaration | null;62 readonly name: string;63} | null {64 if (node.type === "TSTypeAliasDeclaration") {65 return { alias: node, name: node.id.name };66 }67 if (68 node.type === "TSInterfaceDeclaration" ||69 node.type === "TSEnumDeclaration" ||70 node.type === "ClassDeclaration" ||71 node.type === "ClassExpression"72 ) {73 return node.id === null ? null : { alias: null, name: node.id.name };74 }75 if (76 node.type === "ImportSpecifier" ||77 node.type === "ImportDefaultSpecifier" ||78 node.type === "ImportNamespaceSpecifier"79 ) {80 return { alias: null, name: node.local.name };81 }82 return null;83}8485function collectTypeBindings(86 node: ESTree.Node,87 visitorKeys: VisitorKeys,88 bindingsByName: Map<string, TypeBinding[]>,89 aliases: ESTree.TSTypeAliasDeclaration[],90): void {91 const declared = declaredTypeBinding(node);92 if (declared !== null) {93 const bindings = bindingsByName.get(declared.name) ?? [];94 bindings.push({ ...declared, scope: enclosingTypeScope(node) });95 bindingsByName.set(declared.name, bindings);96 if (declared.alias !== null) aliases.push(declared.alias);97 }9899 // SAFETY: Oxlint's visitor keys identify only ESTree child-node properties.100 const fields = node as unknown as Readonly<Record<string, unknown>>;101 for (const key of visitorKeys[node.type] ?? []) {102 const value = fields[key];103 if (isNode(value)) {104 collectTypeBindings(value, visitorKeys, bindingsByName, aliases);105 continue;106 }107 if (!Array.isArray(value)) continue;108 for (const child of value) {109 if (isNode(child)) {110 collectTypeBindings(child, visitorKeys, bindingsByName, aliases);111 }112 }113 }114}115116/** Collect every lexical type alias and competing type binding in a program. */117export function createTypeAliasEnvironment(118 program: ESTree.Program,119 visitorKeys: VisitorKeys,120): TypeAliasEnvironment {121 const cached = environmentsByProgram.get(program);122 if (cached !== undefined) return cached;123 const bindingsByName = new Map<string, TypeBinding[]>();124 const aliases: ESTree.TSTypeAliasDeclaration[] = [];125 collectTypeBindings(program, visitorKeys, bindingsByName, aliases);126 const environment = { aliases, bindingsByName, visitorKeys };127 environmentsByProgram.set(program, environment);128 return environment;129}130131function ancestorDistance(ancestor: ESTree.Node, node: ESTree.Node): number | null {132 let current: ESTree.Node | null = node;133 let distance = 0;134 while (current !== null) {135 if (current === ancestor) return distance;136 current = current.parent;137 distance += 1;138 }139 return null;140}141142function nearestTypeBindings(143 name: string,144 use: ESTree.Node,145 environment: TypeAliasEnvironment,146): readonly TypeBinding[] {147 const candidates = environment.bindingsByName.get(name) ?? [];148 let nearestDistance = Number.POSITIVE_INFINITY;149 let nearest: TypeBinding[] = [];150 for (const candidate of candidates) {151 const distance = ancestorDistance(candidate.scope, use);152 if (distance === null || distance > nearestDistance) continue;153 if (distance === nearestDistance) {154 nearest.push(candidate);155 continue;156 }157 nearestDistance = distance;158 nearest = [candidate];159 }160 return nearest;161}162163/** Resolve the nearest visible alias with this name, respecting lexical shadowing. */164export function visibleTypeAlias(165 name: string,166 use: ESTree.Node,167 environment: TypeAliasEnvironment,168): ESTree.TSTypeAliasDeclaration | null {169 if (lexicalTypeParameterNames(use, environment.visitorKeys).has(name)) return null;170 const bindings = nearestTypeBindings(name, use, environment);171 return bindings.length === 1 ? (bindings[0]?.alias ?? null) : null;172}173174/** Return whether a local declaration shadows a built-in type at this use. */175export function hasVisibleTypeBinding(176 name: string,177 use: ESTree.Node,178 environment: TypeAliasEnvironment,179): boolean {180 return (181 lexicalTypeParameterNames(use, environment.visitorKeys).has(name) ||182 nearestTypeBindings(name, use, environment).length > 0183 );184}185186function typeReferenceName(type: ESTree.TSTypeReference): string | null {187 return type.typeName.type === "Identifier" ? type.typeName.name : null;188}189190function aliasSubstitutions(191 alias: ESTree.TSTypeAliasDeclaration,192 reference: ESTree.TSTypeReference,193 base: Substitutions,194): Substitutions | null {195 const parameters = alias.typeParameters?.params ?? [];196 const arguments_ = reference.typeArguments?.params ?? [];197 const next = new Map(base);198 for (const [index, parameter] of parameters.entries()) {199 const explicitArgument = arguments_[index];200 const argument = explicitArgument ?? parameter.default;201 if (argument === null || argument === undefined) return null;202 const argumentSubstitutions = explicitArgument === undefined ? next : base;203 next.set(parameter.name.name, {204 type: argument,205 substitutions: new Map(argumentSubstitutions),206 });207 }208 return next;209}210211/** Match a type after resolving visible aliases and substituting their type parameters. */212export function resolvedTypeMatches(213 type: ESTree.TSType,214 environment: TypeAliasEnvironment,215 matcher: ResolvedTypeMatcher,216): boolean {217 const evaluate = (218 current: ESTree.TSType,219 substitutions: Substitutions,220 resolvingAliases: ReadonlySet<ESTree.TSTypeAliasDeclaration>,221 ): boolean => {222 if (current.type === "TSTypeReference") {223 const name = typeReferenceName(current);224 if (name !== null) {225 const substitution = substitutions.get(name);226 if (substitution !== undefined && !current.typeArguments?.params.length) {227 return evaluate(228 substitution.type,229 substitution.substitutions,230 resolvingAliases,231 );232 }233 const alias = visibleTypeAlias(name, current, environment);234 if (alias !== null && !resolvingAliases.has(alias)) {235 const nextSubstitutions = aliasSubstitutions(alias, current, substitutions);236 if (nextSubstitutions !== null) {237 const nextResolving = new Set(resolvingAliases);238 nextResolving.add(alias);239 return evaluate(alias.typeAnnotation, nextSubstitutions, nextResolving);240 }241 }242 }243 }244 return matcher(current, (child) =>245 evaluate(child, substitutions, resolvingAliases),246 );247 };248249 return evaluate(type, new Map(), new Set());250}
added:tools/oxlint/anti-slop/vendor/eslint-stylistic/LICENSE+22 added
1MIT License23Copyright OpenJS Foundation and other contributors, <www.openjsf.org>4Copyright (c) 2023-PRESENT ESLint Stylistic contributors56Permission is hereby granted, free of charge, to any person obtaining a copy7of this software and associated documentation files (the "Software"), to deal8in the Software without restriction, including without limitation the rights9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell10copies of the Software, and to permit persons to whom the Software is11furnished to do so, subject to the following conditions:1213The above copyright notice and this permission notice shall be included in all14copies or substantial portions of the Software.1516THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE22SOFTWARE.
added:tools/oxlint/anti-slop/vendor/eslint-stylistic/padding-line-ast.ts+51 added
1// Local replacements for the upstream helper imports. See UPSTREAM.md.2import type { ESTree, SourceCode, Token as SyntaxToken, Comment, Location } from "@oxlint/plugins";34type Token = SyntaxToken | Comment;56/** Line terminators recognized by the upstream padding matcher. */7export const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]);89/** Test a closing brace without treating comment text as punctuation. */10export const isClosingBraceToken = (token: Token): boolean =>11 token.type === "Punctuator" && token.value === "}";1213/** Test a semicolon without treating comment text as punctuation. */14export const isSemicolonToken = (token: Token): boolean =>15 token.type === "Punctuator" && token.value === ";";1617/** Filter the optional final semicolon when identifying block-like statements. */18export const isNotSemicolonToken = (token: Token): boolean => !isSemicolonToken(token);1920/** Compare token/node boundaries, including attached comments. */21export const isTokenOnSameLine = (left: { loc: Location }, right: { loc: Location }): boolean =>22 left.loc.end.line === right.loc.start.line;2324/** Recognize declarations and expressions used by the upstream IIFE matcher. */25export const isFunction = (node: ESTree.Node): boolean =>26 node.type === "FunctionDeclaration" ||27 node.type === "FunctionExpression" ||28 node.type === "ArrowFunctionExpression";2930/** Preserve the upstream multiline statement heuristic. */31export const isSingleLine = (node: ESTree.Node): boolean =>32 node.loc.start.line === node.loc.end.line;3334/** Unwrap optional chaining before checking IIFE syntax. */35export const skipChainExpression = (node: ESTree.Node): ESTree.Node =>36 node.type === "ChainExpression" ? node.expression : node;3738/** Only a program or function-body expression can begin a directive prologue. */39export const isTopLevelExpressionStatement = (40 node: ESTree.Node,41): node is ESTree.ExpressionStatement =>42 node.type === "ExpressionStatement" &&43 (node.parent.type === "Program" ||44 (node.parent.type === "BlockStatement" && isFunction(node.parent.parent)));4546/** A single wrapping pair suffices to exclude a string from directive syntax. */47export function isParenthesized(node: ESTree.Node, sourceCode: SourceCode): boolean {48 const before = sourceCode.getTokenBefore(node);49 const after = sourceCode.getTokenAfter(node);50 return before?.value === "(" && after?.value === ")";51}
added:tools/oxlint/anti-slop/vendor/eslint-stylistic/padding-line-between-statements.ts+906 added
1// Vendored from ESLint Stylistic; see UPSTREAM.md and LICENSE in this directory.2import type { ESTree, Context as RuleContext, SourceCode, Token as SyntaxToken, Comment, CreateRule, Location } from '@oxlint/plugins'3type ASTNode = ESTree.Node4type Token = SyntaxToken | Comment5import type {6 RuleOptions,7 SelectorOption,8 StatementOption,9} from './padding-line-options.d.ts'10import {11 isClosingBraceToken,12 isFunction,13 isNotSemicolonToken,14 isParenthesized,15 isSemicolonToken,16 isSingleLine,17 isTokenOnSameLine,18 isTopLevelExpressionStatement,19 LINEBREAKS,20 skipChainExpression,21} from './padding-line-ast.ts'2223const CJS_EXPORT = /^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u24const CJS_IMPORT = /^require\(/u2526/**27 * This rule is a replica of padding-line-between-statements.28 *29 * Ideally we would want to extend the rule support typescript specific support.30 * But since not all the state is exposed by the eslint and eslint has frozen stylistic rules,31 * (see - https://eslint.org/blog/2020/05/changes-to-rules-policies for details.)32 * we are forced to re-implement the rule here.33 *34 * We have tried to keep the implementation as close as possible to the eslint implementation, to make35 * patching easier for future contributors.36 *37 * Reference rule - https://github.com/eslint/eslint/blob/main/lib/rules/padding-line-between-statements.js38 */3940type NodeTest = (41 node: ASTNode,42 sourceCode: SourceCode,43) => boolean4445interface NodeTestObject {46 test: NodeTest47}4849const LT = `[${Array.from(LINEBREAKS).join('')}]`50const PADDING_LINE_SEQUENCE = new RegExp(51 String.raw`^(\s*?${LT})\s*${LT}(\s*;?)$`,52 'u',53)5455function isSelectorOption(option: StatementOption): option is SelectorOption {56 return typeof option === 'object' && !Array.isArray(option)57}5859/**60 * Creates tester which check if a node starts with specific keyword with the61 * appropriate AST_NODE_TYPES.62 * @param keyword The keyword to test.63 * @returns the created tester.64 * @private65 */66function newKeywordTester(67 type: string | string[],68 keyword: string,69): NodeTestObject {70 return {71 test(node, sourceCode): boolean {72 const isSameKeyword = sourceCode.getFirstToken(node)?.value === keyword73 const isSameType = Array.isArray(type)74 ? type.includes(node.type)75 : type === node.type7677 return isSameKeyword && isSameType78 },79 }80}8182/**83 * Creates tester which check if a node is specific type.84 * @param type The node type to test.85 * @returns the created tester.86 * @private87 */88function newNodeTypeTester(type: string): NodeTestObject {89 return {90 test: (node): boolean => node.type === type,91 }92}9394/**95 * Checks the given node is an expression statement of IIFE.96 * @param node The node to check.97 * @returns `true` if the node is an expression statement of IIFE.98 * @private99 */100function isIIFEStatement(node: ASTNode): boolean {101 if (node.type === 'ExpressionStatement') {102 let expression = skipChainExpression(node.expression)103 if (expression.type === 'UnaryExpression')104 expression = skipChainExpression(expression.argument)105106 if (expression.type === 'CallExpression') {107 let node: ASTNode = expression.callee108 while (node.type === 'SequenceExpression') {109 const lastExpression = node.expressions.at(-1)110 if (lastExpression === undefined)111 throw new Error('Padding rule invariant: sequence expression is empty')112 node = lastExpression113 }114115 return isFunction(node)116 }117 }118 return false119}120121/**122 * Checks the given node is a CommonJS require statement123 * @param node The node to check.124 * @returns `true` if the node is a CommonJS require statement.125 * @private126 */127function isCJSRequire(node: ASTNode): boolean {128 if (node.type === 'VariableDeclaration') {129 const declaration = node.declarations[0]130 if (declaration?.init) {131 let call = declaration?.init132 while (call.type === 'MemberExpression')133 call = call.object134135 if (136 call.type === 'CallExpression'137 && call.callee.type === 'Identifier'138 ) {139 return call.callee.name === 'require'140 }141 }142 }143 return false144}145146/**147 * Checks whether the given node is a block-like statement.148 * This checks the last token of the node is the closing brace of a block.149 * @param sourceCode The source code to get tokens.150 * @param node The node to check.151 * @returns `true` if the node is a block-like statement.152 * @private153 */154function isBlockLikeStatement(155 node: ASTNode,156 sourceCode: SourceCode,157): boolean {158 // do-while with a block is a block-like statement.159 if (160 node.type === 'DoWhileStatement'161 && node.body.type === 'BlockStatement'162 ) {163 return true164 }165166 /**167 * IIFE is a block-like statement specially from168 * JSCS#disallowPaddingNewLinesAfterBlocks.169 */170 if (isIIFEStatement(node))171 return true172173 // Checks the last token is a closing brace of blocks.174 const lastToken = sourceCode.getLastToken(node, isNotSemicolonToken)175 const belongingNode176 = lastToken && isClosingBraceToken(lastToken)177 ? sourceCode.getNodeByRangeIndex(lastToken.range[0])178 : null179180 return (181 !!belongingNode182 && (belongingNode.type === 'BlockStatement'183 || belongingNode.type === 'SwitchStatement')184 )185}186187/**188 * Check whether the given node is a directive or not.189 * @param node The node to check.190 * @param sourceCode The source code object to get tokens.191 * @returns `true` if the node is a directive.192 */193function isDirective(194 node: ASTNode,195 sourceCode: SourceCode,196): boolean {197 return (198 isTopLevelExpressionStatement(node)199 && node.expression.type === 'Literal'200 && typeof node.expression.value === 'string'201 && !isParenthesized(node.expression, sourceCode)202 )203}204205/**206 * Check whether the given node is a part of directive prologue or not.207 * @param node The node to check.208 * @param sourceCode The source code object to get tokens.209 * @returns `true` if the node is a part of directive prologue.210 */211function isDirectivePrologue(212 node: ASTNode,213 sourceCode: SourceCode,214): boolean {215 if (216 isDirective(node, sourceCode)217 && node.parent218 && 'body' in node.parent219 && Array.isArray(node.parent.body)220 ) {221 for (const sibling of node.parent.body) {222 if (sibling === node)223 break224225 if (!isDirective(sibling, sourceCode))226 return false227 }228 return true229 }230 return false231}232233/**234 * Checks the given node is a CommonJS export statement235 * @param node The node to check.236 * @returns `true` if the node is a CommonJS export statement.237 * @private238 */239function isCJSExport(node: ASTNode): boolean {240 if (node.type === 'ExpressionStatement') {241 const expression = node.expression242 if (expression.type === 'AssignmentExpression') {243 let left = expression.left244 if (left.type === 'MemberExpression') {245 while (left.object.type === 'MemberExpression')246 left = left.object247248 return (249 left.object.type === 'Identifier'250 && (left.object.name === 'exports'251 || (left.object.name === 'module'252 && left.property.type === 'Identifier'253 && left.property.name === 'exports'))254 )255 }256 }257 }258 return false259}260261/**262 * Check whether the given node is an expression263 * @param node The node to check.264 * @param sourceCode The source code object to get tokens.265 * @returns `true` if the node is an expression266 */267function isExpression(268 node: ASTNode,269 sourceCode: SourceCode,270): boolean {271 return (272 node.type === 'ExpressionStatement'273 && !isDirectivePrologue(node, sourceCode)274 )275}276277/**278 * Gets the actual last token.279 *280 * If a semicolon is semicolon-less style's semicolon, this ignores it.281 * For example:282 *283 * foo()284 * ;[1, 2, 3].forEach(bar)285 * @param sourceCode The source code to get tokens.286 * @param node The node to get.287 * @returns The actual last token.288 * @private289 */290function getActualLastToken(291 node: ASTNode,292 sourceCode: SourceCode,293): Token | null {294 const semiToken = sourceCode.getLastToken(node)!295 const prevToken = sourceCode.getTokenBefore(semiToken)296 const nextToken = sourceCode.getTokenAfter(semiToken)297 const isSemicolonLessStyle298 = prevToken299 && nextToken300 && prevToken.range[0] >= node.range[0]301 && isSemicolonToken(semiToken)302 && !isTokenOnSameLine(prevToken, semiToken)303 && isTokenOnSameLine(semiToken, nextToken)304305 return isSemicolonLessStyle ? prevToken : semiToken306}307308/**309 * This returns the concatenation of the first 2 captured strings.310 * @param _ Unused. Whole matched string.311 * @param trailingSpaces The trailing spaces of the first line.312 * @param indentSpaces The indentation spaces of the last line.313 * @returns The concatenation of trailingSpaces and indentSpaces.314 * @private315 */316function replacerToRemovePaddingLines(317 _: string,318 trailingSpaces: string,319 indentSpaces: string,320): string {321 return trailingSpaces + indentSpaces322}323324function getReportLoc(node: ASTNode, sourceCode: SourceCode): Location {325 if (isSingleLine(node))326 return node.loc327328 const line = node.loc.start.line329 const sourceLine = sourceCode.lines[line - 1]330 if (sourceLine === undefined)331 throw new Error('Padding rule invariant: statement source line is missing')332333 return {334 start: node.loc.start,335 end: {336 line,337 column: sourceLine.length,338 },339 }340}341342/**343 * Check and report statements for `any` configuration.344 * It does nothing.345 *346 * @private347 */348function verifyForAny(): void {349 // Empty350}351352/**353 * Check and report statements for `never` configuration.354 * This autofix removes blank lines between the given 2 statements.355 * However, if comments exist between 2 blank lines, it does not remove those356 * blank lines automatically.357 * @param context The rule context to report.358 * @param _ Unused. The previous node to check.359 * @param nextNode The next node to check.360 * @param paddingLines The array of token pairs that blank361 * lines exist between the pair.362 *363 * @private364 */365function verifyForNever(366 context: RuleContext,367 _: ASTNode,368 nextNode: ASTNode,369 paddingLines: [Token, Token][],370): void {371 if (paddingLines.length === 0)372 return373374 context.report({375 node: nextNode,376 messageId: 'unexpectedBlankLine',377 loc: getReportLoc(nextNode, context.sourceCode),378 fix(fixer) {379 if (paddingLines.length >= 2)380 return null381382 const paddingPair = paddingLines[0]383 if (paddingPair === undefined)384 throw new Error('Padding rule invariant: reported padding pair is missing')385 const [prevToken, nextToken] = paddingPair386 const start = prevToken.range[1]387 const end = nextToken.range[0]388 const text = context389 .sourceCode390 .text391 .slice(start, end)392 .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines)393394 return fixer.replaceTextRange([start, end], text)395 },396 })397}398399/**400 * Check and report statements for `always` configuration.401 * This autofix inserts a blank line between the given 2 statements.402 * If the `prevNode` has trailing comments, it inserts a blank line after the403 * trailing comments.404 * @param context The rule context to report.405 * @param prevNode The previous node to check.406 * @param nextNode The next node to check.407 * @param paddingLines The array of token pairs that blank408 * lines exist between the pair.409 *410 * @private411 */412function verifyForAlways(413 context: RuleContext,414 prevNode: ASTNode,415 nextNode: ASTNode,416 paddingLines: [Token, Token][],417): void {418 if (paddingLines.length > 0)419 return420421 context.report({422 node: nextNode,423 messageId: 'expectedBlankLine',424 loc: getReportLoc(nextNode, context.sourceCode),425 fix(fixer) {426 const sourceCode = context.sourceCode427 let prevToken = getActualLastToken(prevNode, sourceCode)!428 const nextToken429 = sourceCode.getFirstTokenBetween(prevToken, nextNode, {430 includeComments: true,431432 /**433 * Skip the trailing comments of the previous node.434 * This inserts a blank line after the last trailing comment.435 *436 * For example:437 *438 * foo(); // trailing comment.439 * // comment.440 * bar();441 *442 * Get fixed to:443 *444 * foo(); // trailing comment.445 *446 * // comment.447 * bar();448 * @param token The token to check.449 * @returns `true` if the token is not a trailing comment.450 * @private451 */452 filter(token) {453 if (isTokenOnSameLine(prevToken, token)) {454 prevToken = token455 return false456 }457 return true458 },459 })! || nextNode460 const insertText = isTokenOnSameLine(prevToken, nextToken)461 ? '\n\n'462 : '\n'463464 return fixer.insertTextAfter(prevToken, insertText)465 },466 })467}468469/**470 * Types of blank lines.471 * `any`, `never`, and `always` are defined.472 * Those have `verify` method to check and report statements.473 * @private474 */475const PaddingTypes = {476 any: { verify: verifyForAny },477 never: { verify: verifyForNever },478 always: { verify: verifyForAlways },479}480481const MaybeMultilineStatementType: Record<string, NodeTestObject> = {482 'block-like': { test: isBlockLikeStatement },483 'expression': { test: isExpression },484 'return': newKeywordTester('ReturnStatement', 'return'),485 'export': newKeywordTester(486 [487 'ExportAllDeclaration',488 'ExportDefaultDeclaration',489 'ExportNamedDeclaration',490 ],491 'export',492 ),493 'var': newKeywordTester('VariableDeclaration', 'var'),494 'let': newKeywordTester('VariableDeclaration', 'let'),495 'const': newKeywordTester('VariableDeclaration', 'const'),496 'using': {497 test: node => node.type === 'VariableDeclaration'498 && (node.kind === 'using' || node.kind === 'await using'),499 },500 'type': newKeywordTester('TSTypeAliasDeclaration', 'type'),501}502503/**504 * Types of statements.505 * Those have `test` method to check it matches to the given statement.506 * @private507 */508const StatementTypes: Record<string, NodeTestObject> = {509 '*': { test: (): boolean => true },510 'exports': { test: isCJSExport },511 'require': { test: isCJSRequire },512 'directive': { test: isDirectivePrologue },513 'iife': { test: isIIFEStatement },514515 'block': newNodeTypeTester('BlockStatement'),516 'empty': newNodeTypeTester('EmptyStatement'),517 'function': newNodeTypeTester('FunctionDeclaration'),518 'ts-method': newNodeTypeTester('TSMethodSignature'),519520 'break': newKeywordTester('BreakStatement', 'break'),521 'case': newKeywordTester('SwitchCase', 'case'),522 'class': newKeywordTester('ClassDeclaration', 'class'),523 'continue': newKeywordTester('ContinueStatement', 'continue'),524 'debugger': newKeywordTester('DebuggerStatement', 'debugger'),525 'default': newKeywordTester(526 ['SwitchCase', 'ExportDefaultDeclaration'],527 'default',528 ),529 'do': newKeywordTester('DoWhileStatement', 'do'),530 'for': newKeywordTester(531 [532 'ForStatement',533 'ForInStatement',534 'ForOfStatement',535 ],536 'for',537 ),538 'if': newKeywordTester('IfStatement', 'if'),539 'import': newKeywordTester('ImportDeclaration', 'import'),540 'switch': newKeywordTester('SwitchStatement', 'switch'),541 'throw': newKeywordTester('ThrowStatement', 'throw'),542 'try': newKeywordTester('TryStatement', 'try'),543 'while': newKeywordTester(544 ['WhileStatement', 'DoWhileStatement'],545 'while',546 ),547 'with': newKeywordTester('WithStatement', 'with'),548549 'cjs-export': {550 test: (node, sourceCode) => node.type === 'ExpressionStatement'551 && node.expression.type === 'AssignmentExpression'552 && CJS_EXPORT.test(sourceCode.getText(node.expression.left)),553 },554 'cjs-import': {555 test: (node, sourceCode) => node.type === 'VariableDeclaration'556 && node.declarations.length > 0557 && node.declarations[0]?.init != null558 && CJS_IMPORT.test(sourceCode.getText(node.declarations[0].init)),559 },560561 'enum': newKeywordTester(562 'TSEnumDeclaration',563 'enum',564 ),565 'interface': newKeywordTester(566 'TSInterfaceDeclaration',567 'interface',568 ),569 'function-overload': newNodeTypeTester('TSDeclareFunction'),570 ...Object.fromEntries(571 Object.entries(MaybeMultilineStatementType)572 .flatMap(([key, value]) => [573 [key, value],574 [575 `singleline-${key}`,576 {577 ...value,578 test: (node, sourceCode) => value.test(node, sourceCode) && isSingleLine(node),579 },580 ],581 [582 `multiline-${key}`,583 {584 ...value,585 test: (node, sourceCode) => value.test(node, sourceCode) && !isSingleLine(node),586 },587 ],588 ]),589 ),590}591592/** Build the vendored padding rule with caller-owned, typed policy options. */593export default function createPaddingLineRule(options: RuleOptions): CreateRule {594return {595 meta: {596 type: 'layout',597 docs: {598 description: 'Require or disallow padding lines between statements',599 },600 fixable: 'whitespace',601 hasSuggestions: false,602 // This is intentionally an array schema as you can pass 0..n config objects603 schema: {604 $defs: {605 paddingType: {606 type: 'string',607 enum: Object.keys(PaddingTypes),608 },609 statementType: {610 type: 'string',611 enum: Object.keys(StatementTypes),612 },613 selectorOption: {614 type: 'object',615 properties: {616 selector: {617 type: 'string',618 },619 lineMode: {620 type: 'string',621 enum: ['any', 'singleline', 'multiline'],622 },623 },624 required: ['selector'],625 additionalProperties: false,626 },627 statementMatcher: {628 anyOf: [629 { $ref: '#/$defs/statementType' },630 { $ref: '#/$defs/selectorOption' },631 ],632 },633 statementOption: {634 anyOf: [635 { $ref: '#/$defs/statementMatcher' },636 {637 type: 'array',638 items: { $ref: '#/$defs/statementMatcher' },639 minItems: 1,640 uniqueItems: true,641 additionalItems: false,642 },643 ],644 },645 },646 type: 'array',647 additionalItems: false,648 items: {649 type: 'object',650 properties: {651 blankLine: { $ref: '#/$defs/paddingType' },652 prev: { $ref: '#/$defs/statementOption' },653 next: { $ref: '#/$defs/statementOption' },654 },655 additionalProperties: false,656 required: ['blankLine', 'prev', 'next'],657 },658 },659 messages: {660 unexpectedBlankLine: 'Unexpected blank line before this statement.',661 expectedBlankLine: 'Expected blank line before this statement.',662 },663 },664 create(context) {665 const sourceCode = context.sourceCode666667 const selectorMatchedNodes = new Map<string, Set<ASTNode>>()668 const pendingPairs: { prevNode: ASTNode, nextNode: ASTNode }[] = []669670 function collectSelectorOption(option: StatementOption): void {671 if (Array.isArray(option)) {672 for (const item of option)673 collectSelectorOption(item)674 return675 }676677 if (!isSelectorOption(option))678 return679680 selectorMatchedNodes.set(option.selector, new Set())681 }682683 for (const configure of options) {684 collectSelectorOption(configure.prev)685 collectSelectorOption(configure.next)686 }687688 type Scope = {689 upper: Scope690 prevNode: ASTNode | null691 } | null692693 let scopeInfo: Scope = null694695 /**696 * Processes to enter to new scope.697 * This manages the current previous statement.698 *699 * @private700 */701 function enterScope(): void {702 scopeInfo = {703 upper: scopeInfo,704 prevNode: null,705 }706 }707708 /**709 * Processes to exit from the current scope.710 *711 * @private712 */713 function exitScope(): void {714 if (scopeInfo)715 scopeInfo = scopeInfo.upper716 }717718 /**719 * Checks whether the given node matches the given type.720 * @param node The statement node to check.721 * @param type The statement type to check.722 * @returns `true` if the statement node matched the type.723 * @private724 */725 function match(node: ASTNode, type: StatementOption): boolean {726 let innerStatementNode = node727728 while (innerStatementNode.type === 'LabeledStatement')729 innerStatementNode = innerStatementNode.body730731 if (Array.isArray(type))732 return type.some(match.bind(null, innerStatementNode))733734 if (isSelectorOption(type)) {735 const matchedNodes = selectorMatchedNodes.get(type.selector)736 if (!matchedNodes?.has(innerStatementNode))737 return false738739 const lineMode = type.lineMode740741 if (lineMode === 'singleline')742 return isSingleLine(innerStatementNode)743 else if (lineMode === 'multiline')744 return !isSingleLine(innerStatementNode)745746 return true747 }748 else {749 const statementType = StatementTypes[type]750 if (statementType === undefined)751 throw new Error(`Padding rule invariant: unsupported statement type ${type}`)752 return statementType.test(innerStatementNode, sourceCode)753 }754 }755756 /**757 * Finds the last matched configure from options.758 * @param prevNode The previous statement to match.759 * @param nextNode The current statement to match.760 * @returns The tester of the last matched configure.761 * @private762 */763 function getPaddingType(764 prevNode: ASTNode,765 nextNode: ASTNode,766 ): (typeof PaddingTypes)[keyof typeof PaddingTypes] {767 for (let i = options.length - 1; i >= 0; --i) {768 const configure = options[i]769 if (configure === undefined)770 throw new Error('Padding rule invariant: configuration entry is missing')771 if (772 match(prevNode, configure.prev)773 && match(nextNode, configure.next)774 ) {775 return PaddingTypes[configure.blankLine]776 }777 }778 return PaddingTypes.any779 }780781 /**782 * Gets padding line sequences between the given 2 statements.783 * Comments are separators of the padding line sequences.784 * @param prevNode The previous statement to count.785 * @param nextNode The current statement to count.786 * @returns The array of token pairs.787 * @private788 */789 function getPaddingLineSequences(790 prevNode: ASTNode,791 nextNode: ASTNode,792 ): [Token, Token][] {793 const pairs: [Token, Token][] = []794 let prevToken: Token = getActualLastToken(prevNode, sourceCode)!795796 if (nextNode.loc.start.line - prevToken.loc.end.line >= 2) {797 do {798 const token: Token = sourceCode.getTokenAfter(prevToken, {799 includeComments: true,800 })!801802 if (token.loc.start.line - prevToken.loc.end.line >= 2)803 pairs.push([prevToken, token])804805 prevToken = token806 } while (prevToken.range[0] < nextNode.range[0])807 }808809 return pairs810 }811812 /**813 * Verify padding lines between the given node and the previous node.814 * @param node The node to verify.815 *816 * @private817 */818 function verify(node: ASTNode): void {819 if (820 !node.parent821 || ![822 'BlockStatement',823 'Program',824 'StaticBlock',825 'SwitchCase',826 'SwitchStatement',827 'TSInterfaceBody',828 'TSModuleBlock',829 'TSTypeLiteral',830 ].includes(node.parent.type)831 ) {832 return833 }834835 // Save this node as the current previous statement.836 const prevNode = scopeInfo!.prevNode837838 // Verify.839 if (prevNode)840 pendingPairs.push({ prevNode, nextNode: node })841842 scopeInfo!.prevNode = node843 }844845 function verifyPendingPairs(): void {846 for (const { prevNode, nextNode } of pendingPairs) {847 const type = getPaddingType(prevNode, nextNode)848 const paddingLines = getPaddingLineSequences(prevNode, nextNode)849850 type.verify(context, prevNode, nextNode, paddingLines)851 }852 }853854 /**855 * Verify padding lines between the given node and the previous node.856 * Then process to enter to new scope.857 * @param node The node to verify.858 *859 * @private860 */861 function verifyThenEnterScope(node: ASTNode): void {862 verify(node)863 enterScope()864 }865866 const selectorMatchListeners = Object.fromEntries(867 Array.from(selectorMatchedNodes.keys(), selector => [868 selector,869 (node: ASTNode): void => {870 selectorMatchedNodes.get(selector)?.add(node)871 },872 ]),873 )874875 return {876 'Program': enterScope,877 'Program:exit': () => {878 verifyPendingPairs()879 exitScope()880 },881 'BlockStatement': enterScope,882 'BlockStatement:exit': exitScope,883 'SwitchStatement': enterScope,884 'SwitchStatement:exit': exitScope,885 'SwitchCase': verifyThenEnterScope,886 'SwitchCase:exit': exitScope,887 'StaticBlock': enterScope,888 'StaticBlock:exit': exitScope,889890 'TSInterfaceBody': enterScope,891 'TSInterfaceBody:exit': exitScope,892 'TSModuleBlock': enterScope,893 'TSModuleBlock:exit': exitScope,894 'TSTypeLiteral': enterScope,895 'TSTypeLiteral:exit': exitScope,896 'TSDeclareFunction': verifyThenEnterScope,897 'TSDeclareFunction:exit': exitScope,898 'TSMethodSignature': verifyThenEnterScope,899 'TSMethodSignature:exit': exitScope,900901 ':statement': verify,902 ...selectorMatchListeners,903 }904 },905}906}
added:tools/oxlint/anti-slop/vendor/eslint-stylistic/padding-line-options.d.ts+87 added
1/* GENERATED, DO NOT EDIT DIRECTLY */23/* @checksum: 3QCTtOH6rJM5_AGJ58rGpeEaBEfaJz17MSCxWB4X_PU */45export type PaddingType = 'any' | 'never' | 'always'6export type StatementOption =7 | StatementMatcher8 | [StatementMatcher, ...StatementMatcher[]]9export type StatementMatcher =10 | StatementType11 | SelectorOption12export type StatementType =13 | '*'14 | 'exports'15 | 'require'16 | 'directive'17 | 'iife'18 | 'block'19 | 'empty'20 | 'function'21 | 'ts-method'22 | 'break'23 | 'case'24 | 'class'25 | 'continue'26 | 'debugger'27 | 'default'28 | 'do'29 | 'for'30 | 'if'31 | 'import'32 | 'switch'33 | 'throw'34 | 'try'35 | 'while'36 | 'with'37 | 'cjs-export'38 | 'cjs-import'39 | 'enum'40 | 'interface'41 | 'function-overload'42 | 'block-like'43 | 'singleline-block-like'44 | 'multiline-block-like'45 | 'expression'46 | 'singleline-expression'47 | 'multiline-expression'48 | 'return'49 | 'singleline-return'50 | 'multiline-return'51 | 'export'52 | 'singleline-export'53 | 'multiline-export'54 | 'var'55 | 'singleline-var'56 | 'multiline-var'57 | 'let'58 | 'singleline-let'59 | 'multiline-let'60 | 'const'61 | 'singleline-const'62 | 'multiline-const'63 | 'using'64 | 'singleline-using'65 | 'multiline-using'66 | 'type'67 | 'singleline-type'68 | 'multiline-type'69export type PaddingLineBetweenStatementsSchema0 = {70 blankLine: PaddingType71 prev: StatementOption72 next: StatementOption73}[]7475export interface SelectorOption {76 selector: string77 lineMode?: 'any' | 'singleline' | 'multiline'78}7980export type PaddingLineBetweenStatementsRuleOptions81 = PaddingLineBetweenStatementsSchema08283export type RuleOptions84 = PaddingLineBetweenStatementsRuleOptions85export type MessageIds =86 | 'unexpectedBlankLine'87 | 'expectedBlankLine'
added:tools/oxlint/anti-slop/vendor/eslint-stylistic/UPSTREAM.md+28 added
1# Vendored padding-line-between-statements23Source: [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic), commit `435c3ea0fd26a5fef9042c4b36b6e165fbbf8d08`.45Copied files:67- `packages/eslint-plugin/rules/padding-line-between-statements/padding-line-between-statements.ts`8- `packages/eslint-plugin/rules/padding-line-between-statements/types.d.ts` → `padding-line-options.d.ts`9- Root `LICENSE`, retained verbatim. Both OpenJS Foundation and ESLint Stylistic notices apply.1011The rule is MIT-licensed. Keep `LICENSE` with every redistributed copy, including skill assets. No Stylistic, ESLint, TypeScript-ESLint, or additional parser runtime dependency is required.1213## Local adaptations1415- Replace upstream type aliases with Oxlint's ESTree, context, token/comment, and rule types. Upstream's token type includes comments; Oxlint exposes those separately.16- Replace `AST_NODE_TYPES` enum members with identical string literals.17- Guard indexed reads for consuming repositories with `noUncheckedIndexedAccess`. Impossible missing AST/configuration entries raise explicit invariant errors rather than introducing new non-null assertions.18- Replace the repository-specific `createRule` factory with `createPaddingLineRule(options)`. The anti-slop wrapper supplies typed options directly; it exposes no user configuration options.19- Implement the small required AST helper surface in `padding-line-ast.ts` using Oxlint's public source-code/token API. `isParenthesized` only needs the one-pair check used to exclude parenthesized directive strings, not the upstream general-purpose overloads.20- Retain the upstream statement matchers, scope tracking, comment-aware insertion/removal, selector support, and diagnostic text. Upstream naming and non-null assumptions remain localized here to keep future diffs reviewable; the file is not a model for new application code.2122The opinionated policy lives outside this directory in `../../rules/require-readable-spacing.ts`. It adds spacing without collapsing existing blank lines. Short local bindings, consecutive imports, and adjacent overload signatures/implementation remain grouped. Spacing is syntactic, not an inference of business-logic boundaries.2324## Updating and verification2526Fetch an explicit upstream revision, compare the original rule and types against this revision, and port relevant fixes while retaining the adapters above. Update this record and preserve the license. Run `pnpm check` and `pnpm sync:skill-assets` as required by repository guidance.2728Focused Oxlint RuleTester cases live in `../../rules/require-readable-spacing.test.ts`; they test exact fixes, JSDoc/trailing comments, same-line statements, semicolon-free code, TypeScript exports/overloads, Effect-style generators, and upstream removal behavior. `../../rules/require-readable-spacing-cli.test.ts` verifies the exported plugin through the native Oxlint CLI on multiple files, including rejection, autofix, and repeated-fix stability. The complete upstream JS/TS test suites have not been ported; this is focused compatibility evidence, not a claim of full upstream conformance.
added:tools/oxlint/anti-slop/index.ts+47 added
1import { eslintCompatPlugin } from "@oxlint/plugins";23import { noArrayFilterMapRule } from "./rules/no-array-filter-map.ts";4import { noReduceAccumulatorCopyRule } from "./rules/no-reduce-accumulator-copy.ts";5import { noChainedTypeAssertionsRule } from "./rules/no-chained-type-assertions.ts";6import { noConditionalEmptyObjectSpreadRule } from "./rules/no-conditional-empty-object-spread.ts";7import { noKnownValueWideningRule } from "./rules/no-known-value-widening.ts";8import { noModuleMockingRule } from "./rules/no-module-mocking.ts";9import { noObjectParametersRule } from "./rules/no-object-parameters.ts";10import { noReflectApplyRule } from "./rules/no-reflect-apply.ts";11import { noReflectGetRule } from "./rules/no-reflect-get.ts";12import { noRuntimeTypeofRule } from "./rules/no-runtime-typeof.ts";13import { noForbiddenTermInSymbolNamesRule } from "./rules/no-shape-in-symbol-names.ts";14import { noUnknownParametersRule } from "./rules/no-unknown-parameters.ts";15import { noUnknownReturnsRule } from "./rules/no-unknown-returns.ts";16import { noUnknownTypeAliasesRule } from "./rules/no-unknown-type-aliases.ts";17import { noUnsafeDictionaryTypeRule } from "./rules/no-unsafe-dictionary-type.ts";18import { noWidenThenAssertRule } from "./rules/no-widen-then-assert.ts";19import { requireReadableSpacingRule } from "./rules/require-readable-spacing.ts";20import { requireSafetyCommentForTypeAssertionRule } from "./rules/require-safety-comment-for-type-assertion.ts";2122/** Generic Oxlint rules that reject low-evidence and low-signal implementation patterns. */23const antiSlopPlugin = eslintCompatPlugin({24 meta: { name: "anti-slop" },25 rules: {26 "no-array-filter-map": noArrayFilterMapRule,27 "no-reduce-accumulator-copy": noReduceAccumulatorCopyRule,28 "no-chained-type-assertions": noChainedTypeAssertionsRule,29 "no-conditional-empty-object-spread": noConditionalEmptyObjectSpreadRule,30 "no-known-value-widening": noKnownValueWideningRule,31 "no-module-mocking": noModuleMockingRule,32 "no-object-parameters": noObjectParametersRule,33 "no-reflect-apply": noReflectApplyRule,34 "no-reflect-get": noReflectGetRule,35 "no-runtime-typeof": noRuntimeTypeofRule,36 "no-unsafe-dictionary-type": noUnsafeDictionaryTypeRule,37 "no-shape-in-symbol-names": noForbiddenTermInSymbolNamesRule,38 "no-unknown-parameters": noUnknownParametersRule,39 "no-unknown-returns": noUnknownReturnsRule,40 "no-unknown-type-aliases": noUnknownTypeAliasesRule,41 "no-widen-then-assert": noWidenThenAssertRule,42 "require-readable-spacing": requireReadableSpacingRule,43 "require-safety-comment-for-type-assertion": requireSafetyCommentForTypeAssertionRule,44 },45});4647export default antiSlopPlugin;
added:tools/oxlint/anti-slop/LICENSE+21 added
1MIT License23Copyright (c) 2026 Dillon Mulroy45Permission is hereby granted, free of charge, to any person obtaining a copy6of this software and associated documentation files (the "Software"), to deal7in the Software without restriction, including without limitation the rights8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9copies of the Software, and to permit persons to whom the Software is10furnished to do so, subject to the following conditions:1112The above copyright notice and this permission notice shall be included in all13copies or substantial portions of the Software.1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21SOFTWARE.
added:tools/oxlint/anti-slop/UPSTREAM.md+15 added
1# Vendored anti-slop23Source: [dmmulroy/anti-slop](https://github.com/dmmulroy/anti-slop), commit `c44ef22ca116d0ba62a3ff663a0bd13a3f3fa40b` (2026-09-10), MIT. `LICENSE` here is upstream's, verbatim.45Installed 2026-10-06 by the `install-anti-slop` skill's `scripts/install.mjs`. The skill's bundled `assets/anti-slop/` was byte-identical (`diff -r`) to `skills/install-anti-slop/assets/anti-slop/` in a clean clone at that commit.67Installed paths:89- `index.ts`, `rules/`, `shared/`: the generic plugin, registered as `anti-slop`.10- `effect/`: the Effect rule group, registered as `anti-slop-effect`.11- `vendor/eslint-stylistic/`: upstream's own vendored copy, with its `LICENSE` and `UPSTREAM.md`.1213Deviations from upstream: none yet. Rat Stack's rejection-handler patch (planned in `PROVENANCE.md`) is not applied.1415Ultracite 7.12.4 ships its own bundled anti-slop preset (`ultracite/oxlint/anti-slop`) at an older commit (`e8c4880`) with no Effect group. `oxlint.config.ts` does not extend it; this copy is the one that runs.
added:.gitignore+17 added
1node_modules/2dist/3.turbo/4coverage/5.wrangler/6*.log7.DS_Store89# Pinned source mirrors for agents (scripts/vendor-agent-sources.sh)10.agent_sources/1112# varlock: keep .env.schema; local values stay out of git13.env14.env.local15.env.*.local16.dev.vars*17env.d.ts
modified:AGENTS.md+21 added-6 removed
15 unmodified lines
1617Fence wins over prose: if this file and an enforced check disagree, the check wins; fix this file. A rule held by "No fence yet" is debt: give it a fence.1819| # | Principle | Held by |20|---|---|---|20| --- | --- | --- |21| 1 | **Encode lessons in structure; prose is the last rung.** When a mistake repeats, make it unrepresentable, then a lint or test, then a skill. | `packages/config/test/agents-table.test.ts`: every enforcer named here exists |22| 2 | **Parse at the boundary, trust inside.** Decode every external input (HTTP, git, DO RPC, WebSocket, rule facts, env) with Effect Schema; inside, use branded types (`AskId`, `LandedSha`, `PatchId`). Decode the Worker `env` once, in one Layer. | Effect diagnostics map at `error`; anti-slop Effect rules; `env` typed by the generated `worker-configuration.d.ts`, with no `as` on `env` |23| 3 | **Refusals are a closed `Schema.TaggedError` union and a public contract.** Handle them with `Match.exhaustive` or `catchTags`. Each carries a static `retryable`, a `next` command and an optional `at`, and no `message` field. A `_tag` is renamed only with an alias. `protocol/render` is the one renderer for git `remote:`, CLI and MCP text. Stage-1 refusals accumulate. | Union test; `gen:check` on `docs/reference/refusals.md`; an MCP `tools/call` test |24| 4 | **One schema, many surfaces.** Change `packages/protocol`, then run `bun run gen`. `skills/`, `plugins/` and `docs/reference/` are generated. Projections live only in `apps/*/src/surfaces.ts`. | `gen:check` (`git diff --exit-code` after gen); per-package `allowedUnstableApis` |25| 5 | **The name lives only in `packages/brand`.** Internal packages use `@repo/*`. DO classes, Workflows, queues and databases carry job names. | `brand:check` in `verify`; `scripts/acceptance.ts` renames the brand at random |26| 6 | **Pure core, thin hosts.** Only `@repo/artifacts` calls Artifacts. Each beta dependency sits behind one job-named port with a `/memory` adapter in the owning package. Apps import packages only. Worker code stays free of `node:child_process`, `@effect/platform-bun` and OpenTUI. `rules` and `gate` run in both Workers and Bun. `alchemy/*` stays in `infra/`. | dependency-cruiser in `packages/config`; scoped `allowedUnstableApis`; `no-module-level-mutable-state` |26| 6 | **Pure core, thin hosts.** Only `@repo/artifacts` calls Artifacts. Each beta dependency sits behind one job-named port with a `/memory` adapter in the owning package. Apps import packages only. Worker code stays free of `node:child_process`, `@effect/platform-bun` and OpenTUI. `rules` and `gate` run in both Workers and Bun. `alchemy/*` stays in `infra/`. | Scoped `allowedUnstableApis`; `no-module-level-mutable-state`. No fence yet: import direction (apps never import apps, Worker code stays host-free, `alchemy/*` only in `infra/`) |27| 7 | **Deny by default for visibility.** Land the answer's tree, never the composed tree. Nothing from a layer enters a public tree. Snapshot before held-back files are written. Public-serving Workers have no private-namespace binding. Public commits, trailers, notes and errors name public paths only. | `PrivatePathInPublicTree` and snapshot-order tests; a type test that `apps/web/worker-configuration.d.ts` has no `ARTIFACTS_PRIVATE` |28| 8 | **Deterministic and idempotent.** Rule evaluation sees frozen time and randomness and only injected facts. Re-running an operation converges. Check results are keyed by (tree SHA, check version), push events deduped by (repo, sha), and land requests carry a `requestId`. | `globalDate`, `globalRandom`, `globalTimers` and `cryptoRandomUUID` at `error`; replay-twice and dedupe tests; lifecycle model tests |29| 9 | **Effect v4 only.** Read `node_modules/effect/src` as API truth. Off limits: `effect/unstable/*`, v3 `@effect/platform` and `@effect/cli`, and `effect/workflow` or `effect/cluster` on Workers. | `outdatedApi`; oxlint `no-restricted-imports`; `no-manual-effect-runtime-in-tests` |30| 10 | **Escapes need a reason and only shrink.** Every `oxlint-disable`, `@effect-diagnostics` or `@ts-expect-error` carries a reason after ` -- ` and is counted. The count rises only with sign-off. | `scripts/debt.ts` against `debt.baseline.json` in `verify`; unused directives at `error` |31| 11 | **Hooks are early feedback; `bun run verify` and CI are the authority.** Deploy only to an explicit stage, after `verify`, with smoke after. A red gate is fixed, never deployed around. | lefthook, plus `scripts/hooks/vcs-policy.ts` and its bypass-variant tests; `infra/deploy.ts` refuses without a stage and runs `scripts/smoke.ts`. No fence yet: CI on a cold install |30| 10 | **Escapes need a reason and only shrink.** Every `oxlint-disable`, `@effect-diagnostics` or `@ts-expect-error` carries a reason after `--` and is counted. The count rises only with sign-off. | `scripts/debt.ts` against `debt.baseline.json` in `verify`; unused directives at `error` |31| 11 | **Hooks are early feedback; `bun run verify` and CI are the authority.** Deploy only to an explicit stage, after `verify`, with smoke after. A red gate is fixed, never deployed around. | `scripts/hooks/vcs-policy.ts` and its bypass-variant tests; `infra/deploy.ts` refuses without a stage and runs `scripts/smoke.ts`. No fence yet: git hooks; CI on a cold install |32| 12 | **Lifecycles are pure transitions.** `transition(state, command, now)`. Per DO call: hydrate, transition, persist, settle. Deadlines run on DO alarms. Call them lifecycles. | Model tests over `effect/Arbitrary` histories with one planted bug. No fence yet: a lint banning `Effect.sleep` and `setTimeout` in `packages/project` |3334## Fence3536`bun run verify` is the gate: check, typecheck, test, `gen:check`, `brand:check` and deps. Run it before you stop. When a hook or check fails, fix the cause. Loosening, skipping or disabling a check needs the user's sign-off.36`bun run verify` is the gate: the lockfile check, lint and format (`check`), typecheck, test, `gen:check` and `brand:check`. Run it before you stop. When a hook or check fails, fix the cause. Loosening, skipping or disabling a check needs the user's sign-off.3738**Safe by default:**3940- new or tightened tests;41- tightening a rule;42- a reasoned escape that keeps the count at or below the baseline;43- docs;44- a cut that follows the README's "Keep or cut".4546**Needs the user's sign-off:**4748- a dependency outside the synthesis §4.4 adopt list;49- any version change to effect, wrangler or pi;48- loosening `oxlint.config.ts`, `tsconfig.base.json` (map, overrides, allow-lists), `.dependency-cruiser.cjs`, `lefthook.yml`, `scripts/hooks/*`, `turbo.json` or `package.json` scripts;50- loosening `oxlint.config.ts`, `tsconfig.base.json` (map, overrides, allow-lists), `bunfig.toml`, `scripts/hooks/*`, `turbo.json` or `package.json` scripts;51- raising `debt.baseline.json`;52- renaming or removing a DO class;53- deleting any Cloudflare resource;54- any deploy during a recording;
1 unmodified line
5657## Nouns5859Each code noun has one home:6061- **Contract:** one Rpc in `protocol/src/contracts.ts`.62- **Projection:** `protocol/{cli,mcp}` and `apps/*/src/surfaces.ts`.63- **Port:** the owning package's `src/<port>.ts`.64- **Adapter:** `<package>/src/<port>/{memory,binding,rest,sqlite,local,isogit,worker,bun,json}.ts`.
16 unmodified lines
8182## Rejected dependencies8384Each was weighed and turned down; re-adding one needs sign-off.8586- `agents`: McpAgent is deprecated, it brings 17 peer dependencies, and it pins the MCP SDK at 2.0.0.87- `alchemy`, until after Oct 14: released Alchemy can't declare DO-managed containers (PR #1905), so it would be a two-tool hybrid, with beta churn.88- cf's project commands, `cloudflare.config.ts` and `@cloudflare/config`: the config can't declare `triggers.events`, the deploy refuses the sandbox's container self-binding, and it would be a second deploy tool in recording week.89- `@cloudflare/vite-plugin@beta`: a sha-tagged beta. Web stays on the stable plugin.
20 unmodified lines
110111### Domain docs112113Single-context: one `GLOSSARY.md` and `docs/adr/` at the repo root. See `docs/agents/domain.md`.114115<!-- BEGIN:turborepo-agent-rules -->116117# This is NOT the Turborepo you know118119Turborepo configuration, task behavior, and CLI commands can vary between installed versions and may differ from your training data. Resolve the `turbo` package from this file's directory or relevant workspace; in monorepos, it may not be visible from the repository root. For example, run `node -p "require.resolve('turbo/package.json')"` from a workspace that depends on `turbo`.120121Read `docs/README.md` inside that installed package first, then read the relevant pages from its `docs/` directory before changing Turborepo configuration or commands. Heed deprecation notices. These bundled docs match the installed package version and are available without network access.122123This block is written and re-added by `turbo` before repository-scoped commands when an AI agent is detected. In the Turborepo source repository, its template is defined in `crates/turborepo-cli/src/cli/agent_guidance.rs`. Removing the managed block while updates are enabled means a later qualifying invocation will add it again. Set `"agentGuidance": false` in the root `turbo.json` or `turbo.jsonc` to opt out; this does not remove an existing block. Keep the block committed with your work to avoid an uncommitted change on the next agent invocation.124<!-- END:turborepo-agent-rules -->
added:bun.lock+521 added
1{2 "lockfileVersion": 2,3 "configVersion": 1,4 "workspaces": {5 "": {6 "name": "@repo/root",7 "devDependencies": {8 "@effect/platform-bun": "catalog:",9 "@effect/tsgo": "0.48.1",10 "@oxlint/plugins": "1.87.0",11 "@repo/brand": "workspace:*",12 "effect": "catalog:",13 "oxfmt": "0.72.0",14 "oxlint": "1.87.0",15 "oxlint-tsgolint": "7.0.2003",16 "turbo": "2.11.7",17 "typescript": "catalog:",18 "ultracite": "7.12.4",19 },20 },21 "packages/brand": {22 "name": "@repo/brand",23 "dependencies": {24 "effect": "catalog:",25 },26 "devDependencies": {27 "@effect/vitest": "catalog:",28 "@repo/config": "workspace:*",29 "typescript": "catalog:",30 "vitest": "catalog:",31 },32 },33 "packages/config": {34 "name": "@repo/config",35 "devDependencies": {36 "typescript": "catalog:",37 "vitest": "catalog:",38 },39 },40 },41 "catalog": {42 "@effect/platform-bun": "4.0.1",43 "@effect/vitest": "4.0.1",44 "effect": "4.0.1",45 "typescript": "7.0.2",46 "vitest": "5.0.3",47 },48 "packages": {49 "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.7", "", {}, "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw=="],5051 "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="],5253 "@babel/parser": ["@babel/parser@7.29.9", "", { "dependencies": { "@babel/types": "^7.29.8" }, "bin": "./bin/babel-parser.js" }, "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA=="],5455 "@babel/types": ["@babel/types@7.29.8", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg=="],5657 "@clack/core": ["@clack/core@1.5.1", "", { "dependencies": { "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ=="],5859 "@clack/prompts": ["@clack/prompts@1.8.1", "", { "dependencies": { "@clack/core": "1.5.1", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ=="],6061 "@effect/platform-bun": ["@effect/platform-bun@4.0.1", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.1" }, "peerDependencies": { "effect": "^4.0.1" } }, "sha512-m+QR4bp39ZWujCuEsUhZADIYIOFZcUHHlmrixENZqZRbEYgaPLMUWiPrRJ69CM4BuuHW8oCOxfMGUU7oSw/o5g=="],6263 "@effect/platform-node-shared": ["@effect/platform-node-shared@4.0.1", "", { "dependencies": { "@types/ws": "^8.18.1", "ws": "^8.22.0" }, "peerDependencies": { "effect": "^4.0.1" } }, "sha512-VanaejudEhKJ4mpmqnEzdncVUhN6sGSO9ZDND54mRxAlZxj+4dYAWjDTYAy9o4tJo9aALeP2U8cVcOFzEdSeLg=="],6465 "@effect/tsgo": ["@effect/tsgo@0.48.1", "", { "optionalDependencies": { "@effect/tsgo-darwin-arm64": "0.48.1", "@effect/tsgo-darwin-x64": "0.48.1", "@effect/tsgo-linux-arm": "0.48.1", "@effect/tsgo-linux-arm64": "0.48.1", "@effect/tsgo-linux-x64": "0.48.1", "@effect/tsgo-win32-arm64": "0.48.1", "@effect/tsgo-win32-x64": "0.48.1" }, "bin": { "effect-tsgo": "dist/effect-tsgo.cjs" } }, "sha512-yLgXNwPaUWfGxcQw7FwLYwOF7me69r+tY4oHYV5hwMFE16qClXbIRnotNPp8pZ5pnbeLgPeRvCE7AWGQyYqQ2A=="],6667 "@effect/tsgo-darwin-arm64": ["@effect/tsgo-darwin-arm64@0.48.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DVLF9H0L+2cUqDnrkQjYYe1GyuBehYILQ1EUF3KHFafR/iBSDfZreezW5K+5zLZsLy/gJ5PV5AhbWCLTjZYqFA=="],6869 "@effect/tsgo-darwin-x64": ["@effect/tsgo-darwin-x64@0.48.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-BeEOf4+lLAK986uH36OBD+n/rA5kMvIxGMfHlsZOQufYl8b1lickDO8H/8IRIXnBPFb6cIUi8813SPwOtaE9sw=="],7071 "@effect/tsgo-linux-arm": ["@effect/tsgo-linux-arm@0.48.1", "", { "os": "linux", "cpu": "arm" }, "sha512-ydkNW7loScSD+6fPcliUEbSGfCAAShH4xYJ830f3DN9AJfLDF3GxNqgkayKyMEmuF9l6sU+/bbK8ER0qhn3GOw=="],7273 "@effect/tsgo-linux-arm64": ["@effect/tsgo-linux-arm64@0.48.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-MsoIwtFYaJQbSfpOaCGqnquV/TgHoP4x/gmGCxRg8gCZP7cOrv/5qcywVWTGfkLWpfmbI1nOVUBULV7DlPmGMg=="],7475 "@effect/tsgo-linux-x64": ["@effect/tsgo-linux-x64@0.48.1", "", { "os": "linux", "cpu": "x64" }, "sha512-TAnxBsMAOU0KG7v0YunhmVL6DLzRKXi7MrsGvRkeOAzhe1ooLv0tp4S1FFhj/oYE3LxcvFJDJiniaFwglF3z/A=="],7677 "@effect/tsgo-win32-arm64": ["@effect/tsgo-win32-arm64@0.48.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-Atlc8JUYLahT8ShAX3FQ2Lsyjo6uz6Vu6H/cQ46dXEX3purIFaktdj3PFLzIvl4o9323Pjdlf8jbM5n9tIfnMQ=="],7879 "@effect/tsgo-win32-x64": ["@effect/tsgo-win32-x64@0.48.1", "", { "os": "win32", "cpu": "x64" }, "sha512-CDCaScEJ1gRwA8DRgRFn3Kh0mHPUCm1ln/gUwsRxC9qXJQdzqWEYzECa907b4Ts/dKW3uD4oFc47oKr+JQxYCg=="],8081 "@effect/vitest": ["@effect/vitest@4.0.1", "", { "peerDependencies": { "effect": "^4.0.1", "vitest": ">=5.0.0 <6.0.0" } }, "sha512-DbY9kf/018zBxRIX7rJwBnPVPzSarnUpcshm0vfYPFiDkSa7AFrXTh2BlDNUbrdrmqcIOBhVZ7GkEtxf8WiQrg=="],8283 "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],8485 "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="],8687 "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],8889 "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],9091 "@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="],9293 "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],9495 "@oxc-project/types": ["@oxc-project/types@0.152.0", "", {}, "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw=="],9697 "@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.72.0", "", { "os": "android", "cpu": "arm" }, "sha512-u4U1uaDOVBuorGNC/07NLm48nECHOiJJka002YGML16Md2DRvf38RGBt01lH60EOGvNlFVmbLoksQedNBoZHKw=="],9899 "@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.72.0", "", { "os": "android", "cpu": "arm64" }, "sha512-GCnM+Ae2mWOKC+92y3FOb6eZJeVnBAVz82e3lITUUg+kxukYKzBNAvJ/hhHIfa2A0md55SYYhdWPddSSy3KPVA=="],100101 "@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.72.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-LjQ8tlevdtwraFlWC6AnQ1Forzde0clRmnsP3QmK+ydSElDt/J+5Jc+m+//Ly1G97aP7WCNUw110QMIUw2K7xA=="],102103 "@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.72.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-+ZbcxhB1C34RQR5IldSyY6Z/yalJIxHXhP36PGE4sEq0f/lgL5jCLmOKoDeVm8dqd9gFGDsd1bNWHSGCAwdSkw=="],104105 "@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.72.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-yGPhA8sePEBFV9iGcprhyOk3Bz3fZshswMH3DpYIPZFLT1DG5LjiZ0j6AJQpSueaL6bUK0av1K+5+fe+ldy5EQ=="],106107 "@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.72.0", "", { "os": "linux", "cpu": "arm" }, "sha512-/g5axuqFMcAtoQrFLR5EJEMDjR5Ea4GuzpdDmMpPWAgrF1DmL4kD1NPNVlpXEOxpFJnD6lPvLKYj1lzdlrfifA=="],108109 "@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.72.0", "", { "os": "linux", "cpu": "arm" }, "sha512-InVitdHbS09PM+w+WinIiyX37rC9R3L7lUP9mKy9uKTEDSUFaLjWsLoreRIxKivnv7Ndqc6Trvi+K+b6ZzhiJg=="],110111 "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.72.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-WKjlyRAxpPjXoqeuwFBim5LscgvY+RNEiZ971C9JlRQZONhJTsXDki/oHFYQE+fzzRpzXh3owZvOdT3kNL2g+g=="],112113 "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.72.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-poafnbsPpJhR+5Mbwpf8CscugTyiRAzjTOxRVn8ra3X2jnURs2xL5Du2xl5g2iW85lICMglpmLf8jDjZEbNgzQ=="],114115 "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.72.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-zNUi0gKRsO7S3IfPzsTbnm88OedPuX32hmZFWZRWHvWJlAoZRwVbeO6Nb3hng4vDgL7qUKp4TGqzPz1mhsycYg=="],116117 "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.72.0", "", { "os": "linux", "cpu": "none" }, "sha512-qTY7z/iyF/rWI2HWwWMevXqZW5PZUOofUy2afK7v6rseXnpld3yjgyIk6pCux3DqWQ0lB+f5atvLJNBwzLvFsw=="],118119 "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.72.0", "", { "os": "linux", "cpu": "none" }, "sha512-w18qfo8vEMD6EKEHtzTvjc6jH8yCyXIT1Bn7PFWJd0PpZyzH/VQDx4xvjCh0LGz6GRzqiezbisTdG9AoXtpkZQ=="],120121 "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.72.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-grW8HwEir+vK7fCcq1ZgL3NHQCfZ1PidiERE9Hbf+24xGys+DoDaoqTht4ccfn0PcBwbViLkwkda/KNpJu2KRQ=="],122123 "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.72.0", "", { "os": "linux", "cpu": "x64" }, "sha512-wQJRQfWBRIn88Pkr449EUViwRayrYUScg7ty+Ihiem21mQ9BUA6S9e/4RAgyNk9lMag0KBouyKskjq61rOC0WQ=="],124125 "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.72.0", "", { "os": "linux", "cpu": "x64" }, "sha512-T1B0uQzafxuGPjjaPrZJ497nxoi1BiI65JfsYc56nNpmev3msfb/iaTmH2kQuNFqa8PKxpMlf3GhWrWBvBPORQ=="],126127 "@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.72.0", "", { "os": "none", "cpu": "arm64" }, "sha512-OKxxgTurl7+hypVplO8QRAbbQlwEs0j1Y6FZv+ZN2qNbdxQk2muMlzuJNBGTCWwxQ0rkkOD1uK/DW1fvzoUSJA=="],128129 "@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.72.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-L78TKzURqvjuZOCo88ixMbPXf/RP7u31Y0cmjJ/KEmrHmfYhmhEvsDaTYPiyTRne64jUgCbADfY0YeoQk4/Xyw=="],130131 "@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.72.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-gQtFW+Ii8BWgtJTAD17TY/WsdNS5gUfAPov8iI1jeq4r9lRRYImmxPL08UU00/RLaCfBJwh2UgINnDY0iOiZ+A=="],132133 "@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.72.0", "", { "os": "win32", "cpu": "x64" }, "sha512-uhooIN+DCzWX5uH7mQkSVCsODqsGluGJ4n3ch4+mITtWKpESMDjUJUSDBAVFuYQDwqY2McPDKdKJbM0oZVW/Qw=="],134135 "@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@7.0.2003", "", { "os": "darwin", "cpu": "arm64" }, "sha512-TgV33rXr6ueXBwvc+0nssUkTBSXHJxv77I8p4RCjDjCnvexHtmoPiudVRDfj3S3puMDdeQdHW6jdUgUPy3nr/w=="],136137 "@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@7.0.2003", "", { "os": "darwin", "cpu": "x64" }, "sha512-hY3FMAjIaPDdK3FNxyRXRfHPOFeoBn6dmnLyKZgQ2IbTTD1adXhl6PfCIqHhCPvurigv7nf7mYuWZZ19MmJzmg=="],138139 "@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@7.0.2003", "", { "os": "linux", "cpu": "arm64" }, "sha512-eAET4JpyfBbg8SO0K74o4R55tEjVC292pIyxGOw2XGf8x/HrPNyxwQ478jMYOM54FIVOHc8sJ6VRHxluy6lucw=="],140141 "@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@7.0.2003", "", { "os": "linux", "cpu": "x64" }, "sha512-GXdyO/XyqDJ3s/llR/oOktLsYNjZtWSQBy0JMc+/0gsNPvTcseKPhn9c6KcFyWmnr6H4vljYALbujonqSzzEGw=="],142143 "@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@7.0.2003", "", { "os": "win32", "cpu": "arm64" }, "sha512-TWauXnPfet0VgpmrstoAK58eJ4gbuwPUuUTQmYQAzE/RG1CpnxXtrKUJULf6lyerPE4KN3gM+DflIA1hOH+38Q=="],144145 "@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@7.0.2003", "", { "os": "win32", "cpu": "x64" }, "sha512-DoRmfe7j8VqNlukp8liRVW45GQDhzRccNenjD/pdzelgtffW47pCMd1xbJLkPaPbKnTwID3onn3VZlL7JbebEA=="],146147 "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.87.0", "", { "os": "android", "cpu": "arm" }, "sha512-22tVIHlB9898OYsBKmYB6He1MCSqdTmK1BVWuSNUTVrpS0KWNege+U9uEYqGJ+KatQag0r/oU44i3OOs46z7HQ=="],148149 "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.87.0", "", { "os": "android", "cpu": "arm64" }, "sha512-JfZQ3MWf74n8ov0DojZpkOduIubYJvZL5tbTMMhDutsal6u1xH1QuNpN+lK+EQwF8AeAfgwTR2fgh5U2br27XA=="],150151 "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.87.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rkx6Xvvw93z2GImVOyvbZwAZcoY0Z6MJW177XNsSB+i/CBsH7ANyelTp01VZyIkM3iSXtqKVb4+ptBgPHap5pQ=="],152153 "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.87.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-cw5nYw7L/pQ2SgGBgOcg/Qo89llQre3vIc/kuBLhSICzu1r5s8L76H3ug6AIFsD98WpROj8/z5JVzkf4daxHaQ=="],154155 "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.87.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-x/SuznE6loRZK9gz9AS4ZmzNzSu+5KdeoCS+sVHhnrE8HM6AD8UyTjwldQTTqlXGvkwHASgB0NiTNOc3o3PdAg=="],156157 "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.87.0", "", { "os": "linux", "cpu": "arm" }, "sha512-+JEDmCAXiiFmKhAjZhgAOwaHWY6WENOQ5QA+lFuY59tgsUCDOTRi46B+lENK6CWvtxsXpwkZXNOgpjAQcpIpnA=="],158159 "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.87.0", "", { "os": "linux", "cpu": "arm" }, "sha512-/uC9XqXLAC9AHFLNycwmSQEvKqGrOCgU+uXALI7gNW0DG81TJ/3T2eHnKdRvcb5R1gFEfjxDwI4e4zIa29rICQ=="],160161 "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.87.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-FTRYPsBy/M728vnUv7l+KAwSAa3Qi4BQbhVvy7NYuMTZ0sUa/OWsbMx79HVFw6u/5KWcaYayDsoOiv7xbevzDg=="],162163 "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.87.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-6sC+N7IY0h1egd8SrYUGNN7CUyKJZ4bIZakKa7V7hfinf4jfi8Kq4+klJvFp5DqXcwMn44I5MeBwmJluO1odFg=="],164165 "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.87.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-d5Mnn+ICbhoJPi37Ccjy+86T5qfH2+mSTrTMBXNPfB+wqSWOayBBLLIrCXdUy1YssluCVdGkl+DO9w5r5ODmUA=="],166167 "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.87.0", "", { "os": "linux", "cpu": "none" }, "sha512-sf5YWuUo1Dx9loqWCgF8P278MycfcD4JHjDC/LV5j11L3Lqa4PFiwCjD6B8kP4AjsgZZkLn3xbpJEtZBaccs4Q=="],168169 "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.87.0", "", { "os": "linux", "cpu": "none" }, "sha512-+aCraYbmK3uU3P0rFojjeaK9pGY6JvBDXh/0CM+gPyWKmNmXmnFe0qj4qj02U4ibFpbd9Pa9CmDvIdjJUd29rA=="],170171 "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.87.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-7rzbZQIljo6VLWVPqUyLa2P/WV3VFsJB4M52R4NCUJn1A50yjtUsHxiMHFL9opEKGFIiTbZ3VQzmtcJOPUq4NQ=="],172173 "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.87.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Dry46Fa+AXE/xt9J/YriujU1pU9mzfNWHGQwtOYibAFH8HLrKWCi93AhIGnuUMiwn2JbuBkRyz51f50Ly4r4ow=="],174175 "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.87.0", "", { "os": "linux", "cpu": "x64" }, "sha512-f/HMZez74gJvnRpGz+b5sdGyWrEgRLmFTXg9sNoqjPWogGxYHUhXKTKyMiYsu9rUGR2ciYqL3fk+Ua4JhMJbRA=="],176177 "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.87.0", "", { "os": "none", "cpu": "arm64" }, "sha512-lEC6ZfPZm/07JlB7FsOWX9o1RiHlXiBW594LSUGuXmekC8LZmvUPP9XzE2WZcNxJi5cHA/Fw56o02c3JxgMA5g=="],178179 "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.87.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-afBWKOD36dUiA9AenaiWpCg8xfyUVPYznyAAVXu413brK4RA5UI/Xoc4yfeGIT8G1a44MV+JR7hioryerBDzGQ=="],180181 "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.87.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-daptNsEOuru4/nJTxV4DBHNJ5GepzmaBVQf+jjgKQGi9NRlZKik+RFq4hUL7ewsF1pwjKM+SkYaMbF82UwFGnw=="],182183 "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.87.0", "", { "os": "win32", "cpu": "x64" }, "sha512-k+m/EShyXE29J/r1fjk0HlAzhN5JhIvj044oSJkXTEkCLrWZQgXb/3r4q5LTw/eaKW/4GuMXG2xmiJs3s5rPNw=="],184185 "@oxlint/plugins": ["@oxlint/plugins@1.87.0", "", {}, "sha512-OtSZ6NxNkS7bkVy7zk9zGnajz2hVIu0uRPP/dJvJesGRaXtimpA4lpxap7FaIJndG2UIoKhnBU4DxyDQIWv6yg=="],186187 "@repo/brand": ["@repo/brand@workspace:packages/brand"],188189 "@repo/config": ["@repo/config@workspace:packages/config"],190191 "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.12", "", { "os": "android", "cpu": "arm" }, "sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A=="],192193 "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.12", "", { "os": "android", "cpu": "arm64" }, "sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg=="],194195 "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w=="],196197 "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA=="],198199 "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ=="],200201 "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.12", "", { "os": "linux", "cpu": "arm" }, "sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g=="],202203 "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw=="],204205 "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw=="],206207 "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.12", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ=="],208209 "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.12", "", { "os": "linux", "cpu": "s390x" }, "sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw=="],210211 "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.12", "", { "os": "linux", "cpu": "x64" }, "sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw=="],212213 "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.12", "", { "os": "linux", "cpu": "x64" }, "sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g=="],214215 "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.12", "", { "os": "none", "cpu": "arm64" }, "sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA=="],216217 "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew=="],218219 "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.12", "", { "os": "win32", "cpu": "x64" }, "sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ=="],220221 "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],222223 "@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],224225 "@sindresorhus/merge-streams": ["@sindresorhus/merge-streams@4.0.0", "", {}, "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ=="],226227 "@turbo/darwin-64": ["@turbo/darwin-64@2.11.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z2LFOxwbiJueD1miByXJS/BrW21vv6YaQXZustty5jEX4vQYw6zyh101Sz1QO7WG0mqBzKagZ/DoAeeujI0/Sw=="],228229 "@turbo/darwin-arm64": ["@turbo/darwin-arm64@2.11.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Vhv8ybgIflosNDSSRD9fNXHlCFA60dsGyTqQmc7l28SEX5jOaweCCD4BBYNd8/p0WGkw3e7tZbfA9w6FsujGvw=="],230231 "@turbo/linux-64": ["@turbo/linux-64@2.11.7", "", { "os": [ "linux", "android", ], "cpu": "x64" }, "sha512-rAqRp3blQKk1+ylMGlZHAW0eJjVNuuGUm4ZrC6RU1Im8tLryvaO4a2zLQ/FQi1TRlmKqKV9YXBki2YeytlLbXA=="],232233 "@turbo/linux-arm64": ["@turbo/linux-arm64@2.11.7", "", { "os": [ "linux", "android", ], "cpu": "arm64" }, "sha512-thVYGov7S+llXAxrl3kBb/efalav0xhrjl5NHCR6AfKx14JkbqaetvbVwyss4FvZ9rt+Pv3xsTb+8SIYix8DTg=="],234235 "@turbo/windows-64": ["@turbo/windows-64@2.11.7", "", { "os": "win32", "cpu": "x64" }, "sha512-ZIoKT7J7KutgYl4bGxmmgeUQjG+7E0nY8BF9dxUOiMH2vdTsM4JQ2uSwTYFkTR2Llbg6ghGjSmuZ8LQtkLEYjg=="],236237 "@turbo/windows-arm64": ["@turbo/windows-arm64@2.11.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-88Xv2f7SLGVJ68lRRx8o375dKmnZYNdDtvlKcPA0kZpcF93eAQd8l96BKQ0/AMHG0bMJA0Z5QqoqtetxzNsC+g=="],238239 "@types/chai": ["@types/chai@5.2.3", "", { "dependencies": { "@types/deep-eql": "*", "assertion-error": "^2.0.1" } }, "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA=="],240241 "@types/deep-eql": ["@types/deep-eql@4.0.2", "", {}, "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw=="],242243 "@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="],244245 "@types/node": ["@types/node@26.6.4", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg=="],246247 "@types/ws": ["@types/ws@8.18.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w=="],248249 "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],250251 "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],252253 "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],254255 "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],256257 "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],258259 "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],260261 "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],262263 "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],264265 "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],266267 "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],268269 "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],270271 "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],272273 "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],274275 "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],276277 "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],278279 "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],280281 "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],282283 "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],284285 "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],286287 "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],288289 "@vitest/mocker": ["@vitest/mocker@5.0.3", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.31", "@vitest/spy": "5.0.3", "estree-walker": "^3.0.3", "magic-string": "^1.2.3" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-T8sWAIbkSyAjkwTcaEc3Iu0o9A27X1/kdXrizhZkGuSKScRQtRzclfAMpOTcGdXCsqxeWlpGy3XjqaW8CpLORg=="],290291 "@vitest/spy": ["@vitest/spy@5.0.3", "", {}, "sha512-XhFysQTB8AZ+P4gMi+Lpo99vg2AZi0qKpaB9yXQl37+CaMEAPO3iH/wGVnSyL5MPERiLezpqTVtrR6UZH5GCXg=="],292293 "acorn": ["acorn@8.18.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ=="],294295 "ansi-escapes": ["ansi-escapes@7.3.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg=="],296297 "ansi-regex": ["ansi-regex@6.4.0", "", {}, "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw=="],298299 "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],300301 "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="],302303 "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],304305 "chai": ["chai@6.3.0", "", {}, "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg=="],306307 "citty": ["citty@0.2.2", "", {}, "sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w=="],308309 "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="],310311 "cli-truncate": ["cli-truncate@6.1.1", "", { "dependencies": { "slice-ansi": "^9.0.0", "string-width": "^8.2.0" } }, "sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw=="],312313 "commander": ["commander@15.0.0", "", {}, "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg=="],314315 "confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="],316317 "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="],318319 "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],320321 "effect": ["effect@4.0.1", "", {}, "sha512-b1VlQG9g8fwxE5QnIZuPoOP/0MsqHJSRKxUijjoM80E5q95FXrX5yWtY5XI8G+GJsBQAVSDbLS458z9a++uVvw=="],322323 "empathic": ["empathic@2.1.0", "", {}, "sha512-AnfC1ATldl49/cvZdLPDjBfrRNwbDO05aibiOtzQu3qtlbJtomNLhF30HEtn/7iBz50dlMECqATo3fG0LrdEgw=="],324325 "environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="],326327 "es-module-lexer": ["es-module-lexer@2.3.2", "", {}, "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw=="],328329 "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="],330331 "execa": ["execa@10.0.1", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "figures": "^6.1.0", "get-stream": "^9.0.1", "human-signals": "^8.0.1", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", "pretty-ms": "^9.3.0", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", "which-command": "^0.1.0", "yoctocolors": "^2.1.2" } }, "sha512-ge98qjkRK4IB7tL7Ju/6qmm5LHoH1eEMt5FNZrz3f4UIYhF28lggX20z3FaX1sgc67msLEn0N0BscOs29iuwyw=="],332333 "expect-type": ["expect-type@1.4.0", "", {}, "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA=="],334335 "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="],336337 "fast-string-truncated-width": ["fast-string-truncated-width@3.0.3", "", {}, "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g=="],338339 "fast-string-width": ["fast-string-width@3.0.2", "", { "dependencies": { "fast-string-truncated-width": "^3.0.2" } }, "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg=="],340341 "fast-wrap-ansi": ["fast-wrap-ansi@0.2.2", "", { "dependencies": { "fast-string-width": "^3.0.2" } }, "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q=="],342343 "fastq": ["fastq@1.20.3", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw=="],344345 "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],346347 "figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="],348349 "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],350351 "find-workspaces": ["find-workspaces@0.3.1", "", { "dependencies": { "fast-glob": "^3.3.2", "pkg-types": "^1.0.3", "yaml": "^2.3.4" } }, "sha512-UDkGILGJSA1LN5Aa7McxCid4sqW3/e+UYsVwyxki3dDT0F8+ym0rAfnCkEfkL0rO7M+8/mvkim4t/s3IPHmg+w=="],352353 "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],354355 "get-east-asian-width": ["get-east-asian-width@1.7.0", "", {}, "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q=="],356357 "get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="],358359 "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],360361 "human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="],362363 "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],364365 "is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="],366367 "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],368369 "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="],370371 "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],372373 "is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="],374375 "is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],376377 "jsonc-parser": ["jsonc-parser@3.3.1", "", {}, "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ=="],378379 "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="],380381 "lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="],382383 "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.33.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="],384385 "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.33.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="],386387 "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.33.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="],388389 "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.33.0", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="],390391 "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.33.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="],392393 "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.33.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="],394395 "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.33.0", "", { "os": "linux", "cpu": "x64" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="],396397 "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.33.0", "", { "os": "linux", "cpu": "x64" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="],398399 "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.33.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="],400401 "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="],402403 "log-update": ["log-update@8.0.0", "", { "dependencies": { "ansi-escapes": "^7.3.0", "cli-cursor": "^5.0.0", "slice-ansi": "^9.0.0", "string-width": "^8.2.0", "strip-ansi": "^7.2.0", "wrap-ansi": "^10.0.0" } }, "sha512-lddSgOt3bPASrylL54ZSpy8nBHns+vBVSoILlVOx+dei300pnLRN958rj/EdlVLKuWlSESU3qdnDZdAI7FXYGg=="],404405 "magic-string": ["magic-string@1.4.3", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ=="],406407 "magicast": ["magicast@0.5.5", "", { "dependencies": { "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7", "source-map-js": "^1.2.1" } }, "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA=="],408409 "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],410411 "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],412413 "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],414415 "mlly": ["mlly@1.8.2", "", { "dependencies": { "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.3" } }, "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA=="],416417 "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="],418419 "npm-run-path": ["npm-run-path@6.0.0", "", { "dependencies": { "path-key": "^4.0.0", "unicorn-magic": "^0.3.0" } }, "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA=="],420421 "nypm": ["nypm@0.6.10", "", { "dependencies": { "citty": "^0.2.2", "pathe": "^2.0.3", "tinyexec": "^1.3.1" }, "bin": { "nypm": "./dist/cli.mjs" } }, "sha512-W72Hrj1petq+b3Hk2aAC+9zswetlIFTnDW4s5djseZh2nYqBbyQLOtj472HwcbcWykPBUW1WpWpjOd4nK6gMRw=="],422423 "obug": ["obug@2.2.1", "", {}, "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q=="],424425 "onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],426427 "oxfmt": ["oxfmt@0.72.0", "", { "dependencies": { "tinypool": "2.2.0" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.72.0", "@oxfmt/binding-android-arm64": "0.72.0", "@oxfmt/binding-darwin-arm64": "0.72.0", "@oxfmt/binding-darwin-x64": "0.72.0", "@oxfmt/binding-freebsd-x64": "0.72.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.72.0", "@oxfmt/binding-linux-arm-musleabihf": "0.72.0", "@oxfmt/binding-linux-arm64-gnu": "0.72.0", "@oxfmt/binding-linux-arm64-musl": "0.72.0", "@oxfmt/binding-linux-ppc64-gnu": "0.72.0", "@oxfmt/binding-linux-riscv64-gnu": "0.72.0", "@oxfmt/binding-linux-riscv64-musl": "0.72.0", "@oxfmt/binding-linux-s390x-gnu": "0.72.0", "@oxfmt/binding-linux-x64-gnu": "0.72.0", "@oxfmt/binding-linux-x64-musl": "0.72.0", "@oxfmt/binding-openharmony-arm64": "0.72.0", "@oxfmt/binding-win32-arm64-msvc": "0.72.0", "@oxfmt/binding-win32-ia32-msvc": "0.72.0", "@oxfmt/binding-win32-x64-msvc": "0.72.0" }, "peerDependencies": { "svelte": "^5.0.0", "vite-plus": "*" }, "optionalPeers": ["svelte", "vite-plus"], "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-16OQeL0uhPZbfmT9S9WWM0Nv9+BmVi8Ra1uTYaSKj/qSCs6FB30KOhz9JoNYw6thT+K5bVxsk/tSEOu497i34g=="],428429 "oxlint": ["oxlint@1.87.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.87.0", "@oxlint/binding-android-arm64": "1.87.0", "@oxlint/binding-darwin-arm64": "1.87.0", "@oxlint/binding-darwin-x64": "1.87.0", "@oxlint/binding-freebsd-x64": "1.87.0", "@oxlint/binding-linux-arm-gnueabihf": "1.87.0", "@oxlint/binding-linux-arm-musleabihf": "1.87.0", "@oxlint/binding-linux-arm64-gnu": "1.87.0", "@oxlint/binding-linux-arm64-musl": "1.87.0", "@oxlint/binding-linux-ppc64-gnu": "1.87.0", "@oxlint/binding-linux-riscv64-gnu": "1.87.0", "@oxlint/binding-linux-riscv64-musl": "1.87.0", "@oxlint/binding-linux-s390x-gnu": "1.87.0", "@oxlint/binding-linux-x64-gnu": "1.87.0", "@oxlint/binding-linux-x64-musl": "1.87.0", "@oxlint/binding-openharmony-arm64": "1.87.0", "@oxlint/binding-win32-arm64-msvc": "1.87.0", "@oxlint/binding-win32-ia32-msvc": "1.87.0", "@oxlint/binding-win32-x64-msvc": "1.87.0" }, "peerDependencies": { "oxlint-tsgolint": ">=7.0.2003", "vite-plus": "*" }, "optionalPeers": ["oxlint-tsgolint", "vite-plus"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-drxVlaW7Oqq7wSy1CN25znRu00aRq8n57Q2wniJRxCmtYVz07ufCm7EVDPQFZURrTgQIjzKrVEHAD/HcvJXObg=="],430431 "oxlint-tsgolint": ["oxlint-tsgolint@7.0.2003", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "7.0.2003", "@oxlint-tsgolint/darwin-x64": "7.0.2003", "@oxlint-tsgolint/linux-arm64": "7.0.2003", "@oxlint-tsgolint/linux-x64": "7.0.2003", "@oxlint-tsgolint/win32-arm64": "7.0.2003", "@oxlint-tsgolint/win32-x64": "7.0.2003" }, "bin": { "tsgolint": "./bin/tsgolint.js" } }, "sha512-VnK4zlqgmgq/7ZcjzCk/WpN8kKFsYGcB85Io9qT3wL4K8Un3RKmJkp793crNETieMusPMKOA4a+Mw2wbteI6TQ=="],432433 "parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="],434435 "path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="],436437 "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],438439 "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],440441 "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],442443 "pkg-types": ["pkg-types@1.3.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="],444445 "postcss": ["postcss@8.5.29", "", { "dependencies": { "nanoid": "^3.3.19", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ=="],446447 "pretty-ms": ["pretty-ms@9.3.1", "", { "dependencies": { "parse-ms": "^4.0.0" } }, "sha512-HzMy3Geq23nVALD/M2LliU+F+M+gVNsvkQWWqeBZ8HDiCgzo6YPJ/Omrmtq24EFrIsk0a3EkQGEd7bDOo+IhGA=="],448449 "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],450451 "resolve.exports": ["resolve.exports@2.0.3", "", {}, "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A=="],452453 "restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="],454455 "reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],456457 "rolldown": ["rolldown@1.2.12", "", { "dependencies": { "@oxc-project/types": "=0.152.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.12", "@rolldown/binding-android-arm64": "1.2.12", "@rolldown/binding-darwin-arm64": "1.2.12", "@rolldown/binding-darwin-x64": "1.2.12", "@rolldown/binding-freebsd-x64": "1.2.12", "@rolldown/binding-linux-arm-gnueabihf": "1.2.12", "@rolldown/binding-linux-arm64-gnu": "1.2.12", "@rolldown/binding-linux-arm64-musl": "1.2.12", "@rolldown/binding-linux-ppc64-gnu": "1.2.12", "@rolldown/binding-linux-s390x-gnu": "1.2.12", "@rolldown/binding-linux-x64-gnu": "1.2.12", "@rolldown/binding-linux-x64-musl": "1.2.12", "@rolldown/binding-openharmony-arm64": "1.2.12", "@rolldown/binding-win32-arm64-msvc": "1.2.12", "@rolldown/binding-win32-x64-msvc": "1.2.12" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ=="],458459 "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],460461 "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],462463 "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],464465 "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],466467 "slice-ansi": ["slice-ansi@9.0.1", "", { "dependencies": { "ansi-styles": "^6.2.3", "is-fullwidth-code-point": "^5.1.0" } }, "sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA=="],468469 "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="],470471 "std-env": ["std-env@4.3.0", "", {}, "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag=="],472473 "string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="],474475 "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],476477 "strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],478479 "tinybench": ["tinybench@6.2.0", "", {}, "sha512-78U2TlB2CnVenajOFzf3BKSm0J6oz5L0NV7g32LCPccvYc0lbWvys4d3uUUCS2B1N8PAf2+aekR8i1KbC3HO7Q=="],480481 "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="],482483 "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="],484485 "tinypool": ["tinypool@2.2.0", "", {}, "sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ=="],486487 "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],488489 "turbo": ["turbo@2.11.7", "", { "optionalDependencies": { "@turbo/darwin-64": "2.11.7", "@turbo/darwin-arm64": "2.11.7", "@turbo/linux-64": "2.11.7", "@turbo/linux-arm64": "2.11.7", "@turbo/windows-64": "2.11.7", "@turbo/windows-arm64": "2.11.7" }, "bin": { "turbo": "bin/turbo" } }, "sha512-RhXHbqfvY6o3xt/zSHCwSNwLrZlXiqHzewi4eAj9PtZ1T1CqgMJ2yIDb7SKPTG9IikTm925mfzL6hldQVdyNWw=="],490491 "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],492493 "ufo": ["ufo@1.6.4", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="],494495 "ultracite": ["ultracite@7.12.4", "", { "dependencies": { "@clack/prompts": "^1.8.1", "cli-truncate": "^6.1.1", "commander": "^15.0.0", "deepmerge": "^4.3.1", "empathic": "^2.1.0", "execa": "^10.0.1", "fast-glob": "^3.3.3", "find-workspaces": "^0.3.1", "jsonc-parser": "^3.3.1", "log-update": "^8.0.0", "magicast": "^0.5.5", "npm-run-path": "^6.0.0", "nypm": "^0.6.10", "resolve.exports": "^2.0.3", "semver": "^7.8.5", "string-width": "^8.3.0", "which-command": "^0.1.0", "yaml": "^2.9.1", "zod": "^4.6.5" }, "peerDependencies": { "@biomejs/biome": "^2.5.0", "eslint": "^10.9.0", "oxfmt": ">=0.59.0", "oxlint": "^1.86.0", "prettier": "^3.0.0", "stylelint": "^17.0.0" }, "optionalPeers": ["@biomejs/biome", "eslint", "oxfmt", "oxlint", "prettier", "stylelint"], "bin": { "ultracite": "dist/index.js" } }, "sha512-6jVEwaZBaytFm6XRoI3WGS2ZydrkrNvHTD0qTf7983ti2FlEWL1YcxnPaMaYuS6PkXqMhIK2XGr0cbsL4x5pQA=="],496497 "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],498499 "unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="],500501 "vite": ["vite@8.3.2", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.28", "rolldown": "~1.2.11", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-SQr1x6W5vVSbROg7vsyXIaxK9b0G7zsT68acdWWRmnBUsgDieLCRG+Rep9WdZgcposvv/GSnr4GUUBqB3vXq6w=="],502503 "vitest": ["vitest@5.0.3", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/mocker": "5.0.3", "chai": "^6.2.2", "es-module-lexer": "^2.3.2", "expect-type": "^1.4.0", "magic-string": "^1.2.3", "obug": "^2.1.4", "picomatch": "^4.0.7", "std-env": "^4.2.0", "tinybench": "^6.1.4", "tinyexec": "^1.3.0", "tinyglobby": "^0.2.17", "why-is-node-running": "3.2.1" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "5.0.3", "@vitest/browser-preview": "5.0.3", "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", "@vitest/coverage-istanbul": "5.0.3", "@vitest/coverage-v8": "5.0.3", "@vitest/ui": "5.0.3", "happy-dom": "*", "jsdom": "*", "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/coverage-istanbul", "@vitest/coverage-v8", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "./vitest.mjs" } }, "sha512-xMw97S3rjdtj5dkVat7jCsqWBpvchs3RlpQctUqwJD0KkERk40vz2fJ77lDwW/Vzh/pk18eItYAzkodhSes3jQ=="],504505 "which-command": ["which-command@0.1.0", "", { "bin": { "which-command": "cli.js" } }, "sha512-XZyoF5/5hZtXitIwzrU4NKK+Wtbb9aB9CezUEw2Q0wlYK8NUYQxC1rRXgNueYLtBAJwXIb+/tFVk4dozciNJMA=="],506507 "why-is-node-running": ["why-is-node-running@3.2.1", "", { "bin": { "why-is-node-running": "cli.js" } }, "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ=="],508509 "wrap-ansi": ["wrap-ansi@10.0.2", "", { "dependencies": { "ansi-styles": "^6.2.3", "string-width": "^8.2.0" } }, "sha512-6OLRNZqRntVGBm26ghZ5eZhCuWWyOkRCSn8XsOIuq5stpCE/tjLbdozd93naILZig0lmD8ANfRwnhn0DLeXGlg=="],510511 "ws": ["ws@8.22.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg=="],512513 "yaml": ["yaml@2.9.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw=="],514515 "yoctocolors": ["yoctocolors@2.2.0", "", {}, "sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg=="],516517 "zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],518519 "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],520 }521}
added:bunfig.toml+9 added
1[install]2exact = true3linker = "isolated"4# One day, in seconds (pnpm's default). Excludes take package names, not5# name@version, and lift the gate for every version of that package. Bun drops6# an optional dependency the gate blocks without an error, so a too-fresh native7# binding shows up as a tool that will not start, not as an install failure.8minimumReleaseAge = 864009minimumReleaseAgeExcludes = []
added:LICENSE+21 added
1MIT License23Copyright (c) 2026 Oscar Gabriel45Permission is hereby granted, free of charge, to any person obtaining a copy6of this software and associated documentation files (the "Software"), to deal7in the Software without restriction, including without limitation the rights8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9copies of the Software, and to permit persons to whom the Software is10furnished to do so, subject to the following conditions:1112The above copyright notice and this permission notice shall be included in all13copies or substantial portions of the Software.1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21SOFTWARE.
added:oxfmt.config.ts+14 added
1import { defineConfig } from "oxfmt";2import ultracite from "ultracite/oxfmt";34export default defineConfig({5 ...ultracite,6 ignorePatterns: [7 ...(ultracite.ignorePatterns ?? []),8 ".agent_sources/**",9 // Prose is hand-shaped: the glossary keeps term, definition and _Avoid_ on10 // separate lines, and code spans keep their inner spaces.11 "**/*.md",12 "tools/oxlint/anti-slop/**",13 ],14});
added:oxlint.config.ts+79 added
1import { defineConfig } from "oxlint";2import core from "ultracite/oxlint/core";3import vitest from "ultracite/oxlint/vitest";45const V3_OR_HOST_BOUND =6 "Effect v4 only: no v3 @effect/platform or @effect/cli, no effect/unstable/*, and no effect/workflow or effect/cluster (AGENTS.md principle 9).";78export default defineConfig({9 extends: [core, vitest],10 ignorePatterns: [11 ...(core.ignorePatterns ?? []),12 ".agent_sources/**",13 ".agents/**",14 ".claude/**",15 ".codex/**",16 ".cursor/**",17 ".pi/**",18 "tools/oxlint/anti-slop/**",19 ],20 jsPlugins: [21 { name: "anti-slop", specifier: "./tools/oxlint/anti-slop/index.ts" },22 {23 name: "anti-slop-effect",24 specifier: "./tools/oxlint/anti-slop/effect/index.ts",25 },26 ],27 options: {28 typeAware: true,29 },30 rules: {31 "anti-slop-effect/no-manual-effect-error-tag": "error",32 "anti-slop-effect/no-manual-tag-comparison": "error",33 "anti-slop-effect/no-manual-tagged-construction": "error",34 "anti-slop-effect/no-service-constructor-imports": "error",35 "anti-slop-effect/prefer-effect-match": "error",36 "anti-slop/no-array-filter-map": "error",37 "anti-slop/no-chained-type-assertions": "error",38 "anti-slop/no-conditional-empty-object-spread": "error",39 "anti-slop/no-known-value-widening": "error",40 "anti-slop/no-module-mocking": "error",41 "anti-slop/no-object-parameters": "error",42 "anti-slop/no-reduce-accumulator-copy": "error",43 "anti-slop/no-reflect-apply": "error",44 "anti-slop/no-reflect-get": "error",45 "anti-slop/no-runtime-typeof": "error",46 "anti-slop/no-shape-in-symbol-names": "error",47 "anti-slop/no-unknown-parameters": "error",48 "anti-slop/no-unknown-returns": "error",49 "anti-slop/no-unknown-type-aliases": "error",50 "anti-slop/no-unsafe-dictionary-type": "error",51 "anti-slop/no-widen-then-assert": "error",52 "anti-slop/require-readable-spacing": "error",53 "anti-slop/require-safety-comment-for-type-assertion": "error",54 "no-restricted-imports": [55 "error",56 {57 paths: [58 { message: V3_OR_HOST_BOUND, name: "@effect/platform" },59 { message: V3_OR_HOST_BOUND, name: "@effect/cli" },60 { message: V3_OR_HOST_BOUND, name: "effect/workflow" },61 { message: V3_OR_HOST_BOUND, name: "effect/cluster" },62 ],63 patterns: [64 {65 group: [66 "@effect/platform/*",67 "@effect/cli/*",68 "effect/unstable/*",69 "effect/workflow/*",70 "effect/cluster/*",71 ],72 message: V3_OR_HOST_BOUND,73 },74 ],75 },76 ],77 "oxc/no-accumulating-spread": "error",78 },79});
added:package.json+43 added
1{2 "name": "@repo/root",3 "private": true,4 "license": "MIT",5 "workspaces": {6 "packages": [7 "apps/*",8 "packages/*"9 ],10 "catalog": {11 "@effect/platform-bun": "4.0.1",12 "@effect/vitest": "4.0.1",13 "effect": "4.0.1",14 "typescript": "7.0.2",15 "vitest": "5.0.3"16 }17 },18 "type": "module",19 "scripts": {20 "prepare": "effect-tsgo patch --typescript",21 "lockfile:check": "bun install --frozen-lockfile --dry-run",22 "check": "oxlint --report-unused-disable-directives-severity=error && oxfmt --check .",23 "fix": "oxlint --fix && oxfmt .",24 "typecheck": "turbo run typecheck && tsc --noEmit -p tsconfig.json",25 "test": "turbo run test",26 "brand:check": "bun scripts/brand.ts",27 "verify": "bun run lockfile:check && bun run check && bun run typecheck && bun run test && bun run brand:check"28 },29 "devDependencies": {30 "@effect/platform-bun": "catalog:",31 "@effect/tsgo": "0.48.1",32 "@oxlint/plugins": "1.87.0",33 "@repo/brand": "workspace:*",34 "effect": "catalog:",35 "oxfmt": "0.72.0",36 "oxlint": "1.87.0",37 "oxlint-tsgolint": "7.0.2003",38 "turbo": "2.11.7",39 "typescript": "catalog:",40 "ultracite": "7.12.4"41 },42 "packageManager": "bun@1.4.2"43}
added:PROVENANCE.md+16 added
1# Provenance23Code from other projects enters as ports: copied with attribution, then ours to change (ADR 0013). One row per port, with its source, commit, licence and our changes. Licence texts are in `LICENSES/`.45## Ports67| Our file | Origin | Licence | Our changes |8| --- | --- | --- | --- |9| `tools/oxlint/anti-slop/` | [dmmulroy/anti-slop](https://github.com/dmmulroy/anti-slop) at `c44ef22` | MIT, `LICENSES/anti-slop.MIT.txt` | None; vendored by its own install script. See `UPSTREAM.md` there. |10| `tsconfig.base.json` (compiler options and the Effect diagnostics map) | [joelhooks/rat-stack](https://github.com/joelhooks/rat-stack) `tsconfig.base.json` at `fba26d8` | MIT, `LICENSES/rat-stack.MIT.txt` | `importFromBarrel` dropped (unknown to `@effect/tsgo` 0.48.1); `types` emptied, so each package opts into its host's types; `@effect/platform-bun` added to `namespaceImportPackages`; `outdatedApi`, `unstableApiUsage` and `experimentalApiUsage` raised to `error`; `allowedUnstableApis` emptied and granted per path through `overrides`. |1112## Ideas, no code1314| Idea | From | Where it lives |15| --- | --- | --- |16| A release-age gate and exact pins on every install | Rat Stack's `pnpm-workspace.yaml` (`minimumReleaseAge`, `minimumReleaseAgeExclude`) | `bunfig.toml` |
added:tsconfig.base.json+79 added
1{2 "compilerOptions": {3 "target": "ES2023",4 "lib": ["ES2023"],5 "module": "NodeNext",6 "moduleResolution": "NodeNext",7 "moduleDetection": "force",8 "esModuleInterop": true,9 "strict": true,10 "noUncheckedIndexedAccess": true,11 "exactOptionalPropertyTypes": true,12 "noImplicitOverride": true,13 "verbatimModuleSyntax": true,14 "isolatedModules": true,15 "erasableSyntaxOnly": true,16 "resolveJsonModule": true,17 "skipLibCheck": true,18 "types": [],19 "noEmit": true,20 "plugins": [21 {22 "name": "@effect/language-service",23 "namespaceImportPackages": [24 "effect",25 "@effect/platform-bun",26 "@effect/platform-node"27 ],28 "diagnosticSeverity": {29 "anyUnknownInErrorContext": "error",30 "unsafeEffectTypeAssertion": "error",31 "floatingEffect": "error",32 "floatingEffectInVitest": "error",33 "missingEffectContext": "error",34 "missingEffectError": "error",35 "missingLayerContext": "error",36 "leakingRequirements": "error",37 "globalErrorInEffectCatch": "error",38 "globalErrorInEffectFailure": "error",39 "unknownInEffectCatch": "error",40 "tryCatchInEffectGen": "error",41 "returnEffectInGen": "error",42 "runEffectInsideEffect": "error",43 "schemaSyncInEffect": "error",44 "instanceOfSchema": "error",45 "newPromise": "error",46 "asyncFunction": "error",47 "globalConsole": "error",48 "globalConsoleInEffect": "error",49 "globalDate": "error",50 "globalDateInEffect": "error",51 "globalFetch": "error",52 "globalFetchInEffect": "error",53 "globalRandom": "error",54 "globalRandomInEffect": "error",55 "globalTimers": "error",56 "globalTimersInEffect": "error",57 "cryptoRandomUUID": "error",58 "cryptoRandomUUIDInEffect": "error",59 "nodeBuiltinImport": "error",60 "strictEffectProvide": "off",61 "lazyEffect": "off",62 "strictBooleanExpressions": "off",63 "outdatedApi": "error",64 "unstableApiUsage": "error",65 "experimentalApiUsage": "error"66 },67 "allowedUnstableApis": [],68 "overrides": [69 {70 "include": ["scripts/**/*.ts"],71 "options": {72 "allowedUnstableApis": ["effect/process"]73 }74 }75 ]76 }77 ]78 }79}
added:tsconfig.json+8 added
1{2 "extends": "./tsconfig.base.json",3 "compilerOptions": {4 "allowImportingTsExtensions": true5 },6 "include": ["*.config.ts", "scripts/**/*.ts"],7 "exclude": ["node_modules", "dist", ".agent_sources", ".turbo"]8}
added:turbo.json+16 added
1{2 "$schema": "https://turborepo.com/schema.json",3 "tasks": {4 "types": {5 "outputs": ["worker-configuration.d.ts"]6 },7 "typecheck": {8 "dependsOn": ["types", "^types"],9 "outputs": []10 },11 "test": {12 "dependsOn": ["types", "^types"],13 "outputs": []14 }15 }16}