Skip to content

Commit

Permalink
fix: make main config fn synchronous
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwaltz committed Dec 7, 2024
1 parent 8d6c090 commit aa1682c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import type { ResolvableFlatConfig } from "eslint-flat-config-utils";
import { formattingConfigs } from "./formatting.js";
import { globalConfigs } from "./global.js";
Expand All @@ -7,16 +8,16 @@ import { defineFlatConfigs } from "./utils.js";

export * from "./utils.js";

export async function danielwaltz(...userConfigs: ResolvableFlatConfig[]) {
export function danielwaltz(...userConfigs: ResolvableFlatConfig[]) {
const composer = defineFlatConfigs(...userConfigs);

await composer.prepend(globalConfigs());
composer.prepend(globalConfigs());

await composer.append(typescriptConfigs());
composer.append(typescriptConfigs());

await composer.append(importConfigs());
composer.append(importConfigs());

await composer.append(formattingConfigs());
composer.append(formattingConfigs());

return composer;
}

0 comments on commit aa1682c

Please sign in to comment.