-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbiome-errors.txt
More file actions
224 lines (154 loc) · 9.54 KB
/
biome-errors.txt
File metadata and controls
224 lines (154 loc) · 9.54 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
packages/surface/lint/core.ts:49:45 lint/suspicious/noNonNullAssertedOptionalChain ━━━━━━━━━━━━━━━━━━
× Forbidden non-null assertion after optional chaining.
47 │ function hasDirectText(el: HTMLElement): boolean {
48 │ return Array.from(el.childNodes).some(
> 49 │ (n) => n.nodeType === Node.TEXT_NODE && n.textContent?.trim().length! > 0,
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 │ );
51 │ }
i Optional chaining already handles nullish values. Using non-null assertion defeats its purpose and may cause runtime errors.
i Consider using the nullish coalescing operator `??` or optional chaining throughout the chain instead.
src/docs-viewer/DocsViewer.tsx:129:7 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━
× loadContent changes on every re-render and should not be used as a hook dependency.
127 │ }
128 │ // eslint-disable-next-line react-hooks/exhaustive-deps
> 129 │ }, [loadContent]);
│ ^^^^^^^^^^^
130 │
131 │ // Sync hash → state on browser back/forward (popstate only)
i To fix this, wrap the definition of loadContent in its own useCallback() hook.
src/docs-viewer/DocsViewer.tsx:148:7 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━
× loadContent changes on every re-render and should not be used as a hook dependency.
146 │ return () => window.removeEventListener("popstate", onPopState);
147 │ // eslint-disable-next-line react-hooks/exhaustive-deps
> 148 │ }, [loadContent]);
│ ^^^^^^^^^^^
149 │
150 │ // Auto-select first file when tree changes and no active path
i To fix this, wrap the definition of loadContent in its own useCallback() hook.
src/docs-viewer/DocsViewer.tsx:159:29 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━
× handleSelect changes on every re-render and should not be used as a hook dependency.
157 │ }
158 │ // eslint-disable-next-line react-hooks/exhaustive-deps
> 159 │ }, [allFiles, activePath, handleSelect]);
│ ^^^^^^^^^^^^
160 │
161 │ // --- Folder open / close ---
i To fix this, wrap the definition of handleSelect in its own useCallback() hook.
src/os/3-commands/field/field.ts:147:44 lint/suspicious/noNonNullAssertedOptionalChain ━━━━━━━━━━━━━━
× Forbidden non-null assertion after optional chaining.
145 │ }
146 │ if (fieldEntry?.config.onCancel) {
> 147 │ queueMicrotask(() => kernel.dispatch(fieldEntry?.config.onCancel!));
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148 │ }
149 │
i Optional chaining already handles nullish values. Using non-null assertion defeats its purpose and may cause runtime errors.
i Consider using the nullish coalescing operator `??` or optional chaining throughout the chain instead.
src/os/6-components/field/Field.tsx:190:5 lint/correctness/useExhaustiveDependencies FIXABLE ━━━━━━━━━━
× This hook does not specify its dependency on schema.
189 │ // --- Registry Registration ---
> 190 │ useEffect(() => {
│ ^^^^^^^^^
191 │ if (!name) return;
192 │
i This dependency is being used here, but is not specified in the hook dependency list.
200 │ ? { onCommit: onCommitRef.current }
201 │ : {}),
> 202 │ ...(schema !== undefined ? { schema } : {}),
│ ^^^^^^
203 │ ...(onCancelRef.current !== undefined
204 │ ? { onCancel: onCancelRef.current }
i This dependency is being used here, but is not specified in the hook dependency list.
200 │ ? { onCommit: onCommitRef.current }
201 │ : {}),
> 202 │ ...(schema !== undefined ? { schema } : {}),
│ ^^^^^^
203 │ ...(onCancelRef.current !== undefined
204 │ ? { onCancel: onCancelRef.current }
i React relies on hook dependencies to determine when to re-compute Effects.
Failing to specify dependencies can result in Effects not updating correctly when state changes.
These "stale closures" are a common source of surprising bugs.
i Unsafe fix: Add the missing dependency to the list.
210 │ ····},·[name,·mode,·multiline,·trigger,·resetOnSubmit,·schema]);·//·Re-register·on·config·change
│ ++++++++
src/os/6-components/field/Field.tsx:323:5 lint/correctness/useExhaustiveDependencies FIXABLE ━━━━━━━━━━
× This hook does not specify its dependency on handleCommit.
321 │ // Field only handles commit triggers (command stream).
322 │
> 323 │ useEffect(() => {
│ ^^^^^^^^^
324 │ const el = innerRef.current;
325 │ if (!el) return;
i This dependency is being used here, but is not specified in the hook dependency list.
348 │ e.stopPropagation();
349 │ if (trigger === "enter") {
> 350 │ handleCommit(FieldRegistry.getValue(fieldId));
│ ^^^^^^^^^^^^
351 │ }
352 │ }
i This dependency is being used here, but is not specified in the hook dependency list.
335 │ // Trigger: Blur
336 │ if (trigger === "blur") {
> 337 │ handleCommit(FieldRegistry.getValue(fieldId));
│ ^^^^^^^^^^^^
338 │ }
339 │ };
i This dependency is being used here, but is not specified in the hook dependency list.
328 │ // Trigger: change → commit on every keystroke
329 │ if (trigger === "change") {
> 330 │ handleCommit(FieldRegistry.getValue(fieldId));
│ ^^^^^^^^^^^^
331 │ }
332 │ };
i React relies on hook dependencies to determine when to re-compute Effects.
Failing to specify dependencies can result in Effects not updating correctly when state changes.
These "stale closures" are a common source of surprising bugs.
i Unsafe fix: Add the missing dependency to the list.
364 │ ····},·[fieldId,·trigger,·resetOnSubmit,·handleCommit]);·//·Re-bind·if·config·changes
│ ++++++++++++++
src/os/6-components/field/Field.tsx:323:5 lint/correctness/useExhaustiveDependencies FIXABLE ━━━━━━━━━━
× This hook specifies more dependencies than necessary: resetOnSubmit.
321 │ // Field only handles commit triggers (command stream).
322 │
> 323 │ useEffect(() => {
│ ^^^^^^^^^
324 │ const el = innerRef.current;
325 │ if (!el) return;
i Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
362 │ el.removeEventListener("keydown", handleKeyDown);
363 │ };
> 364 │ }, [fieldId, trigger, resetOnSubmit]); // Re-bind if config changes
│ ^^^^^^^^^^^^^
365 │
366 │ useFieldFocus({
i React relies on hook dependencies to determine when to re-compute Effects.
Specifying more dependencies than required can lead to unnecessary re-rendering
and degraded performance.
i Unsafe fix: Remove the extra dependencies from the list.
364 │ ····},·[fieldId,·trigger,·resetOnSubmit]);·//·Re-bind·if·config·changes
│ ---------------
vite-plugins/component-inspector/ui/DebugManager.tsx:147:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━
×
copyElementSource changes on every re-render and should not be used as a hook dependency.
145 │ hoveredElement,
146 │ traversalHistory,
> 147 │ copyElementSource,
│ ^^^^^^^^^^^^^^^^^
148 │ ]);
149 │
i To fix this, wrap the definition of
copyElementSource in its own useCallback() hook.
vite-plugins/component-inspector/ui/DebugManager.tsx:190:57 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━
× copyElementSource changes on every re-render and should not be used as a hook dependency.
188 │ window.removeEventListener("click", handleClick, true);
189 │ };
> 190 │ }, [isInspectorActive, hoveredElement, lockedElement, copyElementSource]);
│ ^^^^^^^^^^^^^^^^^
191 │
192 │ // Toast Auto-dismiss
i To fix this, wrap the definition of copyElementSource in its own useCallback() hook.
Checked 389 files in 131ms. No fixes applied.
Found 10 errors.
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Some errors were emitted while running checks.