@ton-ai-core/vibecode-linter
Version:
Advanced TypeScript linter with Git integration, dependency analysis, and comprehensive error reporting
91 lines • 4.37 kB
JavaScript
// CHANGE: Create public API entry point for library consumers
// WHY: Enforce FCIS - export only APP orchestration and CORE utilities, hide SHELL internals
// QUOTE(ТЗ): "CORE никогда не вызывает SHELL"; "Functional Core, Imperative Shell"
// REF: Architecture refactoring - proper library API
// PURITY: Re-exports only (meta-module)
// INVARIANT: All exports are either pure functions or typed interfaces
// COMPLEXITY: O(1) - module resolution only
// ═══════════════════════════════════════════════════════════════════════════════
// MAIN ORCHESTRATOR (Programmatic Entry Point)
// ═══════════════════════════════════════════════════════════════════════════════
/**
* 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";
// ═══════════════════════════════════════════════════════════════════════════════
// CORE PURE FUNCTIONS (Mathematical Utilities)
// ═══════════════════════════════════════════════════════════════════════════════
/**
* 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 ERRORS (Effect-based)
// ═══════════════════════════════════════════════════════════════════════════════
/**
* 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 { ExecError, ExternalToolError, FSError, InvariantViolation, MissingDeps, ParseError, PreflightFailed, } from "./core/errors.js";
//# sourceMappingURL=index.js.map