From ea3564642c88ee8b46f13aa4ffc6994c70fecda7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 12:28:43 -0700 Subject: [PATCH] Enable prefer-const in the eslint config (#337) --- .eslintrc.yml | 1 + samples/system-test/spanner.test.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 65f1dce6c..73eeec276 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -12,3 +12,4 @@ rules: eqeqeq: error no-warning-comments: warn no-var: error + prefer-const: error diff --git a/samples/system-test/spanner.test.js b/samples/system-test/spanner.test.js index 68a6cfc1d..3891a828b 100644 --- a/samples/system-test/spanner.test.js +++ b/samples/system-test/spanner.test.js @@ -332,12 +332,12 @@ test.serial(`should create query partitions`, async t => { const [transaction] = await database.createBatchTransaction(); const identifier = JSON.stringify(transaction.identifier()); - let results = await tools.runAsyncWithIO( + const results = await tools.runAsyncWithIO( `${batchCmd} create-query-partitions ${INSTANCE_ID} ${DATABASE_ID} '${identifier}' ${PROJECT_ID}`, cwd ); - let output = results.stdout + results.stderr; + const output = results.stdout + results.stderr; t.regex(output, /Successfully created \d query partitions\./); @@ -355,12 +355,12 @@ test.serial(`should execute a partition`, async t => { const [partitions] = await transaction.createQueryPartitions(query); const partition = JSON.stringify(partitions[0]); - let results = await tools.runAsyncWithIO( + const results = await tools.runAsyncWithIO( `${batchCmd} execute-partition ${INSTANCE_ID} ${DATABASE_ID} '${identifier}' '${partition}' ${PROJECT_ID}`, cwd ); - let output = results.stdout + results.stderr; + const output = results.stdout + results.stderr; t.regex(output, /Successfully received \d from executed partition\./);