flatbuffers-format API
    Preparing search index...

    Type Alias FormatOptions

    type FormatOptions = {
        bracketSpacing?: boolean;
        checkIgnorePragma?: boolean;
        commentWidth?: number;
        compactSingleLine?: boolean;
        endOfLine?: "lf" | "crlf" | "auto";
        indent?: number;
        lineWidth?: number;
        maxBlankLines?: number;
        newline?: "\n" | "\r\n";
        objectWrap?: "preserve" | "collapse";
        requirePragma?: boolean;
        trailingComma?: "all" | "none";
        unsafe?: boolean;
        useTabs?: boolean;
        wrapComments?: boolean;
    }
    Index
    bracketSpacing?: boolean

    Spaces inside the braces of a body collapsed onto one line: { a, b } when true, {a, b} when false. Default: true.

    checkIgnorePragma?: boolean

    Leave a file unchanged when a comment at its top contains @noformat or @noprettier. Default: false.

    commentWidth?: number

    Wrap column for wrapComments. Defaults to lineWidth.

    compactSingleLine?: boolean

    If true, enum/union bodies (and single-field table/struct bodies) that fit within lineWidth collapse onto one line. Doc comments, block comments, and per-value metadata always force expansion. Default: true.

    endOfLine?: "lf" | "crlf" | "auto"

    Line endings: "lf", "crlf", or "auto" to keep the ones the source uses (decided by its first line break). Takes precedence over newline. Default: "lf".

    indent?: number

    Spaces per indent level (or tabs per level when useTabs is true). Default: 2.

    lineWidth?: number

    Target column for "does it fit on one line" decisions, used by compactSingleLine and wrapComments. Default: 80.

    maxBlankLines?: number

    Maximum consecutive blank lines preserved between top-level declarations. Runs of more newlines collapse to this many. Default: 1.

    newline?: "\n" | "\r\n"

    Newline style at end of every emitted line. Default: "\n".

    objectWrap?: "preserve" | "collapse"

    "preserve" keeps a body expanded when the source has a line break between its { and the first item, as Prettier does for objects; "collapse" puts every body that fits on one line (see compactSingleLine). Default: "preserve".

    requirePragma?: boolean

    Format only files with a comment at their top containing @format or @prettier; leave every other file unchanged. Default: false.

    trailingComma?: "all" | "none"

    "all" puts a comma after the last value of an enum or union written one value per line; "none" leaves it off. A body collapsed onto one line never gets one. Same name and default as Prettier's option. Default: "all".

    unsafe?: boolean

    Skip the checks that the output keeps every comment and code token of the input. Only for working around a bug in those checks. Default: false.

    useTabs?: boolean

    Use literal tab characters for indentation instead of spaces. When true, each indent level emits indent tab characters (so the combination useTabs: true, indent: 1 is one tab per level — the usual setting; useTabs: true, indent: 2 would emit two tabs per level). Default: false.

    wrapComments?: boolean

    If true, line comments longer than commentWidth are reflowed at whitespace boundaries. URL-shaped tokens (https://…) are never split mid-token. Block comments and doc comments are not touched. Default: false.