mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
JS: Update OK-style comments to $-style
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user