-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy path.oxfmtrc.jsonc
More file actions
83 lines (83 loc) · 2.7 KB
/
Copy path.oxfmtrc.jsonc
File metadata and controls
83 lines (83 loc) · 2.7 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"trailingComma": "es5",
"printWidth": 120,
"singleQuote": false,
"sortPackageJson": false,
"insertFinalNewline": true,
"sortImports": {
"groups": [
"side_effect",
"ember-glimmer",
["builtin", "external"],
"ember-dash",
"warp-drive",
["internal", "subpath"],
["parent", "sibling", "index"],
],
"customGroups": [
// NOTE: a side-effect import whose source also matches one of the path-based
// groups below (e.g. `import '@warp-drive/ember/install'`) does not reliably
// land in the `side_effect` group — customGroups matching by path appears to
// win over the `side_effect` selector regardless of declaration order,
// modifiers, or pattern specificity (tried all three). Filed upstream as
// https://github.com/oxc-project/oxc/issues/26165 — re-test on oxfmt upgrades.
// Workaround: mark the specific import with `// oxfmt-ignore` to pin it in
// place (see e.g. tests/core/start.ts).
{
"groupName": "ember-glimmer",
"elementNamePattern": ["@ember/**", "@ember", "@glimmer/**", "@glimmer", "ember"],
},
{
"groupName": "warp-drive",
"elementNamePattern": ["@ember-data", "@ember-data/**", "@warp-drive", "@warp-drive/**"],
},
{
"groupName": "ember-dash",
"elementNamePattern": ["ember-*", "ember-*/**"],
},
],
"newlinesBetween": true,
"partitionByNewline": false,
"sortSideEffects": false,
},
"overrides": [
{
"files": ["*.js", "*.ts", "*.cjs", "*.cts", "*.mjs", "*.mts"],
"options": { "singleQuote": true },
},
{
// golden fixtures asserted against verbatim ember-cli blueprint output;
// reordering imports here would desync them from what blueprints actually generate
"files": ["tests/blueprints/fixtures/**"],
"options": { "sortImports": false },
},
],
"ignorePatterns": [
"pnpm-lock.yaml",
"dist",
"dist-test",
"unstable-preview-types",
"preview-types",
"warp-drive-packages/core/types",
"*.hbs",
"*.html",
"*.md",
"*.gjs",
"*.gts",
"MOCK_DATA.json",
".mock-cache/",
// these fixtures are compared byte-for-byte against real `prettier.format()`
// output at test runtime (tests/codemods/tests/index.spec.ts); oxfmt's output
// can differ from prettier's in ways unrelated to config (e.g. comment placement)
"tests/codemods/tests/__testfixtures__/",
"blueprints/",
"vendor/",
"!tests/blueprints/",
"*.yml",
"public/",
"tmp/",
"docs-viewer/docs.warp-drive.io/api/",
"docs-viewer/docs.warp-drive.io/guides/",
],
}