Files
authentik/packages/prettier-config/lib/formatter.js
T
Teffen Ellis af5798909f web: Fix issue where TypeDoc comments are arranged between imports. (#15364)
* web: Fix issue where TypeDoc comments are arranged between imports.

* web: Fix Live Reload paths, deps.
2025-07-02 12:22:20 -04:00

21 lines
494 B
JavaScript

import { format } from "prettier";
import { AuthentikPrettierConfig } from "./constants.js";
/**
* Format using Prettier.
*
* Defaults to using the TypeScript parser.
*
* @category Formatting
* @param {string} fileContents The contents of the file to format.
*
* @returns {Promise<string>} The formatted file contents.
*/
export function formatWithPrettier(fileContents) {
return format(fileContents, {
...AuthentikPrettierConfig,
parser: "typescript",
});
}