- Configure oxfmt custom import groups for workspace, app, package, and test aliases - Keep type imports grouped with their matching source category instead of one global tail group - Expand the format script to cover formatter config, Vite files, and scripts
52 lines
1.6 KiB
JSON
52 lines
1.6 KiB
JSON
{
|
|
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
"trailingComma": "none",
|
|
"tabWidth": 2,
|
|
"semi": false,
|
|
"singleQuote": true,
|
|
"printWidth": 100,
|
|
"arrowParens": "always",
|
|
"sortImports": {
|
|
"order": "asc",
|
|
"ignoreCase": true,
|
|
"newlinesBetween": true,
|
|
"internalPattern": ["@open-pencil/", "@/", "#core/", "#vue/", "#cli/", "#mcp/", "#tests/"],
|
|
"customGroups": [
|
|
{
|
|
"groupName": "type-workspace",
|
|
"elementNamePattern": ["@open-pencil/**"],
|
|
"modifiers": ["type"]
|
|
},
|
|
{ "groupName": "workspace", "elementNamePattern": ["@open-pencil/**"] },
|
|
{ "groupName": "type-app", "elementNamePattern": ["@/**"], "modifiers": ["type"] },
|
|
{ "groupName": "app", "elementNamePattern": ["@/**"] },
|
|
{
|
|
"groupName": "type-package-alias",
|
|
"elementNamePattern": ["#core/**", "#vue/**", "#cli/**", "#mcp/**"],
|
|
"modifiers": ["type"]
|
|
},
|
|
{
|
|
"groupName": "package-alias",
|
|
"elementNamePattern": ["#core/**", "#vue/**", "#cli/**", "#mcp/**"]
|
|
},
|
|
{
|
|
"groupName": "type-test-alias",
|
|
"elementNamePattern": ["#tests/**"],
|
|
"modifiers": ["type"]
|
|
},
|
|
{ "groupName": "test-alias", "elementNamePattern": ["#tests/**"] }
|
|
],
|
|
"groups": [
|
|
["builtin", "type-builtin"],
|
|
["external", "type-external"],
|
|
["workspace", "type-workspace"],
|
|
["app", "type-app"],
|
|
["package-alias", "type-package-alias"],
|
|
["test-alias", "type-test-alias"],
|
|
["parent", "sibling", "index", "type-parent", "type-sibling", "type-index"],
|
|
"style",
|
|
"unknown"
|
|
]
|
|
}
|
|
}
|