// src/lib/eslintCache.ts
import { mkdirSync } from "node:fs";
import path from "node:path";
function workspaceEslintCachePath(rootDir, workspaceLocation) {
  const segment = workspaceLocation === "." ? "root" : workspaceLocation;
  return path.resolve(rootDir, ".xy/cache/eslint", segment, ".eslintcache");
}
function ensureEslintCacheDir(cachePath) {
  mkdirSync(path.dirname(cachePath), { recursive: true });
}
function legacyWorkspaceEslintCachePath(rootDir, workspaceLocation) {
  return path.resolve(rootDir, workspaceLocation, ".eslintcache");
}
export {
  ensureEslintCacheDir,
  legacyWorkspaceEslintCachePath,
  workspaceEslintCachePath
};
//# sourceMappingURL=eslintCache.mjs.map
