Requires the use of template strings instead of string concatenation.
Types: Boolean
or Object
Values:
Object
:"allExcept"
: array of quoted exceptions:"stringConcatenation"
ignores strings concatenated with other stringsVersion: ES6
"requireTemplateStrings": true
"requireTemplateStrings": { "allExcept": ["stringConcatenation"] }
function sayHi(name) {
return `How are you, ${name}?`;
}
`a ${b + c}`
`a ${a()}`
{ "allExcept": ["stringConcatenation"] }
function sayBye(name) {
return `It was good seeing you, ${name}! Let's hang out again sometime and` +
' grab some chicken and waffles.';
}
function sayHi(name) {
return 'How are you, ' + name + '?';
}
"a" + (b + c)
"a" + a()