prettierrc规范说明

module.exports = {
    $schema: 'https://json.schemastore.org/prettierrc',
    semi: true, // 行末添加分号
    tabWidth: 4, // tab 用4个空格代替
    singleQuote: true, // 使用单引号
    printWidth: 120, // 一行最多 120 字符
    trailingComma: 'all', // 不使用缩进符,而使用空格
    useTabs: false, // tab 用4个空格代替
    vueIndentScriptAndStyle: false, // 在Vue文件中缩进脚本和样式标签。
    quoteProps: 'as-needed', // 对象的 key 仅在必要时用引号
    jsxSingleQuote: false, // jsx 不使用单引号,而使用双引号
    bracketSpacing: true, // 大括号内的首尾需要空格
    jsxBracketSameLine: false, // jsx 标签的反尖括号需要换行
    arrowParens: 'always', // 箭头函数,只有一个参数的时候,也需要括号
    requirePragma: false, // 不需要写文件开头的 @prettier
    insertPragma: false, // 不需要自动在文件开头插入 @prettier
    proseWrap: 'never', // 文字超长不自动换行
    htmlWhitespaceSensitivity: 'strict', // html严格执行折行
    endOfLine: 'auto', // 换行符使用 lf
};

你可能感兴趣的:(Vue3,前端)