Repository navigation
Expand file tree
/
Copy pathbiome.base.jsonc
More file actions
117 lines (117 loc) · 3.88 KB
/
Copy pathbiome.base.jsonc
File metadata and controls
117 lines (117 loc) · 3.88 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 100
},
"linter": {
"enabled": true,
"domains": {
"playwright": "all",
"project": "all",
"react": "all",
"test": "all"
},
"rules": {
"preset": "recommended",
"a11y": "on",
"correctness": {
// Biome's unresolved-import scanner false-positives on Astro, package
// export maps, and React Native tooling; type checkers own resolution.
"noUnresolvedImports": "off"
},
"performance": "on",
"security": "on",
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"patterns": [
{
"group": ["http://**", "https://**", "//**"],
"message": "Do not import browser runtime JavaScript from remote or CDN URLs; install and bundle dependencies locally."
},
{
// Import convention: './' only for same-directory siblings,
// '@/' alias for everything cross-directory. Parent-relative
// paths break when files move and hide module boundaries.
"group": ["..", "../**"],
"message": "Use the '@/' alias for cross-directory imports instead of parent-relative paths ('../')."
}
]
}
}
}
}
},
"overrides": [
{
// The sites already ship light-dark() and mask-image without fallbacks,
// so the target is Baseline newly available, not widely. An override,
// so a subrepo's `"suspicious": "on"` does not reset the option.
"includes": ["**/*.css"],
"linter": {
"rules": {
"suspicious": {
"useBaseline": { "level": "warn", "options": { "available": "newly" } }
}
}
}
},
{
// Standalone .svg assets are decorative icon sources; the component that
// renders one supplies the accessible name (title/aria-label), not the file.
"includes": ["**/*.svg"],
"linter": { "rules": { "a11y": { "noSvgWithoutTitle": "off" } } }
},
{
// Test placeholders look like secrets, describe/it blocks are long without
// being real functions, and an assertion regex matched once per run gains
// nothing from being hoisted away from the test that documents it.
"includes": ["**/e2e/**/*.ts", "**/*.test.ts"],
"linter": {
"rules": {
"complexity": { "noExcessiveLinesPerFunction": "off" },
// Playwright's locator.innerText() returns the text as rendered, which is
// what the tests assert on; textContent would include hidden nodes.
"performance": { "useDomNodeTextContent": "off", "useTopLevelRegex": "off" },
"security": { "noSecrets": "off" },
// Assertions often live in shared expect* helpers, and `if (!result.success)`
// guards narrow types after the outcome is already asserted.
"suspicious": { "noConditionalExpect": "off", "useExpect": "off" }
}
}
}
],
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all"
}
},
"html": {
// Disabled: corrupts Astro frontmatter by inserting blank lines on every format run.
"experimentalFullSupportEnabled": false
},
"json": {
"formatter": {
"trailingCommas": "none"
}
},
// rumdl (prek hook) owns Markdown style, and YAML is hand-formatted or
// tool-written (pnpm-lock.yaml, prek's frozen revs). Keep Biome to code.
"markdown": {
"formatter": { "enabled": false },
"linter": { "enabled": false }
},
"yaml": {
"formatter": { "enabled": false },
"linter": { "enabled": false }
}
}