Skip to content

Commit a73f100

Browse files
committed
lint &@ => native
1 parent 203ad94 commit a73f100

File tree

7 files changed

+16
-18
lines changed

7 files changed

+16
-18
lines changed

contributed/conversationalAI/views/Services.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024-2025 Moddable Tech, Inc.
2+
* Copyright (c) 2024-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -23,7 +23,7 @@ import Timeline from "piu/Timeline";
2323
import View from "Common";
2424

2525
class ServicesBehavior extends View.Behavior {
26-
onDisplaying(container) {
26+
onDisplaying(/* container */) {
2727
const view = this.view;
2828
const row = view.LIST.content(view.selection);
2929
row.last.previous.visible = true;

modules/crypt/etc/pkcs1.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2017 Moddable Tech, Inc.
2+
* Copyright (c) 2016-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -84,7 +84,7 @@ export default class PKCS1 {
8484
}
8585
return BigInt.fromArrayBuffer(OS);
8686
};
87-
static randint(max, z) {
87+
static randint(max) {
8888
var i = BigInt.fromArrayBuffer(RNG.get(BigInt.bitLength(max) >>> 3));
8989
while (i >= max)
9090
i >>>= 1;

modules/crypt/etc/pkcs8.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2021 Moddable Tech, Inc.
2+
* Copyright (c) 2016-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -128,7 +128,6 @@ export default class PKCS8 {
128128
break;
129129
default:
130130
throw new Error("PKCS8: unsupported encryption scheme: " + oid);
131-
break;
132131
}
133132
var key = pkcs12gen(pass, salt, iter.toNumber(), 16, hash, v);
134133
var enc = new cipher(key);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Encode {
2-
static toAlaw(input, output) @ "xs_alaw_encode"
2+
static toAlaw(input, output) { return native("xs_alaw_encode").call(this, input, output); }
33
}
44

55
export {Encode}

modules/network/services/chatAudioIO/workers/ChatWebSocketWorker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024-2025 Moddable Tech, Inc.
2+
* Copyright (c) 2024-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -128,7 +128,7 @@ class ChatWebSocketWorker extends ChatWorker {
128128
this.write(data, { opcode: WebSocketClient.close });
129129
this.#state = 2;
130130
}
131-
isBase64(result, current, name) {
131+
isBase64(/* result, current, name */) {
132132
debugger;
133133
}
134134
onBase64(offset, size) {

modules/network/services/chatAudioIO/workers/JSONBase64Parser.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
*
1919
*/
2020

21-
class JSONBase64Parser @ "JSONBase64Parser_destructor" {
22-
constructor(target, data, step, minimum) @ "JSONBase64Parser_constructor"
23-
read(buffer) @ "JSONBase64Parser_read"
24-
reset() @ "JSONBase64Parser_reset"
21+
class JSONBase64Parser extends Native("JSONBase64Parser_destructor") {
22+
constructor(target, data, step, minimum) { super(); native("JSONBase64Parser_constructor").call(this, target, data, step, minimum); }
23+
read(buffer) { return native("JSONBase64Parser_read").call(this, buffer); }
24+
reset() { return native("JSONBase64Parser_reset").call(this); }
2525

2626
push(current) {
2727
if (this.stack)
@@ -66,8 +66,8 @@ class JSONBase64Parser @ "JSONBase64Parser_destructor" {
6666
}
6767

6868
// separate binary data
69-
copy(data) @ "JSONBase64Parser_copy"
70-
done() @ "JSONBase64Parser_done"
69+
copy(data) { return native("JSONBase64Parser_copy").call(this, data); }
70+
done() { return native("JSONBase64Parser_done").call(this); }
7171
}
7272

7373
export default JSONBase64Parser

modules/network/services/chatAudioIO/workers/googleGeminiLive.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024-2025 Moddable Tech, Inc.
2+
* Copyright (c) 2024-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK Runtime.
55
*
@@ -136,14 +136,13 @@ class GoogleGeminiLiveModel extends ChatWebSocketWorker {
136136
this.postMessage({ id:"receiveOutputText", text:data.outputTranscription.text, more:true });
137137
}
138138
}
139-
'setupComplete'(data) {
139+
'setupComplete'(/* data */) {
140140
this.post("connected");
141141
}
142142
'toolCall'(data) {
143143
const functionCalls = data.functionCalls;
144144
if (functionCalls) {
145145
this.post("listen");
146-
const functionResponses = [];
147146
for (let functionCall of functionCalls) {
148147
this.postMessage({
149148
id:"receiveFunctionCall",

0 commit comments

Comments
 (0)