* web: Fix issues surrounding availability of controllers during init. web: Fix edgecase where flow does not have brand. * web: Fix import path. * web: Clean up mixin/controller paths. * web: Prepare for consistent import styling. - Prep for Storybook fixes. * web: Update MDX types. * web: Fix issues surrounding async imports, MDX typing, relative paths. * web: Format. Clarify. * web: Group module types.
		
			
				
	
	
		
			106 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/**
 | 
						|
 * @file Prettier configuration for authentik.
 | 
						|
 *
 | 
						|
 * @import { Config as PrettierConfig } from "prettier";
 | 
						|
 * @import { PluginConfig as SortPluginConfig } from "@trivago/prettier-plugin-sort-imports";
 | 
						|
 *
 | 
						|
 * @typedef {object} PackageJSONPluginConfig
 | 
						|
 * @property {string[]} [packageSortOrder] Custom ordering array.
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * authentik Prettier configuration.
 | 
						|
 *
 | 
						|
 * @type {PrettierConfig & SortPluginConfig & PackageJSONPluginConfig}
 | 
						|
 * @internal
 | 
						|
 */
 | 
						|
export const AuthentikPrettierConfig = {
 | 
						|
    arrowParens: "always",
 | 
						|
    bracketSpacing: true,
 | 
						|
    embeddedLanguageFormatting: "auto",
 | 
						|
    htmlWhitespaceSensitivity: "css",
 | 
						|
    insertPragma: false,
 | 
						|
    jsxSingleQuote: false,
 | 
						|
    printWidth: 100,
 | 
						|
    proseWrap: "preserve",
 | 
						|
    quoteProps: "consistent",
 | 
						|
    requirePragma: false,
 | 
						|
    semi: true,
 | 
						|
    singleQuote: false,
 | 
						|
    tabWidth: 4,
 | 
						|
    trailingComma: "all",
 | 
						|
    useTabs: false,
 | 
						|
    vueIndentScriptAndStyle: false,
 | 
						|
    plugins: [
 | 
						|
        // ---
 | 
						|
        "prettier-plugin-packagejson",
 | 
						|
        "@trivago/prettier-plugin-sort-imports",
 | 
						|
    ],
 | 
						|
    importOrder: [
 | 
						|
        // ---
 | 
						|
 | 
						|
        "^(@goauthentik/|#)common.+",
 | 
						|
        "^(@goauthentik/|#)elements.+",
 | 
						|
        "^(@goauthentik/|#)components.+",
 | 
						|
        "^(@goauthentik/|#)user.+",
 | 
						|
        "^(@goauthentik/|#)admin.+",
 | 
						|
        "^(@goauthentik/|#)flow.+",
 | 
						|
        "^(@goauthentik/|#)flow.+",
 | 
						|
 | 
						|
        "^#.+",
 | 
						|
        "^@goauthentik.+",
 | 
						|
 | 
						|
        "<THIRD_PARTY_MODULES>",
 | 
						|
 | 
						|
        "^(@?)lit(.*)$",
 | 
						|
        "\\.css$",
 | 
						|
        "^@goauthentik/api$",
 | 
						|
        "^[./]",
 | 
						|
    ],
 | 
						|
    importOrderSideEffects: false,
 | 
						|
    importOrderSeparation: true,
 | 
						|
    importOrderSortSpecifiers: true,
 | 
						|
    importOrderParserPlugins: ["typescript", "jsx", "classProperties", "decorators-legacy"],
 | 
						|
    overrides: [
 | 
						|
        {
 | 
						|
            files: "schemas/**/*.json",
 | 
						|
            options: {
 | 
						|
                tabWidth: 2,
 | 
						|
            },
 | 
						|
        },
 | 
						|
        {
 | 
						|
            files: "tsconfig.json",
 | 
						|
            options: {
 | 
						|
                trailingComma: "none",
 | 
						|
            },
 | 
						|
        },
 | 
						|
        {
 | 
						|
            files: "package.json",
 | 
						|
            options: {
 | 
						|
                packageSortOrder: [
 | 
						|
                    // ---
 | 
						|
                    "name",
 | 
						|
                    "version",
 | 
						|
                    "description",
 | 
						|
                    "license",
 | 
						|
                    "private",
 | 
						|
                    "author",
 | 
						|
                    "authors",
 | 
						|
                    "scripts",
 | 
						|
                    "main",
 | 
						|
                    "type",
 | 
						|
                    "exports",
 | 
						|
                    "imports",
 | 
						|
                    "dependencies",
 | 
						|
                    "devDependencies",
 | 
						|
                    "peerDependencies",
 | 
						|
                    "optionalDependencies",
 | 
						|
                    "wireit",
 | 
						|
                    "resolutions",
 | 
						|
                    "engines",
 | 
						|
                ],
 | 
						|
            },
 | 
						|
        },
 | 
						|
    ],
 | 
						|
};
 |