create-elysiajs
Version:
Scaffolding your Elysia project with the environment with easy!
35 lines (34 loc) • 737 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateEslintConfig = generateEslintConfig;
function generateEslintConfig({ orm }) {
return [
`import antfu from "@antfu/eslint-config"`,
orm === "Drizzle" && `import drizzle from "eslint-plugin-drizzle";`,
`
export default antfu(
{
stylistic: {
indent: 2,
quotes: "double",
},
},
{
files: ["**/*.js", "**/*.ts"],
rules: {
"node/prefer-global/process": "off",
"no-console": "off",
"antfu/no-top-level-await": "off",
},`,
orm === "Drizzle" &&
`plugins: {
drizzle,
},`,
`
},
);
`,
]
.filter(Boolean)
.join("\n");
}