Skip to content

Commit 822ec2b

Browse files
authored
Let biome check more files (#1778)
* biome migrate --fix Signed-off-by: Sora Morimoto <sora@morimoto.io> * Let biome check more files Signed-off-by: Sora Morimoto <sora@morimoto.io> --------- Signed-off-by: Sora Morimoto <sora@morimoto.io>
1 parent 64f4619 commit 822ec2b

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

biome.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
33
"files": {
4-
"include": ["runtime"],
5-
"ignore": ["runtime/js/zstd.ts"]
4+
"ignore": [
5+
"benchmarks/sources/js",
6+
"compiler/tests-full",
7+
"compiler/tests-js-parser",
8+
"examples/**/*.json",
9+
"runtime/js/zstd.ts"
10+
]
611
},
712
"formatter": {
813
"enabled": true,

compiler/tests-env/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
globalThis.jsoo_env = {};
2-
globalThis.jsoo_env["JSOO_A"] = "from-global-this";
2+
globalThis.jsoo_env.JSOO_A = "from-global-this";

examples/namespace/for-node.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
function shouldRaise(f) {
22
try {
33
f();
4-
} catch (e) { console.log("OK"); return }
5-
throw new Error ("should have raised");
4+
} catch (e) {
5+
console.log("OK");
6+
return;
7+
}
8+
throw new Error("should have raised");
69
}
710
function shouldNotRaise(f) {
811
try {
912
f();
1013
console.log("OK");
11-
return
12-
} catch (e) { throw new Error ("should not have raised"); }
14+
return;
15+
} catch (e) {
16+
throw new Error("should not have raised");
17+
}
1318
}
1419

1520
// a0, a1 and b are three separate instances.
16-
var a0 = require('./a.js')(global);
17-
var a1 = require('./a.js')(global);
18-
var b = require('./b.js')(global);
21+
var a0 = require("./a.js")(global);
22+
var a1 = require("./a.js")(global);
23+
var b = require("./b.js")(global);
1924
shouldNotRaise(() => a0.tryWith(a0.raise));
2025
shouldRaise(() => a1.tryWith(a0.raise));
2126
shouldRaise(() => b.tryWith(a0.raise));
@@ -29,8 +34,8 @@ shouldRaise(() => a1.tryWith(b.raise));
2934
shouldNotRaise(() => b.tryWith(b.raise));
3035

3136
// a2 is different from a0,a1 and b
32-
var a2 = require('./a-iife.js');
33-
shouldNotRaise (() => a2.tryWith(a2.raise));
37+
var a2 = require("./a-iife.js");
38+
shouldNotRaise(() => a2.tryWith(a2.raise));
3439
shouldRaise(() => a0.tryWith(a2.raise));
3540
shouldRaise(() => a2.tryWith(a0.raise));
3641
shouldRaise(() => a1.tryWith(a2.raise));
@@ -39,9 +44,9 @@ shouldRaise(() => b.tryWith(a2.raise));
3944
shouldRaise(() => a2.tryWith(b.raise));
4045

4146
// a3 is the same as a2
42-
var a3 = require('./a-iife.js');
43-
shouldNotRaise (() => a2.tryWith(a3.raise));
44-
shouldNotRaise (() => a3.tryWith(a2.raise));
47+
var a3 = require("./a-iife.js");
48+
shouldNotRaise(() => a2.tryWith(a3.raise));
49+
shouldNotRaise(() => a3.tryWith(a2.raise));
4550
shouldRaise(() => a0.tryWith(a3.raise));
4651
shouldRaise(() => a3.tryWith(a0.raise));
4752
shouldRaise(() => a1.tryWith(a3.raise));

toplevel/examples/lwt_toplevel/test_lib/stubs.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
//Requires: caml_string_of_jsbytes
33
//Requires: caml_ml_output
44
//Requires: caml_ml_string_length
5-
function test_lib_jsoo_a (unit) {
5+
function test_lib_jsoo_a(unit) {
66
var s = caml_string_of_jsbytes("test_lib_jsoo_a: ok\n");
77
caml_ml_output(2, s, 0, caml_ml_string_length(s));
8-
return 42
8+
return 42;
99
}
10-
11-

0 commit comments

Comments
 (0)