mirror of
https://github.com/goauthentik/authentik
synced 2026-04-26 01:25:02 +02:00
* core, web: bump ajv from 6.12.6 to 6.14.0 in /packages/eslint-config Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.6 to 6.14.0. - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.6...v6.14.0) --- updated-dependencies: - dependency-name: ajv dependency-version: 6.14.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump packages. Fix order. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
import { AuthentikPrettierConfig } from "./constants.js";
|
|
|
|
import { format } from "prettier";
|
|
|
|
/**
|
|
* 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",
|
|
});
|
|
}
|