This commit is contained in:
2025-09-28 14:51:32 +08:00
parent a56197a349
commit ed0527bf27
3 changed files with 37 additions and 15 deletions

View File

@@ -3,16 +3,5 @@
"semi": false,
"singleQuote": true,
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"bracketSpacing": true,
"bracketSameLine": false,
"jsxSingleQuote": false,
"trailingComma": "es5",
"arrowParens": "always",
"endOfLine": "lf",
"quoteProps": "as-needed",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"singleAttributePerLine": false
"trailingComma": "none"
}

View File

@@ -83,7 +83,16 @@
### singleAttributePerLine (boolean)
- **默认值**: false
- **说明**: 是否强制每个 JSX 属性独占一行
- **说明**: 强制每个 HTML、Vue 和 JSX 属性独占一行
- **示例**:
```html
<!-- singleAttributePerLine: false -->
<button class="btn" id="submit" type="submit">Submit</button>
<!-- singleAttributePerLine: true -->
<button class="btn" id="submit" type="submit">Submit</button>
```
## 函数和箭头函数
@@ -127,8 +136,32 @@
- **默认值**: "css"
- **可选值**: "css" | "strict" | "ignore"
- **说明**: 指定 HTML、Vue、Angular 文件中全局空白敏感度
- "css": 尊重 CSS display 属性的默认值
- "strict": 所有空白都被认为是重要的
- "ignore": 所有空白都被认为是不重要的
### vueIndentScriptAndStyle (boolean)
- **默认值**: false
- **说明**: Vue 文件中单文件组件的脚本和样式标签内是否缩进
- **说明**: Vue 文件中单文件组件的 `<script>` 和 `<style>` 标签内的代码是否缩进
### experimentalTernaries (boolean)
- **默认值**: false
- **说明**: 尝试 Prettier 的新三元表达式格式化方式,在成为默认行为之前使用
### experimentalOperatorPosition (string)
- **默认值**: "end"
- **可选值**: "start" | "end"
- **说明**: 当二元表达式换行时,操作符的位置
- "start": 操作符放在新行的开头
- "end": 操作符放在前一行的末尾(默认行为)
### objectWrap (string)
- **默认值**: "preserve"
- **可选值**: "preserve" | "collapse"
- **说明**: 配置 Prettier 如何包装对象字面量
- "preserve": 如果在开括号和第一个属性之间有换行符,则保持多行格式
- "collapse": 如果可能,将对象压缩到单行

View File

@@ -16,7 +16,7 @@ registerBuiltInApps()
const systemService = new SystemServiceIntegration({
debug: import.meta.env.DEV,
enablePerformanceMonitoring: true,
enableSecurityAudit: true,
enableSecurityAudit: true
})
// 创建应用实例