2 title: no-useless-concat
8 It's unnecessary to concatenate two strings together, such as:
14 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:
22 This rule aims to flag the concatenation of 2 literals when they could be combined into a single literal. Literals can be strings or template literals.
24 Examples of **incorrect** code for this rule:
29 /*eslint no-useless-concat: "error"*/
32 var a = `some` + `string`;
34 // these are the same as "10"
43 Examples of **correct** code for this rule:
48 /*eslint no-useless-concat: "error"*/
50 // when a non string is included
55 // when the string concatenation is multiline
64 If you don't want to be notified about unnecessary string concatenation, you can safely disable this rule.