@ton-ai-core/vibecode-linter
Version:
Advanced TypeScript linter with Git integration, dependency analysis, and comprehensive error reporting
108 lines • 3.1 kB
TypeScript
/**
* Main linter orchestrator for programmatic usage.
*
* @example
* ```typescript
* import { runLinter } from '@ton-ai-core/vibecode-linter';
*
* const exitCode = await runLinter({
* targetPath: 'src/',
* maxClones: 5,
* width: 120,
* noFix: false,
* noPreflight: false,
* fixPeers: false,
* });
*
* if (exitCode === 0) {
* console.log('✅ No errors found');
* }
* ```
*
* @pure false - Orchestrates SHELL effects (linters, git, file I/O)
* @returns ExitCode (0 = success, 1 = errors found)
*/
export { runLinter } from "./app/runLinter.js";
/**
* Exit code returned by linter operations.
*
* @pure true
* @invariant ExitCode ∈ {0, 1}
*/
export type { ExitCode } from "./core/models.js";
/**
* CLI options for configuring linter behavior.
*
* @pure true
*/
/**
* Linter configuration loaded from linter.config.json.
*
* @pure true
*/
/**
* Lint message types from different sources.
*
* @pure true
*/
/**
* Code duplication detection results.
*
* @pure true
*/
/**
* Git diff and blame types.
*
* @pure true
*/
export type { BiomeMessage, CLIOptions, DiffSnippet, DiffSymbol, DuplicateInfo, ESLintMessage, GitBlameResult, GitDiffBlock, LinterConfig, LintMessage, LintMessageWithFile, LintResult, PriorityLevel, SarifReport, TypeScriptMessage, } from "./core/types/index.js";
/**
* Compute exit code from decision state.
*
* @pure true
* @invariant ∀ state: computeExitCode(state) ∈ {0, 1}
* @complexity O(1)
*
* @remarks
* Multiple implementations for different use cases:
* - computeExitCode: Pure function using pipe
* - computeExitCodeFlow: Flow composition for currying
* - computeExitCodeEffect: Effect wrapper for Effect pipelines
*/
export { computeExitCode, computeExitCodeEffect, computeExitCodeFlow, } from "./core/decision.js";
/**
* Priority level and grouping utilities for lint messages.
*
* @pure true
* @complexity O(n) where n = |messages|
*/
export { getPriorityLevel, getPriorityName, groupByLevel, groupBySections, ruleIdOfCore, } from "./core/format/priority.js";
export { formatChangeTree } from "./core/project/change-tree.js";
export { deriveFileContentMetrics } from "./core/project/metrics.js";
export { createProjectSnapshot, formatProjectTree, } from "./core/project/tree.js";
/**
* Type guards for discriminating lint message sources.
*
* @pure true
* @complexity O(1)
*/
export { isBiomeMessage, isESLintMessage, isTypeScriptMessage, } from "./core/types/index.js";
/**
* Typed application errors for Effect-based error handling
*
* @pure true (Data classes)
* @invariant All errors extend Data.TaggedError
* @complexity O(1)
*
* @example
* ```ts
* import { Effect } from "effect";
* import { ExternalToolError } from "@ton-ai-core/vibecode-linter";
*
* const program = Effect.fail(
* new ExternalToolError({ tool: "eslint", reason: "Config not found" })
* );
* ```
*/
export { type AppError, ExecError, ExternalToolError, FSError, InvariantViolation, MissingDeps, ParseError, PreflightFailed, } from "./core/errors.js";
//# sourceMappingURL=index.d.ts.map