-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathoxfmt.config.ts
More file actions
40 lines (37 loc) · 1.04 KB
/
Copy pathoxfmt.config.ts
File metadata and controls
40 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from 'oxfmt';
export default defineConfig({
printWidth: 80,
singleQuote: true,
sortImports: {
groups: [
'type-import', // TypeScript 类型导入
['value-builtin', 'value-external'], // 值导入:Node.js 内置模块 + 外部依赖
'type-internal', // 类型导入:项目内部模块
'value-internal', // 值导入:项目内部模块
['type-parent', 'type-sibling', 'type-index'], // 类型导入:父级/同级/索引模块
['value-parent', 'value-sibling', 'value-index'], // 值导入:父级/同级/索引模块
'unknown', // 未知类型
],
},
sortTailwindcss: {},
sortPackageJson: true,
// 避免在 package.json 添加尾随逗号
overrides: [
{
files: ['*.json', '*.json5', '*.jsonc'],
options: {
trailingComma: 'none',
},
},
],
ignorePatterns: [
'**/dist/**',
'**/public/**',
'**/dev-dist/**',
'**/assets/**',
'**/**.js',
'**/**.mjs',
'**/**.json5',
'ComicReader.umd.d.ts',
],
});