JS: Update OK-style comments to $-style

This commit is contained in:
Asger F
2025-02-06 13:34:01 +01:00
parent 7e5c24a8ec
commit 9be041e27d
536 changed files with 4408 additions and 4762 deletions

View File

@@ -1,12 +1,12 @@
function foo() {
var f;
eval("f = alert");
f("Hi"); // OK: initialised by eval
f("Hi"); // OK - initialised by eval
}
function bar() {
var g;
g(); // NOT OK, but not currently flagged
g(); // $ MISSED: Alert
eval("g = alert");
}
@@ -15,10 +15,10 @@ function baz() {
function inner(b) {
if (b) {
inner(false);
g(); // OK: initialised by eval below
g(); // OK - initialised by eval below
} else {
eval("g = alert");
}
}
inner(true);
}
}

View File

@@ -5,20 +5,20 @@ namespace f {
export function inner() {}
}
f(); // OK
f.inner(); // OK
f();
f.inner();
class C {}
namespace C {
export function inner() {}
}
new C(); // OK
C.inner(); // OK
new C();
C.inner();
namespace g {
export function inner() {}
}
g(); // NOT OK
g.inner(); // OK
g(); // $ Alert
g.inner();

View File

@@ -1,13 +1,12 @@
class A extends null {
constructor() {
// OK: calls `Function.prototype`
// OK - calls `Function.prototype`
super();
}
}
class B extends 42 {
constructor() {
// NOT OK
super();
super(); // $ Alert
}
}