Skip to content

Commit 54f5f64

Browse files
committed
lint
1 parent 1f065f1 commit 54f5f64

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

examples/js/aborthook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ Promise.reject(new Error("exception from promise"));
6464

6565
throw new Error("exception from module top level");
6666

67-
trace("will never reach here\n");
67+
// trace("will never reach here\n");

examples/js/xs-in-c/rectangle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2025 Moddable Tech, Inc.
2+
* Copyright (c) 2016-2026 Moddable Tech, Inc.
33
*
44
* This file is part of the Moddable SDK.
55
*
@@ -25,7 +25,7 @@ class Rectangle extends Native("xs_rectangle_destructor") {
2525
set h(it) { native("xs_rectangle_set_h").call(this, it); }
2626

2727
contains(x, y) { return native("xs_rectangle_contains").call(this, x, y); }
28-
union(r) { native("xs_rectangle_union").call(this, r); }
28+
union(...r) { native("xs_rectangle_union").call(this, ...r); }
2929
};
3030

3131
export default Rectangle;

modules/data/crc/crc.js

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

21-
22-
class CRC8 @ "xs_crc8_destructor" {
23-
constructor(polynomial, initial, reflectInput, reflectOutput, xorOutput) @ "xs_crc8";
24-
close() @ "xs_crc8_close";
25-
checksum(buffer) @ "xs_crc8_checksum";
26-
reset() @ "xs_crc8_reset";
21+
class CRC8 extends Native("xs_crc8_destructor") {
22+
constructor(polynomial, initial, reflectInput, reflectOutput, xorOutput) { super(); native("xs_crc8").call(this, polynomial, initial, reflectInput, reflectOutput, xorOutput); };
23+
close() { return native("xs_crc8_close").call(this); };
24+
checksum(buffer) { return native("xs_crc8_checksum").call(this, buffer); };
25+
reset() { return native("xs_crc8_reset").call(this); };
2726
}
2827

29-
class CRC16 @ "xs_crc16_destructor" {
30-
constructor(polynomial, initial, reflectInput, reflectOutput, xorOutput) @ "xs_crc16";
31-
close() @ "xs_crc16_close";
32-
checksum(buffer) @ "xs_crc16_checksum";
33-
reset() @ "xs_crc16_reset";
28+
class CRC16 extends Native("xs_crc16_destructor") {
29+
constructor(polynomial, initial, reflectInput, reflectOutput, xorOutput) { super(); native("xs_crc16").call(this, polynomial, initial, reflectInput, reflectOutput, xorOutput); };
30+
close() { return native("xs_crc16_close").call(this); };
31+
checksum(buffer) { return native("xs_crc16_checksum").call(this, buffer); };
32+
reset() { return native("xs_crc16_reset").call(this); };
3433
}
3534

3635
export { CRC8 as default, CRC8, CRC16 };

modules/files/resourceiterator/ResourceIterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import Resource from "Resource";
2222

23-
function index(i) @ "Resource_index";
23+
function index(i) { return native("Resource_index").call(this, i); };
2424

2525
Resource[Symbol.iterator] = function() {
2626
return {

tools/mcmanifest.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,6 +1723,7 @@ export class TSConfigFile extends FILE {
17231723
noEmit: true,
17241724
strict: true,
17251725
noImplicitAny: false,
1726+
noImplicitThis: false,
17261727
strictNullChecks: false
17271728
}
17281729
}
@@ -1745,7 +1746,8 @@ export class TSConfigFile extends FILE {
17451746
const MODDABLE = tool.environment.MODDABLE;
17461747
const modules = MODDABLE + tool.slash + "modules" + tool.slash;
17471748
const build = MODDABLE + tool.slash + "build" + tool.slash;
1748-
return sources.filter(item => !item.source.startsWith(modules) && !item.source.startsWith(build));
1749+
const node = tool.slash + "node_modules" + tool.slash;
1750+
return sources.filter(item => !item.source.startsWith(modules) && !item.source.startsWith(build) && !item.source.includes(node));
17491751
}
17501752
}
17511753

0 commit comments

Comments
 (0)