refactor(backend): standardize errors and simplify configuration and test setup
This commit is contained in:
1 parent
1535c19b8c
commit
138666a7bb
92 files changed
+3994
-210
No files matched your search
@@ -0,0 +1,26 @@
|
||||
// Static scanner fixtures. Never execute this file.
|
||||
function dynamicCode(source: string) {
|
||||
// ruleid: frontend-no-dynamic-code
|
||||
eval(source);
|
||||
// ruleid: frontend-no-dynamic-code
|
||||
new Function(source);
|
||||
// ruleid: frontend-no-dynamic-code
|
||||
Function(source);
|
||||
// ok: frontend-no-dynamic-code
|
||||
JSON.parse(source);
|
||||
}
|
||||
|
||||
function renderText(node: HTMLElement, text: string) {
|
||||
// ruleid: frontend-no-document-write
|
||||
document.write(text);
|
||||
// ruleid: frontend-no-document-write
|
||||
document.writeln(text);
|
||||
// ruleid: frontend-no-inner-html-assignment
|
||||
node.innerHTML = text;
|
||||
// ruleid: frontend-no-inner-html-assignment
|
||||
node.innerHTML += text;
|
||||
// ok: frontend-no-inner-html-assignment, frontend-no-document-write
|
||||
node.textContent = text;
|
||||
// ok: frontend-no-inner-html-assignment
|
||||
return <span>{text}</span>;
|
||||
}
|
||||
Reference in new issue
Block a user