@snailicide/build-config / prettier / prettierConfiguration
prettierConfiguration()
ts
function prettierConfiguration(_options?, _overrides?): {
[key: string]: unknown;
overrides: PrettierOverrides;
printWidth?: number;
tabWidth?: number;
useTabs?: boolean;
parentParser?: string;
__embeddedInHtml?: boolean;
semi?: boolean;
singleQuote?: boolean;
jsxSingleQuote?: boolean;
trailingComma?: "none" | "es5" | "all";
bracketSpacing?: boolean;
objectWrap?: "preserve" | "collapse";
bracketSameLine?: boolean;
rangeStart?: number;
rangeEnd?: number;
parser?: LiteralUnion<BuiltInParserName, string>;
filepath?: string;
requirePragma?: boolean;
insertPragma?: boolean;
checkIgnorePragma?: boolean;
proseWrap?: "always" | "never" | "preserve";
arrowParens?: "always" | "avoid";
plugins?: (string | URL | Plugin<any>)[];
htmlWhitespaceSensitivity?: "css" | "strict" | "ignore";
endOfLine?: "auto" | "lf" | "crlf" | "cr";
quoteProps?: "preserve" | "consistent" | "as-needed";
vueIndentScriptAndStyle?: boolean;
embeddedLanguageFormatting?: "off" | "auto";
singleAttributePerLine?: boolean;
experimentalOperatorPosition?: "start" | "end";
experimentalTernaries?: boolean;
jsxBracketSameLine?: boolean;
jsdocSpaces?: number;
jsdocPrintWidth?: number;
jsdocDescriptionWithDot?: boolean;
jsdocDescriptionTag?: boolean;
jsdocVerticalAlignment?: boolean;
jsdocKeepUnParseAbleExampleIndent?: boolean;
jsdocSingleLineComment?: boolean;
jsdocCommentLineStrategy?: "singleLine" | "multiline" | "keep";
jsdocSeparateReturnsFromParam?: boolean;
jsdocSeparateTagGroups?: boolean;
jsdocAddDefaultToDescription?: boolean;
jsdocCapitalizeDescription?: boolean;
jsdocPreferCodeFences?: boolean;
tsdoc?: boolean;
jsdocLineWrappingStyle?: "greedy";
jsdocTagsOrder?: Record<string, number>;
};Defined in: packages/build-config/src/prettier/index.ts:96
Parameters
| Parameter | Type |
|---|---|
_options? | PrettierOptions |
_overrides? | PrettierOverrides |
Returns
| Name | Type | Description | Defined in |
|---|---|---|---|
overrides | PrettierOverrides | - | packages/build-config/src/prettier/index.ts:26 |
printWidth? | number | Specify the line length that the printer will wrap on. Default 80 | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/doc.d.ts:214 |
tabWidth? | number | Specify the number of spaces per indentation-level. Default 2 | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/doc.d.ts:219 |
useTabs? | boolean | Indent lines with tabs instead of spaces Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/doc.d.ts:224 |
parentParser? | string | - | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/doc.d.ts:225 |
__embeddedInHtml? | boolean | - | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/doc.d.ts:226 |
semi? | boolean | Print semicolons at the ends of statements. Default true | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:324 |
singleQuote? | boolean | Use single quotes instead of double quotes. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:329 |
jsxSingleQuote? | boolean | Use single quotes in JSX. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:334 |
trailingComma? | "none" | "es5" | "all" | Print trailing commas wherever possible. Default "all" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:339 |
bracketSpacing? | boolean | Print spaces between brackets in object literals. Default true | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:344 |
objectWrap? | "preserve" | "collapse" | How to wrap object literals. Default "preserve" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:349 |
bracketSameLine? | boolean | Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:355 |
rangeStart? | number | Format only a segment of a file. Default 0 | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:360 |
rangeEnd? | number | Format only a segment of a file. Default Number.POSITIVE_INFINITY | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:365 |
parser? | LiteralUnion<BuiltInParserName, string> | Specify which parser to use. | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:369 |
filepath? | string | Specify the input filepath. This will be used to do parser inference. | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:373 |
requirePragma? | boolean | Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful when gradually transitioning large, unformatted codebases to prettier. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:379 |
insertPragma? | boolean | Prettier can insert a special Format marker at the top of files specifying that the file has been formatted with prettier. This works well when used in tandem with the --require-pragma option. If there is already a docblock at the top of the file then this option will add a newline to it with the Format marker. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:387 |
checkIgnorePragma? | boolean | Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:392 |
proseWrap? | "always" | "never" | "preserve" | By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out. Default "preserve" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:398 |
arrowParens? | "always" | "avoid" | Include parentheses around a sole arrow function parameter. Default "always" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:403 |
plugins? | (string | URL | Plugin<any>)[] | Provide ability to support new languages to prettier. | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:407 |
htmlWhitespaceSensitivity? | "css" | "strict" | "ignore" | How to handle whitespaces in HTML. Default "css" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:412 |
endOfLine? | "auto" | "lf" | "crlf" | "cr" | Which end of line characters to apply. Default "lf" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:417 |
quoteProps? | "preserve" | "consistent" | "as-needed" | Change when properties in objects are quoted. Default "as-needed" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:422 |
vueIndentScriptAndStyle? | boolean | Whether or not to indent the code inside <script> and <style> tags in Vue files. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:427 |
embeddedLanguageFormatting? | "off" | "auto" | Control whether Prettier formats quoted code embedded in the file. Default "auto" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:432 |
singleAttributePerLine? | boolean | Enforce single attribute per line in HTML, Vue and JSX. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:437 |
experimentalOperatorPosition? | "start" | "end" | Where to print operators when binary expressions wrap lines. Default "end" | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:442 |
experimentalTernaries? | boolean | Use curious ternaries, with the question mark after the condition, instead of on the same line as the consequent. Default false | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:448 |
jsxBracketSameLine? | boolean | Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. Default false Deprecated use bracketSameLine instead | node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/index.d.ts:454 |
jsdocSpaces? | number | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:3 |
jsdocPrintWidth? | number | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:4 |
jsdocDescriptionWithDot? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:5 |
jsdocDescriptionTag? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:6 |
jsdocVerticalAlignment? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:7 |
jsdocKeepUnParseAbleExampleIndent? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:8 |
jsdocSingleLineComment? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:9 |
jsdocCommentLineStrategy? | "singleLine" | "multiline" | "keep" | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:10 |
jsdocSeparateReturnsFromParam? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:11 |
jsdocSeparateTagGroups? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:12 |
jsdocAddDefaultToDescription? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:13 |
jsdocCapitalizeDescription? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:14 |
jsdocPreferCodeFences? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:15 |
tsdoc? | boolean | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:16 |
jsdocLineWrappingStyle? | "greedy" | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:17 |
jsdocTagsOrder? | Record<string, number> | - | node_modules/.pnpm/prettier-plugin-jsdoc@1.3.3_prettier@3.6.2/node_modules/prettier-plugin-jsdoc/dist/types.d.ts:18 |