Skip to content

Commit fd94b16

Browse files
committed
use template strings instead of concatenations
1 parent 288f49e commit fd94b16

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/codeql.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -456,22 +456,14 @@ export /* exported for testing */ function getExtraOptions(
456456
}
457457
if (!Array.isArray(options)) {
458458
const msg =
459-
'The extra options for `' +
460-
pathInfo.join('.') +
461-
'` (`' +
462-
JSON.stringify(options) +
463-
'`) are not in an array.';
459+
`The extra options for '${pathInfo.join('.')}' ('${JSON.stringify(options)}') are not in an array.`;
464460
throw new Error(msg);
465461
}
466462
return options.map(o => {
467463
const t = typeof o;
468464
if (t !== 'string' && t !== 'number' && t !== 'boolean') {
469465
const msg =
470-
'The extra option for `' +
471-
pathInfo.join('.') +
472-
'` (`' +
473-
JSON.stringify(o) +
474-
'`) is not a primitive value.';
466+
`The extra option for '${pathInfo.join('.')}' ('${JSON.stringify(o)}') is not a primitive value.`;
475467
throw new Error(msg);
476468
}
477469
return o + '';

0 commit comments

Comments
 (0)