@ntnyq/prettier-config
Version:
Sharable prettier config of ntnyq.
51 lines (50 loc) • 1.11 kB
JavaScript
//#region src/index.ts
const DEFAULT_CONFIG = {
arrowParens: "avoid",
bracketSameLine: false,
bracketSpacing: true,
embeddedLanguageFormatting: "auto",
endOfLine: "lf",
experimentalOperatorPosition: "start",
experimentalTernaries: false,
htmlWhitespaceSensitivity: "css",
insertPragma: false,
jsxSingleQuote: true,
objectWrap: "preserve",
printWidth: 80,
proseWrap: "preserve",
quoteProps: "as-needed",
rangeEnd: Number.POSITIVE_INFINITY,
rangeStart: 0,
requirePragma: false,
semi: false,
singleAttributePerLine: true,
singleQuote: true,
tabWidth: 2,
trailingComma: "all",
useTabs: false,
vueIndentScriptAndStyle: false
};
/**
* @deprecated use `DEFAULT_CONFIG` instead
*/
const config = DEFAULT_CONFIG;
/**
* Define Prettier config
*
* @param config - Prettier config
* @returns Prettier config
*/
function defineConfig(config$1 = {}) {
const mergedConfig = {
...DEFAULT_CONFIG,
...config$1
};
return mergedConfig;
}
/**
* @deprecated use `DEFAULT_CONFIG` instead
*/
var src_default = config;
//#endregion
export { DEFAULT_CONFIG, config, src_default as default, defineConfig };