File .deepsource.toml
not found in the default branch of the repository root. Please refer to the docs.
353 if (type === "backtest") {
354 return "Backtest Plan";
355 } else if (type === "version") {
356 return "Create New Version:" + " " + plan.plan_name;357 } else {
358 return "Create Custom Plan:" + " " + plan.plan_name;
359 }
355 } else if (type === "version") {
356 return "Create New Version:" + " " + plan.plan_name;
357 } else {
358 return "Create Custom Plan:" + " " + plan.plan_name;359 }
360 }
361
It's unnecessary to concatenate two string literals together, such as:
let foo = "a" + "b";
This code is likely the result of refactoring where a variable was removed from the concatenation (such as "a" + b + "b"). In such a case, the concatenation isn't important and the code can be rewritten as:
let foo = "ab";
let a = `some` + `string`;
// these are the same as "10"
a = '1' + '0';
a = '1' + `0`;
a = `1` + '0';
a = `1` + `0`;
// when a non string is included
let c = a + b;
c = '1' + a;
let a = 1 + '1';
c = 1 - 2;
// when the string concatenation is multiline
c = "foo" + "bar";