fix: linter errors

This commit is contained in:
Xiaohan-Tian
2026-05-01 14:36:56 -07:00
parent 9be96cd957
commit cd90dc1c99
18 changed files with 90 additions and 80 deletions
+2 -4
View File
@@ -513,8 +513,7 @@ export class KGDebugger {
try {
textarea.selectionStart = textarea.selectionEnd = typed.length;
} catch {
}
} catch { /* setting cursor position can fail in read-only or special inputs */ }
textarea.scrollTop = textarea.scrollHeight;
@@ -583,8 +582,7 @@ export class KGDebugger {
try {
textarea.selectionStart = textarea.selectionEnd = typed.length;
} catch {
}
} catch { /* setting cursor position can fail in read-only or special inputs */ }
textarea.scrollTop = textarea.scrollHeight;
@@ -47,9 +47,8 @@ class MockFileHandle {
async getFile() { return { text: () => Promise.resolve(this._content) }; }
async createWritable() {
const w = new MockWritable();
const self = this;
const origClose = w.close.bind(w);
w.close = async () => { self._content = w.data; await origClose(); };
w.close = async () => { this._content = w.data; await origClose(); };
return w;
}
}
+1 -2
View File
@@ -19,10 +19,9 @@ class MockFileSystemFileHandle {
async createWritable() {
const stream = new MockFileSystemWritableFileStream();
// When stream closes, update our content
const self = this;
const origClose = stream.close.bind(stream);
stream.close = async () => {
self._content = stream.data;
this._content = stream.data;
await origClose();
};
return stream;