import { fitCommandToScreen } from './screen.js';
import prettier from 'prettier';
const PRETTIER = {
    arrowParens: 'avoid',
    bracketSpacing: true,
    endOfLine: 'lf',
    importOrder: [
        '^\\w(.*)$',
        '^@(.*)$',
        '~(.*)$',
        '\\..(.*)$',
        '\\.(.*)$',
    ],
    importOrderSeparation: true,
    importOrderSortSpecifiers: true,
    parser: 'typescript',
    printWidth: 72,
    proseWrap: 'always',
    quoteProps: 'as-needed',
    semi: false,
    singleAttributePerLine: true,
    singleQuote: true,
    tabWidth: 2,
    trailingComma: 'all',
    useTabs: false,
};
export function formatTypeScriptCode(code) {
    return prettier.format(code, {
        ...PRETTIER,
        parser: 'typescript',
    });
}
export async function formatCommand(input) {
    return fitCommandToScreen(input);
}
//# sourceMappingURL=format.js.map