// src/actions/gitlint-fix.ts
import { execSync } from "child_process";
import chalk from "chalk";
import ParseGitConfig from "parse-git-config";
var gitlintFix = () => {
  console.log(`
Gitlint Fix Start [${process.cwd()}]
`);
  const gitConfig = ParseGitConfig.sync();
  if (gitConfig.core.ignorecase) {
    execSync("git config core.ignorecase false", { stdio: "inherit" });
    console.warn(chalk.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
  }
  if (gitConfig.core.autocrlf !== false) {
    execSync("git config core.autocrlf false", { stdio: "inherit" });
    console.warn(chalk.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
  }
  if (gitConfig.core.eol !== "lf") {
    execSync("git config core.eol lf", { stdio: "inherit" });
    console.warn(chalk.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
  }
  return 1;
};
export {
  gitlintFix
};
//# sourceMappingURL=gitlint-fix.mjs.map