Repository navigation
Expand file tree
/
Copy pathbiome.jsonc
More file actions
192 lines (192 loc) · 7.07 KB
/
Copy pathbiome.jsonc
File metadata and controls
192 lines (192 loc) · 7.07 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
{
"$schema": "https://biomejs.dev/schemas/2.5.11/schema.json",
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"css": {
"parser": {
"tailwindDirectives": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always"
}
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended",
"a11y": {
"noAmbiguousAnchorText": "off",
"noNoninteractiveTabindex": "off",
"noStaticElementInteractions": "off",
"useKeyWithClickEvents": "off",
"useValidAnchor": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"suspicious": {
"noReactForwardRef": "error"
},
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"paths": {
"react": {
"importNames": ["useCallback", "useMemo", "memo"],
"message": "The highlighted React API is flagged.\nWe use the React Compiler, which automatically memoizes where needed.\nIn 99% of cases, manual memoization is unnecessary."
}
},
"patterns": [
{
"group": "react",
"importNamePattern": "useContext",
"message": "Use the `use()` hook instead."
}
]
}
}
}
}
},
"overrides": [
{
// Internal developer tooling for the static-string audit. Uses ts-morph's
// untyped node accessors, embeds `${...}` placeholder literals, and a few
// safe non-null assertions — none of which affect production code.
"includes": ["packages/app/scripts/audit-strings/**"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off",
"noTemplateCurlyInString": "off",
"noAssignInExpressions": "off",
"noShadowRestrictedNames": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"complexity": {
"noUselessSwitchCase": "off"
},
"correctness": {
"noUnusedFunctionParameters": "off"
}
}
}
},
{
// This E2E-harness tree deliberately uses post-guard non-null
// assertions (the guards live one call-frame up, where the compiler
// can't see through them) and assembles shell-command strings via `+`
// concatenation where a template literal reads no better. Test-harness
// style allowances, not production code: the assertions encode
// invariants the surrounding guards enforce, so stripping the `!` (or
// rewriting to `?.`) would change semantics. Correctness rules (e.g.
// noUnusedVariables) stay ON for this tree.
"includes": ["packages/desktop/tests/lume-qa/**"],
"linter": {
"rules": {
"style": {
"noNonNullAssertion": "off",
"useTemplate": "off"
}
}
}
},
{
// Biome 2.5 started parsing and linting standalone `.svg` files, which
// brings the JSX/HTML a11y rule set to bear on static assets. An asset
// file has no accessible name of its own: it gets one from whatever
// references it (`<img alt>`, a `role="img"` + `aria-label` wrapper, or
// `aria-hidden` when decorative), so requiring an inline `<title>` in the
// file is a category error. The nine files in scope are a favicon, docs
// page art, an app icon asset and two markdown-pipeline fixtures. The
// rule stays on for inline SVG in `.tsx`, which is where it means
// something.
"includes": ["**/*.svg"],
"linter": { "rules": { "a11y": { "noSvgWithoutTitle": "off" } } }
}
],
"files": {
"includes": [
"**",
"!**/node_modules",
"!**/dist",
// napi-rs build artifacts: a per-platform `.node` binary and the
// auto-generated CommonJS loader + d.ts. Regenerated by `napi build`,
// gitignored, and owned by the napi-rs toolchain's formatting.
"!packages/native-config/index.js",
"!packages/native-config/index.d.ts",
"!packages/native-config/target",
"!**/.ok-skill-publish-*",
"!**/.next",
"!**/.source",
// Second generated content build, emitted by the docs app's real-source
// vitest config in the Vite flavour `.source` must never hold.
"!**/.source-vitest",
"!**/.turbo",
// Generated by postinstall (scripts/create-turbo-cache-key.mjs):
// environment-specific, gitignored, and a CONTENT-HASHED
// globalDependencies entry, so this exclusion is cache integrity, not
// formatting taste: a formatter rewrite of the file would invalidate
// every task hash on every machine whose formatter version differs.
"!turbo-cache-key.json",
"!packages/app/src/locales/*/messages.json",
"!**/tmp",
"!**/test-results",
"!**/test-results-packaged",
"!**/playwright-report",
"!**/playwright-report-json",
"!**/.vitest",
"!**/next-env.d.ts",
"!.claude",
// .agents/skills, .codex/skills under public/open-knowledge/
// are real dirs of per-skill symlinks back to the repo-root canonical
// at ../../../.agents/skills/<skill>. Without these excludes biome
// traverses through the symlinks and lints files outside this subtree's
// scope (including team-skills sources whose syntax is owned by
// upstream). Skill formatting is owned by cross-harness-skills-sync.
"!.agents/skills",
"!.codex/skills",
"!.bun",
"!specs",
"!reports",
"!evidence",
"!meta",
"!docs/bun.lock",
"!worktrees",
"!**/rehype-plugins/fixtures",
"!**/tests/perf/results",
"!**/tests/perf/playwright-results",
"!packages/desktop/out",
"!packages/desktop/dist-desktop",
"!packages/desktop/electron.vite.config.*.mjs",
// Self-contained internal unit with its own tsconfig, conventions, and
// test entry points; never OK-biome-formatted, so it stays out of the
// format scan.
"!packages/md-conformance/md-audit",
// Mechanically generated artifacts: byte format is owned by their
// generators, not biome (biome would collapse arrays the generators
// emit expanded), and content correctness is enforced by dedicated
// freshness gates — the format scan adds nothing. Both paths are
// mirror-excluded.
"!packages/md-conformance/conformance-catalog.json",
"!packages/md-conformance/corpora/gfm-extensions.json"
],
// `packages/server/src/api-extension.ts` grew past biome's 1 MiB default,
// at which point biome silently stops checking it and warns instead — and
// `--error-on-warnings` turns that into a red lint job. Raised so the file
// keeps being linted. The real fix is splitting the module; this keeps the
// gate honest until then.
"maxSize": 2097152
}
}