From fd94b16cf5b5709c3cdbc4e12774eb1caa4c0717 Mon Sep 17 00:00:00 2001 From: Esben Sparre Andreasen Date: Mon, 10 Aug 2020 18:42:13 +0200 Subject: [PATCH] use template strings instead of concatenations --- src/codeql.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/codeql.ts b/src/codeql.ts index e05f524bf..9a74227a5 100644 --- a/src/codeql.ts +++ b/src/codeql.ts @@ -456,22 +456,14 @@ export /* exported for testing */ function getExtraOptions( } if (!Array.isArray(options)) { const msg = - 'The extra options for `' + - pathInfo.join('.') + - '` (`' + - JSON.stringify(options) + - '`) are not in an array.'; + `The extra options for '${pathInfo.join('.')}' ('${JSON.stringify(options)}') are not in an array.`; throw new Error(msg); } return options.map(o => { const t = typeof o; if (t !== 'string' && t !== 'number' && t !== 'boolean') { const msg = - 'The extra option for `' + - pathInfo.join('.') + - '` (`' + - JSON.stringify(o) + - '`) is not a primitive value.'; + `The extra option for '${pathInfo.join('.')}' ('${JSON.stringify(o)}') is not a primitive value.`; throw new Error(msg); } return o + '';