import { Logger } from "@medusajs/framework/types";
export interface LintResult {
    errorCount: number;
    warningCount: number;
    formatted: string;
}
/**
 * The outcome of a lint attempt. `lintProject` resolves config presence and the
 * availability of `eslint` itself, so callers branch on the discriminant
 * instead of pre-checking the filesystem:
 *
 * - `eslint-not-installed` — the `eslint` package is not resolvable from the
 *   project; nothing was linted (a warning was already logged).
 * - `no-config` — no flat ESLint config was found for the project. Detection is
 *   delegated to ESLint, so this matches the config the runner itself would
 *   use, including its ancestor-directory lookup (monorepo support).
 * - `linted` — ESLint ran; `result` holds the counts and formatted output.
 */
export type LintOutcome = {
    status: "eslint-not-installed";
} | {
    status: "no-config";
} | {
    status: "linted";
    result: LintResult;
};
/**
 * Run ESLint over the project (or the provided patterns) using the consumer's
 * own `eslint.config.js`. The user's flat config is responsible for scoping
 * rules via `files`/`ignores` blocks — we only invoke the runner.
 *
 * Config detection is delegated to ESLint via `findConfigFile()` so it honors
 * the exact same resolution the runner uses, including the ancestor-directory
 * lookup that lets a config at a monorepo/repo root apply to a nested project.
 *
 * See {@link LintOutcome} for the possible results.
 */
export declare function lintProject(opts: {
    cwd: string;
    patterns?: string[];
    fix?: boolean;
    /** When true, only error-level results are reported (warnings suppressed). */
    quiet?: boolean;
    logger: Logger;
}): Promise<LintOutcome>;
/**
 * Shared lint gate for `medusa build` and `medusa develop`. Encapsulates the
 * common flow; the only difference between the two callers is `failOnError`:
 *
 * - `--lint false`            → skipped silently (debug log). On `build` and
 *   `develop`, linting is off by default unless `@medusajs/eslint-plugin` is
 *   installed in the project.
 * - no `eslint.config.js`     → skipped with an info log; caller continues.
 * - `eslint` not installed    → skipped with a warn log; caller continues.
 * - lint errors:
 *     - `failOnError: true`   → print output, log error, exit 1 (never returns).
 *     - `failOnError: false`  → print output, log a warning, and continue.
 * - lint warnings only        → print output, log a warning, and continue.
 * - runner throws:
 *     - `failOnError: true`   → log error and exit 1, hint to use `--lint false`.
 *     - `failOnError: false`  → log a warning and continue.
 *
 * `develop` gates the dev server on lint passing, so it uses the default
 * `failOnError: true`. `build` treats lint like the compiler treats type
 * errors — non-blocking: it surfaces problems but still produces a build, so it
 * passes `failOnError: false`.
 *
 * Returns when the caller should proceed; otherwise calls `process.exit(1)`.
 */
export declare function runLintStep(opts: {
    directory: string;
    lint: boolean;
    fix?: boolean;
    /** When true, only error-level results are reported (warnings suppressed). */
    quiet?: boolean;
    logger: Logger;
    /** Extra context appended to the error message, e.g. "Dev server not started." */
    failureSuffix?: string;
    /** When true (default), lint errors exit the process with code 1. */
    failOnError?: boolean;
}): Promise<void>;
//# sourceMappingURL=lint-project.d.ts.map