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,51 +1,51 @@
"use foo"; // NOT OK
"use strict"; // NOT OK
"use foo"; // $ Alert
"use strict"; // $ Alert
function bad() {
"'use strict'"; // NOT OK
"use strict;"; // NOT OK
"'use strict';"; // NOT OK
"'use strict;'"; // NOT OK
"use-strict"; // NOT OK
"use_strict"; // NOT OK
"uses strict"; // NOT OK
"use struct;" // NOT OK
"Use Strict"; // NOT OK
"use bar"; // NOT OK
"'use strict'"; // $ Alert
"use strict;"; // $ Alert
"'use strict';"; // $ Alert
"'use strict;'"; // $ Alert
"use-strict"; // $ Alert
"use_strict"; // $ Alert
"uses strict"; // $ Alert
"use struct;" // $ Alert
"Use Strict"; // $ Alert
"use bar"; // $ Alert
}
function ignored() {
var x = 42;
"use baz"; // OK: not a directive, positionally
"use baz"; // OK - not a directive, positionally
}
function good() {
"use strict"; // OK
"use asm"; // OK
"use babel"; // OK
"use 6to5"; // OK
"format cjs" // OK
"format esm"; // OK
"format global"; // OK
"format register"; // OK
"ngInject"; // OK
"ngNoInject"; // OK
"deps foo"; // OK
"deps bar"; // OK
"use server"; // OK
"use client"; // OK
"use strict";
"use asm";
"use babel";
"use 6to5";
"format cjs"
"format esm";
"format global";
"format register";
"ngInject";
"ngNoInject";
"deps foo";
"deps bar";
"use server";
"use client";
}
function data() {
"[0, 0, 0];"; // NOT OK
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];"; // NOT OK
"[0, 0, 0];"; // $ Alert
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];"; // $ Alert
}
function yui() {
"foo:nomunge"; // OK
"bar:nomunge, baz:nomunge,qux:nomunge"; // OK
":nomunge"; // NOT OK
"foo(), bar, baz:nomunge"; // NOT OK
"foo:nomunge";
"bar:nomunge, baz:nomunge,qux:nomunge";
":nomunge"; // $ Alert
"foo(), bar, baz:nomunge"; // $ Alert
}
function babel_typeof(obj) {