mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
054d124afe
Many thanks to all the other developers who made this possible, especially Shoelace
28 lines
556 B
JavaScript
28 lines
556 B
JavaScript
const {format} = require('prettier');
|
|
|
|
/** Formats markup using prettier. */
|
|
module.exports = function (content, options)
|
|
{
|
|
options = {
|
|
arrowParens: 'avoid',
|
|
bracketSpacing: true,
|
|
htmlWhitespaceSensitivity: 'css',
|
|
insertPragma: false,
|
|
bracketSameLine: false,
|
|
jsxSingleQuote: false,
|
|
parser: 'html',
|
|
printWidth: 120,
|
|
proseWrap: 'preserve',
|
|
quoteProps: 'as-needed',
|
|
requirePragma: false,
|
|
semi: true,
|
|
singleQuote: true,
|
|
tabWidth: 2,
|
|
trailingComma: 'none',
|
|
useTabs: false,
|
|
...options
|
|
};
|
|
|
|
return format(content, options);
|
|
};
|