From 77b6874227033f001a1110075e87f330f38337de Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Fri, 30 Oct 2020 03:30:08 -0400 Subject: [PATCH] chore: active no-unused-vars eslint rule (#2037) --- .eslintrc.json | 1 - cloud-sql/sqlserver/mssql/server.js | 4 ++-- functions/http/package.json | 3 +-- functions/http/test/index.test.js | 1 - healthcare/datasets/system-test/datasets.test.js | 1 - healthcare/fhir/patchFhirResource.js | 4 +--- jobs/v4/job_search_create_client_event.js | 3 +-- 7 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f8a6c809a2..b3069eb689 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,7 +6,6 @@ "rules": { "node/no-missing-require": ["off"], "node/no-unpublished-require": ["off"], - "no-unused-vars": ["off"], "node/no-deprecated-api": ["off"], "no-process-exit": ["off"] } diff --git a/cloud-sql/sqlserver/mssql/server.js b/cloud-sql/sqlserver/mssql/server.js index 1635ddbf5a..320c8abad8 100644 --- a/cloud-sql/sqlserver/mssql/server.js +++ b/cloud-sql/sqlserver/mssql/server.js @@ -124,7 +124,7 @@ app.use(async (req, res, next) => { }); // Serve the index page, showing vote tallies. -app.get('/', async (req, res, next) => { +app.get('/', async (req, res) => { try { // Get the 5 most recent votes. const recentVotesQuery = pool @@ -171,7 +171,7 @@ app.get('/', async (req, res, next) => { }); // Handle incoming vote requests and inserting them into the database. -app.post('/', async (req, res, next) => { +app.post('/', async (req, res) => { const {team} = req.body; const timestamp = new Date(); diff --git a/functions/http/package.json b/functions/http/package.json index 6ea7964390..d82aca4738 100644 --- a/functions/http/package.json +++ b/functions/http/package.json @@ -17,8 +17,7 @@ "devDependencies": { "mocha": "^8.0.0", "proxyquire": "^2.1.0", - "sinon": "^9.0.0", - "uuid": "^8.0.0" + "sinon": "^9.0.0" }, "dependencies": { "@google-cloud/storage": "^5.0.0", diff --git a/functions/http/test/index.test.js b/functions/http/test/index.test.js index 9e7e49a1da..169da88be5 100644 --- a/functions/http/test/index.test.js +++ b/functions/http/test/index.test.js @@ -17,7 +17,6 @@ const proxyquire = require('proxyquire').noCallThru(); const sinon = require('sinon'); const assert = require('assert'); -const uuid = require('uuid'); const getSample = () => { const requestPromise = sinon diff --git a/healthcare/datasets/system-test/datasets.test.js b/healthcare/datasets/system-test/datasets.test.js index 72f406739f..bf88ea4895 100644 --- a/healthcare/datasets/system-test/datasets.test.js +++ b/healthcare/datasets/system-test/datasets.test.js @@ -14,7 +14,6 @@ 'use strict'; -const path = require('path'); const assert = require('assert'); const uuid = require('uuid'); const {execSync} = require('child_process'); diff --git a/healthcare/fhir/patchFhirResource.js b/healthcare/fhir/patchFhirResource.js index 1c29000a8a..bd2b127e59 100644 --- a/healthcare/fhir/patchFhirResource.js +++ b/healthcare/fhir/patchFhirResource.js @@ -51,9 +51,7 @@ function main( requestBody: patchOptions, }; - const resource = await healthcare.projects.locations.datasets.fhirStores.fhir.patch( - request - ); + await healthcare.projects.locations.datasets.fhirStores.fhir.patch(request); console.log(`Patched ${resourceType} resource`); } diff --git a/jobs/v4/job_search_create_client_event.js b/jobs/v4/job_search_create_client_event.js index 18ed7d3551..32638c69da 100644 --- a/jobs/v4/job_search_create_client_event.js +++ b/jobs/v4/job_search_create_client_event.js @@ -55,8 +55,7 @@ function sampleCreateClientEvent(projectId, tenantId, requestId, eventId) { }; client .createClientEvent(request) - .then(responses => { - const response = responses[0]; + .then(() => { console.log('Created client event'); }) .catch(err => {