import { writeFile } from './chunk-V3VWCAQH.js';
import { __name } from './chunk-6AXVLTU5.js';
import { LogLevelLabel } from '@storm-software/config-tools/types';
import { joinPaths } from '@stryke/path/join-paths';

async function writeDefaultEslintConfig(log, context, type = "recommended") {
  const eslintConfigFile = joinPaths(context.workspaceConfig.workspaceRoot, "eslint.config.js");
  const eslintConfig = `
import { getConfig } from "eslint-config-storm-stack";

Error.stackTraceLimit = Number.POSITIVE_INFINITY;

export default getConfig({
  repositoryName: "${context.workspaceConfig.name || context.name || "storm-stack"}",
  "storm-stack": "${type}",
});
`;
  log(LogLevelLabel.INFO, `Writing a default ESLint config file to ${eslintConfigFile}`);
  return writeFile(log, eslintConfigFile, eslintConfig);
}
__name(writeDefaultEslintConfig, "writeDefaultEslintConfig");

export { writeDefaultEslintConfig };
//# sourceMappingURL=chunk-EYLIL45P.js.map
//# sourceMappingURL=chunk-EYLIL45P.js.map