Files
huangguo_admin/.prettierrc.js
T
2025-06-10 17:11:41 +07:00

44 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* @Author:
* @Mail:
* @Date: 2022-10-25 17:03:04
* @LastEditTime: 2023-01-02 19:38:39
* @LastEditors: Please set LastEditors
* @FilePath: /zh_h5/.prettierrc.js
*/
/*
* @Author:
* @Mail:
* @Date: 2022-10-25 16:38:07
* @LastEditTime: 2022-10-25 17:00:49
* @LastEditors: Please set LastEditors
* @FilePath: /Flj_web_admin/.prettierc.js
*/
module.exports = {
printWidth: 200, // 一行最多 100 字符
useTabs: false, // 使用tab缩进代替空格;true Tab缩进,false 空格缩进
tabWidth: 2, // 使用 4 个空格缩进
semi: true, // 行尾需要有分号
singleQuote: true, // 使用单引号
quoteProps: 'as-needed', // 对象的 key 仅在必要时用引号
trailingComma: 'es5', // 末尾不需要逗号 'es5' none
bracketSpacing: true, // 大括号内的首尾需要空格
jsxSingleQuote: false, // jsx 不使用单引号,而使用双引号
jsxBracketSameLine: true, // jsx 标签的反尖括号需要换行
arrowParens: 'avoid', // 箭头函数,只有一个参数的时候,也需要括号 ‘always 'avoid' 'none'
requirePragma: false, //无需顶部注释即可格式化 @prettier
insertPragma: false, //在已被preitter格式化的文件顶部加上标注 @prettier
proseWrap: 'preserve', // 使用默认的折行标准
htmlWhitespaceSensitivity: 'css', // 根据显示样式决定 html 要不要折行 'css' 'ignore'
vueIndentScriptAndStyle: false, //不对vue中的script及style标签缩进
endOfLine: 'lf', // 换行符使用 lf 结尾是 \n \r \n\r auto
embeddedLanguageFormatting: 'auto', //对引用代码进行格式化
rangeStart: 0, // 每个文件格式化的范围是文件的全部内容
rangeEnd: Infinity,
};