web: Flesh out configs. (#13801)

This commit is contained in:
Teffen Ellis
2025-04-08 01:21:05 +02:00
committed by GitHub
parent 0e83de2697
commit 360223a2ff
32 changed files with 813 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import { format } from "prettier";
import { AuthentikPrettierConfig } from "./config.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",
});
}