Turned on no-useless-concat lint and fixed it in code

This commit is contained in:
BB
2022-03-16 20:43:04 +01:00
parent 3aabbb7aaa
commit 4eb59ac70c
15 changed files with 26 additions and 29 deletions
+2 -2
View File
@@ -375,7 +375,7 @@ function processNetscript1Imports(code: string, workerScript: WorkerScript): any
});
//Now we have to generate the code that would create the namespace
generatedCode += "var " + namespace + ";\n" + "(function (namespace) {\n";
generatedCode += `var ${namespace};\n(function (namespace) {\n`;
//Add the function declarations
fnDeclarations.forEach((fn: any) => {
@@ -390,7 +390,7 @@ function processNetscript1Imports(code: string, workerScript: WorkerScript): any
});
//Finish
generatedCode += "})(" + namespace + " || " + "(" + namespace + " = {}));\n";
generatedCode += `})(${namespace} || (" + namespace + " = {}));\n`;
} else {
//import {...} from script