From 53837ec26f5ba3bf37da456dc95fe12132b5e2f7 Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Mon, 23 Mar 2020 18:16:19 -0700 Subject: [PATCH 1/7] client file --- templates/typescript_gapic/src/$version/$service_client.ts.njk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index c89063825..03fd06fc2 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -22,7 +22,6 @@ limitations under the License. import * as gax from 'google-gax'; import {APICallback, Callback, CallOptions, Descriptors, ClientOptions {%- if service.longRunning.length > 0 %}, LROperation{%- endif -%} -{%- if service.paging.length > 0 %}, PaginationCallback, PaginationResponse{%- endif -%} } from 'google-gax'; import * as path from 'path'; {% if (service.paging.length > 0) %} @@ -191,6 +190,7 @@ export class {{ service.name }}Client { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); {% endif %} @@ -282,6 +282,7 @@ export class {{ service.name }}Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('{{api.naming.protoPackage}}.{{ service.name }}') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).{{api.naming.protoPackage}}.{{ service.name }}, this._opts) as Promise<{[method: string]: Function}>; From 296b8929e1976bf039edbd0798d553eff8047a1d Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Mon, 23 Mar 2020 18:16:48 -0700 Subject: [PATCH 2/7] test file --- .../test/gapic-$service-$version.ts.njk | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/templates/typescript_gapic/test/gapic-$service-$version.ts.njk b/templates/typescript_gapic/test/gapic-$service-$version.ts.njk index 1005c9439..2de5790ea 100644 --- a/templates/typescript_gapic/test/gapic-$service-$version.ts.njk +++ b/templates/typescript_gapic/test/gapic-$service-$version.ts.njk @@ -21,6 +21,7 @@ limitations under the License. import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const {{ service.name.toLowerCase() }}Module = require('../src'); {% if (service.streaming.length > 0) %} import {PassThrough} from 'stream'; @@ -43,7 +44,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } @@ -194,8 +197,6 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => { client.initialize(); // Mock request {{ util.initRequestWithHeaderParam(method) }} - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.{{ method.name.toCamelCase() }} = mockSimpleGrpcMethod( request, @@ -249,8 +250,6 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => { client.initialize(); // Mock request {{ util.initRequestWithHeaderParam(method) }} - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.{{ method.name.toCamelCase() }} = mockLongRunningGrpcMethod( request, @@ -304,8 +303,6 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => { client.initialize(); // Mock request {{ util.initRequestWithHeaderParam(method) }} - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.{{ method.name.toCamelCase() }} = mockServerStreamingGrpcMethod(request, null, error); const stream = client.{{ method.name.toCamelCase() }}(request); @@ -353,8 +350,6 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => { client.initialize(); // Mock request {{ util.initRequestWithHeaderParam(method) }} - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.{{ method.name.toCamelCase() }} = mockBidiStreamingGrpcMethod(request, null, error); const stream = client.{{ method.name.toCamelCase() }}().on('data', () =>{ From ac56bdd45151fb1101aacda6d0ad7bbd2e879a8d Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Mon, 23 Mar 2020 18:18:23 -0700 Subject: [PATCH 3/7] update baseline --- .../big_query_storage_client.ts.baseline | 1 + ...apic-big_query_storage-v1beta1.ts.baseline | 13 +---- .../src/v1beta1/echo_client.ts.baseline | 4 +- .../src/v1beta1/identity_client.ts.baseline | 3 +- .../src/v1beta1/messaging_client.ts.baseline | 4 +- .../src/v1beta1/testing_client.ts.baseline | 3 +- .../test/gapic-echo-v1beta1.ts.baseline | 13 +---- .../test/gapic-identity-v1beta1.ts.baseline | 11 +--- .../test/gapic-messaging-v1beta1.ts.baseline | 25 +-------- .../test/gapic-testing-v1beta1.ts.baseline | 15 +---- .../dlp/src/v2/dlp_service_client.ts.baseline | 3 +- .../dlp/test/gapic-dlp_service-v2.ts.baseline | 55 +------------------ .../key_management_service_client.ts.baseline | 3 +- ...apic-key_management_service-v1.ts.baseline | 41 +------------- .../v2/config_service_v2_client.ts.baseline | 3 +- .../v2/logging_service_v2_client.ts.baseline | 4 +- .../v2/metrics_service_v2_client.ts.baseline | 3 +- .../gapic-config_service_v2-v2.ts.baseline | 27 +-------- .../gapic-logging_service_v2-v2.ts.baseline | 7 +-- .../gapic-metrics_service_v2-v2.ts.baseline | 11 +--- .../alert_policy_service_client.ts.baseline | 3 +- .../src/v3/group_service_client.ts.baseline | 3 +- .../src/v3/metric_service_client.ts.baseline | 3 +- ...ication_channel_service_client.ts.baseline | 3 +- ...vice_monitoring_service_client.ts.baseline | 3 +- .../uptime_check_service_client.ts.baseline | 3 +- .../gapic-alert_policy_service-v3.ts.baseline | 11 +--- .../test/gapic-group_service-v3.ts.baseline | 11 +--- .../test/gapic-metric_service-v3.ts.baseline | 13 +---- ...otification_channel_service-v3.ts.baseline | 19 +------ ...-service_monitoring_service-v3.ts.baseline | 19 +------ .../gapic-uptime_check_service-v3.ts.baseline | 11 +--- .../v1beta1/cloud_redis_client.ts.baseline | 4 +- .../gapic-cloud_redis-v1beta1.ts.baseline | 17 +----- .../src/v1beta1/echo_client.ts.baseline | 4 +- .../src/v1beta1/identity_client.ts.baseline | 3 +- .../src/v1beta1/messaging_client.ts.baseline | 4 +- .../src/v1beta1/testing_client.ts.baseline | 3 +- .../test/gapic-echo-v1beta1.ts.baseline | 13 +---- .../test/gapic-identity-v1beta1.ts.baseline | 11 +--- .../test/gapic-messaging-v1beta1.ts.baseline | 25 +-------- .../test/gapic-testing-v1beta1.ts.baseline | 15 +---- .../src/v1/text_to_speech_client.ts.baseline | 1 + .../test/gapic-text_to_speech-v1.ts.baseline | 7 +-- .../translation_service_client.ts.baseline | 4 +- ...ic-translation_service-v3beta1.ts.baseline | 17 +----- 46 files changed, 120 insertions(+), 359 deletions(-) diff --git a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline index 11b8b3e2c..4d77c66a6 100644 --- a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline +++ b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline @@ -186,6 +186,7 @@ export class BigQueryStorageClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.bigquery.storage.v1beta1.BigQueryStorage') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.cloud.bigquery.storage.v1beta1.BigQueryStorage, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/bigquery-storage/test/gapic-big_query_storage-v1beta1.ts.baseline b/baselines/bigquery-storage/test/gapic-big_query_storage-v1beta1.ts.baseline index 56dd7b589..657a12d1b 100644 --- a/baselines/bigquery-storage/test/gapic-big_query_storage-v1beta1.ts.baseline +++ b/baselines/bigquery-storage/test/gapic-big_query_storage-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const bigquerystorageModule = require('../src'); import {PassThrough} from 'stream'; @@ -41,7 +42,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -155,8 +158,6 @@ describe('v1beta1.BigQueryStorageClient', () => { request.tableReference.projectId = ''; request.tableReference = {}; request.tableReference.datasetId = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createReadSession = mockSimpleGrpcMethod( request, @@ -209,8 +210,6 @@ describe('v1beta1.BigQueryStorageClient', () => { const request: protosTypes.google.cloud.bigquery.storage.v1beta1.IBatchCreateReadSessionStreamsRequest = {}; request.session = {}; request.session.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.batchCreateReadSessionStreams = mockSimpleGrpcMethod( request, @@ -263,8 +262,6 @@ describe('v1beta1.BigQueryStorageClient', () => { const request: protosTypes.google.cloud.bigquery.storage.v1beta1.IFinalizeStreamRequest = {}; request.stream = {}; request.stream.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.finalizeStream = mockSimpleGrpcMethod( request, @@ -317,8 +314,6 @@ describe('v1beta1.BigQueryStorageClient', () => { const request: protosTypes.google.cloud.bigquery.storage.v1beta1.ISplitReadStreamRequest = {}; request.originalStream = {}; request.originalStream.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.splitReadStream = mockSimpleGrpcMethod( request, @@ -372,8 +367,6 @@ describe('v1beta1.BigQueryStorageClient', () => { request.readPosition = {}; request.readPosition.stream = {}; request.readPosition.stream.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.readRows = mockServerStreamingGrpcMethod(request, null, error); const stream = client.readRows(request); diff --git a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline index 02cbc8f8a..827f85288 100644 --- a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -185,6 +185,7 @@ export class EchoClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -238,6 +239,7 @@ export class EchoClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline index 4076a4933..f34a806ee 100644 --- a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -202,6 +202,7 @@ export class IdentityClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline index 12556a024..ab97cb064 100644 --- a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -186,6 +186,7 @@ export class MessagingClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -239,6 +240,7 @@ export class MessagingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline index 61ac23d10..fcf062cb3 100644 --- a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -205,6 +205,7 @@ export class TestingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/test/gapic-echo-v1beta1.ts.baseline b/baselines/disable-packing-test/test/gapic-echo-v1beta1.ts.baseline index ce3fc5401..76f0041c0 100644 --- a/baselines/disable-packing-test/test/gapic-echo-v1beta1.ts.baseline +++ b/baselines/disable-packing-test/test/gapic-echo-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const echoModule = require('../src'); import {PassThrough} from 'stream'; @@ -41,7 +42,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -182,8 +185,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.echo = mockSimpleGrpcMethod( request, @@ -232,8 +233,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IBlockRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.block = mockSimpleGrpcMethod( request, @@ -285,8 +284,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IWaitRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.wait = mockLongRunningGrpcMethod( request, @@ -338,8 +335,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IExpandRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.expand = mockServerStreamingGrpcMethod(request, null, error); const stream = client.expand(request); @@ -385,8 +380,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.chat = mockBidiStreamingGrpcMethod(request, null, error); const stream = client.chat().on('data', () =>{ diff --git a/baselines/disable-packing-test/test/gapic-identity-v1beta1.ts.baseline b/baselines/disable-packing-test/test/gapic-identity-v1beta1.ts.baseline index ba67b1936..a6df6a2dd 100644 --- a/baselines/disable-packing-test/test/gapic-identity-v1beta1.ts.baseline +++ b/baselines/disable-packing-test/test/gapic-identity-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const identityModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -128,8 +131,6 @@ describe('v1beta1.IdentityClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateUserRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createUser = mockSimpleGrpcMethod( request, @@ -180,8 +181,6 @@ describe('v1beta1.IdentityClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetUserRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getUser = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v1beta1.IdentityClient', () => { const request: protosTypes.google.showcase.v1beta1.IUpdateUserRequest = {}; request.user = {}; request.user.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateUser = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v1beta1.IdentityClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteUserRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteUser = mockSimpleGrpcMethod( request, diff --git a/baselines/disable-packing-test/test/gapic-messaging-v1beta1.ts.baseline b/baselines/disable-packing-test/test/gapic-messaging-v1beta1.ts.baseline index ddaf67fce..dacb2ddaf 100644 --- a/baselines/disable-packing-test/test/gapic-messaging-v1beta1.ts.baseline +++ b/baselines/disable-packing-test/test/gapic-messaging-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const messagingModule = require('../src'); import {PassThrough} from 'stream'; @@ -41,7 +42,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -182,8 +185,6 @@ describe('v1beta1.MessagingClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateRoomRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createRoom = mockSimpleGrpcMethod( request, @@ -234,8 +235,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetRoomRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getRoom = mockSimpleGrpcMethod( request, @@ -288,8 +287,6 @@ describe('v1beta1.MessagingClient', () => { const request: protosTypes.google.showcase.v1beta1.IUpdateRoomRequest = {}; request.room = {}; request.room.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateRoom = mockSimpleGrpcMethod( request, @@ -340,8 +337,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteRoomRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteRoom = mockSimpleGrpcMethod( request, @@ -392,8 +387,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateBlurbRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createBlurb = mockSimpleGrpcMethod( request, @@ -444,8 +437,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetBlurbRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getBlurb = mockSimpleGrpcMethod( request, @@ -498,8 +489,6 @@ describe('v1beta1.MessagingClient', () => { const request: protosTypes.google.showcase.v1beta1.IUpdateBlurbRequest = {}; request.blurb = {}; request.blurb.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateBlurb = mockSimpleGrpcMethod( request, @@ -550,8 +539,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteBlurbRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteBlurb = mockSimpleGrpcMethod( request, @@ -605,8 +592,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.ISearchBlurbsRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.searchBlurbs = mockLongRunningGrpcMethod( request, @@ -660,8 +645,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IStreamBlurbsRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.streamBlurbs = mockServerStreamingGrpcMethod(request, null, error); const stream = client.streamBlurbs(request); @@ -707,8 +690,6 @@ describe('v1beta1.MessagingClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IConnectRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.connect = mockBidiStreamingGrpcMethod(request, null, error); const stream = client.connect().on('data', () =>{ diff --git a/baselines/disable-packing-test/test/gapic-testing-v1beta1.ts.baseline b/baselines/disable-packing-test/test/gapic-testing-v1beta1.ts.baseline index 93ef93e30..816b708e0 100644 --- a/baselines/disable-packing-test/test/gapic-testing-v1beta1.ts.baseline +++ b/baselines/disable-packing-test/test/gapic-testing-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const testingModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -128,8 +131,6 @@ describe('v1beta1.TestingClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateSessionRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createSession = mockSimpleGrpcMethod( request, @@ -180,8 +181,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetSessionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getSession = mockSimpleGrpcMethod( request, @@ -232,8 +231,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteSessionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteSession = mockSimpleGrpcMethod( request, @@ -284,8 +281,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IReportSessionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.reportSession = mockSimpleGrpcMethod( request, @@ -336,8 +331,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteTestRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteTest = mockSimpleGrpcMethod( request, @@ -388,8 +381,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IVerifyTestRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.verifyTest = mockSimpleGrpcMethod( request, diff --git a/baselines/dlp/src/v2/dlp_service_client.ts.baseline b/baselines/dlp/src/v2/dlp_service_client.ts.baseline index 2324e918e..666274e2a 100644 --- a/baselines/dlp/src/v2/dlp_service_client.ts.baseline +++ b/baselines/dlp/src/v2/dlp_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -227,6 +227,7 @@ export class DlpServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.privacy.dlp.v2.DlpService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.privacy.dlp.v2.DlpService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/dlp/test/gapic-dlp_service-v2.ts.baseline b/baselines/dlp/test/gapic-dlp_service-v2.ts.baseline index a455daeb9..23816122f 100644 --- a/baselines/dlp/test/gapic-dlp_service-v2.ts.baseline +++ b/baselines/dlp/test/gapic-dlp_service-v2.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const dlpserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IInspectContentRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.inspectContent = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IRedactImageRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.redactImage = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IDeidentifyContentRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deidentifyContent = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IReidentifyContentRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.reidentifyContent = mockSimpleGrpcMethod( request, @@ -336,8 +331,6 @@ describe('v2.DlpServiceClient', () => { client.initialize(); // Mock request const request: protosTypes.google.privacy.dlp.v2.IListInfoTypesRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.listInfoTypes = mockSimpleGrpcMethod( request, @@ -388,8 +381,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.ICreateInspectTemplateRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createInspectTemplate = mockSimpleGrpcMethod( request, @@ -440,8 +431,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IUpdateInspectTemplateRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateInspectTemplate = mockSimpleGrpcMethod( request, @@ -492,8 +481,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IGetInspectTemplateRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getInspectTemplate = mockSimpleGrpcMethod( request, @@ -544,8 +531,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IDeleteInspectTemplateRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteInspectTemplate = mockSimpleGrpcMethod( request, @@ -596,8 +581,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createDeidentifyTemplate = mockSimpleGrpcMethod( request, @@ -648,8 +631,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateDeidentifyTemplate = mockSimpleGrpcMethod( request, @@ -700,8 +681,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getDeidentifyTemplate = mockSimpleGrpcMethod( request, @@ -752,8 +731,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteDeidentifyTemplate = mockSimpleGrpcMethod( request, @@ -804,8 +781,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.ICreateJobTriggerRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createJobTrigger = mockSimpleGrpcMethod( request, @@ -856,8 +831,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IUpdateJobTriggerRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateJobTrigger = mockSimpleGrpcMethod( request, @@ -908,8 +881,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IGetJobTriggerRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getJobTrigger = mockSimpleGrpcMethod( request, @@ -960,8 +931,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IDeleteJobTriggerRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteJobTrigger = mockSimpleGrpcMethod( request, @@ -1012,8 +981,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IActivateJobTriggerRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.activateJobTrigger = mockSimpleGrpcMethod( request, @@ -1064,8 +1031,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.ICreateDlpJobRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createDlpJob = mockSimpleGrpcMethod( request, @@ -1116,8 +1081,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IGetDlpJobRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getDlpJob = mockSimpleGrpcMethod( request, @@ -1168,8 +1131,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IDeleteDlpJobRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteDlpJob = mockSimpleGrpcMethod( request, @@ -1220,8 +1181,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.ICancelDlpJobRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.cancelDlpJob = mockSimpleGrpcMethod( request, @@ -1272,8 +1231,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createStoredInfoType = mockSimpleGrpcMethod( request, @@ -1324,8 +1281,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateStoredInfoType = mockSimpleGrpcMethod( request, @@ -1376,8 +1331,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IGetStoredInfoTypeRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getStoredInfoType = mockSimpleGrpcMethod( request, @@ -1428,8 +1381,6 @@ describe('v2.DlpServiceClient', () => { // Mock request const request: protosTypes.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteStoredInfoType = mockSimpleGrpcMethod( request, diff --git a/baselines/kms/src/v1/key_management_service_client.ts.baseline b/baselines/kms/src/v1/key_management_service_client.ts.baseline index 55f178fc4..7afe04f0e 100644 --- a/baselines/kms/src/v1/key_management_service_client.ts.baseline +++ b/baselines/kms/src/v1/key_management_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -190,6 +190,7 @@ export class KeyManagementServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.kms.v1.KeyManagementService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.cloud.kms.v1.KeyManagementService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/kms/test/gapic-key_management_service-v1.ts.baseline b/baselines/kms/test/gapic-key_management_service-v1.ts.baseline index 5f8694235..462647366 100644 --- a/baselines/kms/test/gapic-key_management_service-v1.ts.baseline +++ b/baselines/kms/test/gapic-key_management_service-v1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const keymanagementserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IGetKeyRingRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getKeyRing = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IGetCryptoKeyRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getCryptoKey = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IGetCryptoKeyVersionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getCryptoKeyVersion = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IGetPublicKeyRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getPublicKey = mockSimpleGrpcMethod( request, @@ -338,8 +333,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IGetImportJobRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getImportJob = mockSimpleGrpcMethod( request, @@ -390,8 +383,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.ICreateKeyRingRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createKeyRing = mockSimpleGrpcMethod( request, @@ -442,8 +433,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.ICreateCryptoKeyRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createCryptoKey = mockSimpleGrpcMethod( request, @@ -494,8 +483,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.ICreateCryptoKeyVersionRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createCryptoKeyVersion = mockSimpleGrpcMethod( request, @@ -546,8 +533,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IImportCryptoKeyVersionRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.importCryptoKeyVersion = mockSimpleGrpcMethod( request, @@ -598,8 +583,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.ICreateImportJobRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createImportJob = mockSimpleGrpcMethod( request, @@ -652,8 +635,6 @@ describe('v1.KeyManagementServiceClient', () => { const request: protosTypes.google.cloud.kms.v1.IUpdateCryptoKeyRequest = {}; request.cryptoKey = {}; request.cryptoKey.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateCryptoKey = mockSimpleGrpcMethod( request, @@ -706,8 +687,6 @@ describe('v1.KeyManagementServiceClient', () => { const request: protosTypes.google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest = {}; request.cryptoKeyVersion = {}; request.cryptoKeyVersion.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateCryptoKeyVersion = mockSimpleGrpcMethod( request, @@ -758,8 +737,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IEncryptRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.encrypt = mockSimpleGrpcMethod( request, @@ -810,8 +787,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IDecryptRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.decrypt = mockSimpleGrpcMethod( request, @@ -862,8 +837,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IAsymmetricSignRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.asymmetricSign = mockSimpleGrpcMethod( request, @@ -914,8 +887,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IAsymmetricDecryptRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.asymmetricDecrypt = mockSimpleGrpcMethod( request, @@ -966,8 +937,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateCryptoKeyPrimaryVersion = mockSimpleGrpcMethod( request, @@ -1018,8 +987,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.destroyCryptoKeyVersion = mockSimpleGrpcMethod( request, @@ -1070,8 +1037,6 @@ describe('v1.KeyManagementServiceClient', () => { // Mock request const request: protosTypes.google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.restoreCryptoKeyVersion = mockSimpleGrpcMethod( request, diff --git a/baselines/logging/src/v2/config_service_v2_client.ts.baseline b/baselines/logging/src/v2/config_service_v2_client.ts.baseline index 2b568daac..49b4a5c77 100644 --- a/baselines/logging/src/v2/config_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/config_service_v2_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -254,6 +254,7 @@ export class ConfigServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.ConfigServiceV2') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.logging.v2.ConfigServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline index 1e892e035..8f5b03301 100644 --- a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -221,6 +221,7 @@ export class LoggingServiceV2Client { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -273,6 +274,7 @@ export class LoggingServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.LoggingServiceV2') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.logging.v2.LoggingServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline index f6dc144d4..6abdbba80 100644 --- a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -247,6 +247,7 @@ export class MetricsServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.MetricsServiceV2') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/test/gapic-config_service_v2-v2.ts.baseline b/baselines/logging/test/gapic-config_service_v2-v2.ts.baseline index ddd3f1692..940aa94ac 100644 --- a/baselines/logging/test/gapic-config_service_v2-v2.ts.baseline +++ b/baselines/logging/test/gapic-config_service_v2-v2.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const configservicev2Module = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IGetBucketRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getBucket = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IUpdateBucketRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateBucket = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IGetSinkRequest = {}; request.sinkName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getSink = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.ICreateSinkRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createSink = mockSimpleGrpcMethod( request, @@ -338,8 +333,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IUpdateSinkRequest = {}; request.sinkName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateSink = mockSimpleGrpcMethod( request, @@ -390,8 +383,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IDeleteSinkRequest = {}; request.sinkName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteSink = mockSimpleGrpcMethod( request, @@ -442,8 +433,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IGetExclusionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getExclusion = mockSimpleGrpcMethod( request, @@ -494,8 +483,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.ICreateExclusionRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createExclusion = mockSimpleGrpcMethod( request, @@ -546,8 +533,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IUpdateExclusionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateExclusion = mockSimpleGrpcMethod( request, @@ -598,8 +583,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IDeleteExclusionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteExclusion = mockSimpleGrpcMethod( request, @@ -650,8 +633,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IGetCmekSettingsRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getCmekSettings = mockSimpleGrpcMethod( request, @@ -702,8 +683,6 @@ describe('v2.ConfigServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IUpdateCmekSettingsRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateCmekSettings = mockSimpleGrpcMethod( request, diff --git a/baselines/logging/test/gapic-logging_service_v2-v2.ts.baseline b/baselines/logging/test/gapic-logging_service_v2-v2.ts.baseline index 7e8aa388e..7f0721646 100644 --- a/baselines/logging/test/gapic-logging_service_v2-v2.ts.baseline +++ b/baselines/logging/test/gapic-logging_service_v2-v2.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const loggingservicev2Module = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v2.LoggingServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IDeleteLogRequest = {}; request.logName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteLog = mockSimpleGrpcMethod( request, @@ -180,8 +181,6 @@ describe('v2.LoggingServiceV2Client', () => { client.initialize(); // Mock request const request: protosTypes.google.logging.v2.IWriteLogEntriesRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.writeLogEntries = mockSimpleGrpcMethod( request, diff --git a/baselines/logging/test/gapic-metrics_service_v2-v2.ts.baseline b/baselines/logging/test/gapic-metrics_service_v2-v2.ts.baseline index 2770246ca..37f4bb849 100644 --- a/baselines/logging/test/gapic-metrics_service_v2-v2.ts.baseline +++ b/baselines/logging/test/gapic-metrics_service_v2-v2.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const metricsservicev2Module = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v2.MetricsServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IGetLogMetricRequest = {}; request.metricName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getLogMetric = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v2.MetricsServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.ICreateLogMetricRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createLogMetric = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v2.MetricsServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IUpdateLogMetricRequest = {}; request.metricName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateLogMetric = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v2.MetricsServiceV2Client', () => { // Mock request const request: protosTypes.google.logging.v2.IDeleteLogMetricRequest = {}; request.metricName = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteLogMetric = mockSimpleGrpcMethod( request, diff --git a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline index 147aedfc1..75fda55d4 100644 --- a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -261,6 +261,7 @@ export class AlertPolicyServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.AlertPolicyService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.monitoring.v3.AlertPolicyService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/group_service_client.ts.baseline b/baselines/monitoring/src/v3/group_service_client.ts.baseline index 1db029373..6ad0a0035 100644 --- a/baselines/monitoring/src/v3/group_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/group_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -266,6 +266,7 @@ export class GroupServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.GroupService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.monitoring.v3.GroupService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/metric_service_client.ts.baseline b/baselines/monitoring/src/v3/metric_service_client.ts.baseline index c2d6d7b43..4bf8c47e3 100644 --- a/baselines/monitoring/src/v3/metric_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/metric_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -276,6 +276,7 @@ export class MetricServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.MetricService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.monitoring.v3.MetricService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline index bfda02fdd..87b4da8fe 100644 --- a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -256,6 +256,7 @@ export class NotificationChannelServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.NotificationChannelService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.monitoring.v3.NotificationChannelService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline index 180ea530b..b138e064f 100644 --- a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -258,6 +258,7 @@ export class ServiceMonitoringServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.ServiceMonitoringService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.monitoring.v3.ServiceMonitoringService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline index 5bb974ac4..6d906a11f 100644 --- a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -262,6 +262,7 @@ export class UptimeCheckServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.UptimeCheckService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.monitoring.v3.UptimeCheckService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/test/gapic-alert_policy_service-v3.ts.baseline b/baselines/monitoring/test/gapic-alert_policy_service-v3.ts.baseline index bd8eed414..cd1e5d7f1 100644 --- a/baselines/monitoring/test/gapic-alert_policy_service-v3.ts.baseline +++ b/baselines/monitoring/test/gapic-alert_policy_service-v3.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const alertpolicyserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v3.AlertPolicyServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v3.AlertPolicyServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v3.AlertPolicyServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( request, @@ -288,8 +285,6 @@ describe('v3.AlertPolicyServiceClient', () => { const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; request.alertPolicy = {}; request.alertPolicy.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( request, diff --git a/baselines/monitoring/test/gapic-group_service-v3.ts.baseline b/baselines/monitoring/test/gapic-group_service-v3.ts.baseline index d32909cca..2ba00231e 100644 --- a/baselines/monitoring/test/gapic-group_service-v3.ts.baseline +++ b/baselines/monitoring/test/gapic-group_service-v3.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const groupserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v3.GroupServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getGroup = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v3.GroupServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createGroup = mockSimpleGrpcMethod( request, @@ -236,8 +235,6 @@ describe('v3.GroupServiceClient', () => { const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; request.group = {}; request.group.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( request, @@ -288,8 +285,6 @@ describe('v3.GroupServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( request, diff --git a/baselines/monitoring/test/gapic-metric_service-v3.ts.baseline b/baselines/monitoring/test/gapic-metric_service-v3.ts.baseline index 7fa2ba9a9..4a23fb50a 100644 --- a/baselines/monitoring/test/gapic-metric_service-v3.ts.baseline +++ b/baselines/monitoring/test/gapic-metric_service-v3.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const metricserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v3.MetricServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v3.MetricServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v3.MetricServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v3.MetricServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( request, @@ -338,8 +333,6 @@ describe('v3.MetricServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( request, diff --git a/baselines/monitoring/test/gapic-notification_channel_service-v3.ts.baseline b/baselines/monitoring/test/gapic-notification_channel_service-v3.ts.baseline index 150651dc9..b54e2c95d 100644 --- a/baselines/monitoring/test/gapic-notification_channel_service-v3.ts.baseline +++ b/baselines/monitoring/test/gapic-notification_channel_service-v3.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const notificationchannelserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( request, @@ -288,8 +285,6 @@ describe('v3.NotificationChannelServiceClient', () => { const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; request.notificationChannel = {}; request.notificationChannel.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( request, @@ -340,8 +335,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( request, @@ -392,8 +385,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( request, @@ -444,8 +435,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( request, @@ -496,8 +485,6 @@ describe('v3.NotificationChannelServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( request, diff --git a/baselines/monitoring/test/gapic-service_monitoring_service-v3.ts.baseline b/baselines/monitoring/test/gapic-service_monitoring_service-v3.ts.baseline index 8c168342d..3254a6491 100644 --- a/baselines/monitoring/test/gapic-service_monitoring_service-v3.ts.baseline +++ b/baselines/monitoring/test/gapic-service_monitoring_service-v3.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const servicemonitoringserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createService = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getService = mockSimpleGrpcMethod( request, @@ -236,8 +235,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; request.service = {}; request.service.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateService = mockSimpleGrpcMethod( request, @@ -288,8 +285,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteService = mockSimpleGrpcMethod( request, @@ -340,8 +335,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( request, @@ -392,8 +385,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( request, @@ -446,8 +437,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; request.serviceLevelObjective = {}; request.serviceLevelObjective.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( request, @@ -498,8 +487,6 @@ describe('v3.ServiceMonitoringServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( request, diff --git a/baselines/monitoring/test/gapic-uptime_check_service-v3.ts.baseline b/baselines/monitoring/test/gapic-uptime_check_service-v3.ts.baseline index 9fc4b91f3..15bcaaa0b 100644 --- a/baselines/monitoring/test/gapic-uptime_check_service-v3.ts.baseline +++ b/baselines/monitoring/test/gapic-uptime_check_service-v3.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const uptimecheckserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -130,8 +133,6 @@ describe('v3.UptimeCheckServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( request, @@ -182,8 +183,6 @@ describe('v3.UptimeCheckServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( request, @@ -236,8 +235,6 @@ describe('v3.UptimeCheckServiceClient', () => { const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; request.uptimeCheckConfig = {}; request.uptimeCheckConfig.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( request, @@ -288,8 +285,6 @@ describe('v3.UptimeCheckServiceClient', () => { // Mock request const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( request, diff --git a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline index da2a16102..8e036646a 100644 --- a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline +++ b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -172,6 +172,7 @@ export class CloudRedisClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -265,6 +266,7 @@ export class CloudRedisClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.redis.v1beta1.CloudRedis') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.cloud.redis.v1beta1.CloudRedis, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/redis/test/gapic-cloud_redis-v1beta1.ts.baseline b/baselines/redis/test/gapic-cloud_redis-v1beta1.ts.baseline index 905ce4fc1..31efacd36 100644 --- a/baselines/redis/test/gapic-cloud_redis-v1beta1.ts.baseline +++ b/baselines/redis/test/gapic-cloud_redis-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const cloudredisModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -148,8 +151,6 @@ describe('v1beta1.CloudRedisClient', () => { // Mock request const request: protosTypes.google.cloud.redis.v1beta1.IGetInstanceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getInstance = mockSimpleGrpcMethod( request, @@ -203,8 +204,6 @@ describe('v1beta1.CloudRedisClient', () => { // Mock request const request: protosTypes.google.cloud.redis.v1beta1.ICreateInstanceRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createInstance = mockLongRunningGrpcMethod( request, @@ -264,8 +263,6 @@ describe('v1beta1.CloudRedisClient', () => { const request: protosTypes.google.cloud.redis.v1beta1.IUpdateInstanceRequest = {}; request.instance = {}; request.instance.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateInstance = mockLongRunningGrpcMethod( request, @@ -323,8 +320,6 @@ describe('v1beta1.CloudRedisClient', () => { // Mock request const request: protosTypes.google.cloud.redis.v1beta1.IImportInstanceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.importInstance = mockLongRunningGrpcMethod( request, @@ -382,8 +377,6 @@ describe('v1beta1.CloudRedisClient', () => { // Mock request const request: protosTypes.google.cloud.redis.v1beta1.IExportInstanceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.exportInstance = mockLongRunningGrpcMethod( request, @@ -441,8 +434,6 @@ describe('v1beta1.CloudRedisClient', () => { // Mock request const request: protosTypes.google.cloud.redis.v1beta1.IFailoverInstanceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.failoverInstance = mockLongRunningGrpcMethod( request, @@ -500,8 +491,6 @@ describe('v1beta1.CloudRedisClient', () => { // Mock request const request: protosTypes.google.cloud.redis.v1beta1.IDeleteInstanceRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteInstance = mockLongRunningGrpcMethod( request, diff --git a/baselines/showcase/src/v1beta1/echo_client.ts.baseline b/baselines/showcase/src/v1beta1/echo_client.ts.baseline index 02cbc8f8a..827f85288 100644 --- a/baselines/showcase/src/v1beta1/echo_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/echo_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -185,6 +185,7 @@ export class EchoClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -238,6 +239,7 @@ export class EchoClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/identity_client.ts.baseline b/baselines/showcase/src/v1beta1/identity_client.ts.baseline index 4076a4933..f34a806ee 100644 --- a/baselines/showcase/src/v1beta1/identity_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/identity_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -202,6 +202,7 @@ export class IdentityClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline index 12556a024..ab97cb064 100644 --- a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -186,6 +186,7 @@ export class MessagingClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -239,6 +240,7 @@ export class MessagingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/testing_client.ts.baseline b/baselines/showcase/src/v1beta1/testing_client.ts.baseline index 61ac23d10..fcf062cb3 100644 --- a/baselines/showcase/src/v1beta1/testing_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/testing_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -205,6 +205,7 @@ export class TestingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/test/gapic-echo-v1beta1.ts.baseline b/baselines/showcase/test/gapic-echo-v1beta1.ts.baseline index ce3fc5401..76f0041c0 100644 --- a/baselines/showcase/test/gapic-echo-v1beta1.ts.baseline +++ b/baselines/showcase/test/gapic-echo-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const echoModule = require('../src'); import {PassThrough} from 'stream'; @@ -41,7 +42,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -182,8 +185,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.echo = mockSimpleGrpcMethod( request, @@ -232,8 +233,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IBlockRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.block = mockSimpleGrpcMethod( request, @@ -285,8 +284,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IWaitRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.wait = mockLongRunningGrpcMethod( request, @@ -338,8 +335,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IExpandRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.expand = mockServerStreamingGrpcMethod(request, null, error); const stream = client.expand(request); @@ -385,8 +380,6 @@ describe('v1beta1.EchoClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.chat = mockBidiStreamingGrpcMethod(request, null, error); const stream = client.chat().on('data', () =>{ diff --git a/baselines/showcase/test/gapic-identity-v1beta1.ts.baseline b/baselines/showcase/test/gapic-identity-v1beta1.ts.baseline index ba67b1936..a6df6a2dd 100644 --- a/baselines/showcase/test/gapic-identity-v1beta1.ts.baseline +++ b/baselines/showcase/test/gapic-identity-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const identityModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -128,8 +131,6 @@ describe('v1beta1.IdentityClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateUserRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createUser = mockSimpleGrpcMethod( request, @@ -180,8 +181,6 @@ describe('v1beta1.IdentityClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetUserRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getUser = mockSimpleGrpcMethod( request, @@ -234,8 +233,6 @@ describe('v1beta1.IdentityClient', () => { const request: protosTypes.google.showcase.v1beta1.IUpdateUserRequest = {}; request.user = {}; request.user.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateUser = mockSimpleGrpcMethod( request, @@ -286,8 +283,6 @@ describe('v1beta1.IdentityClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteUserRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteUser = mockSimpleGrpcMethod( request, diff --git a/baselines/showcase/test/gapic-messaging-v1beta1.ts.baseline b/baselines/showcase/test/gapic-messaging-v1beta1.ts.baseline index ddaf67fce..dacb2ddaf 100644 --- a/baselines/showcase/test/gapic-messaging-v1beta1.ts.baseline +++ b/baselines/showcase/test/gapic-messaging-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const messagingModule = require('../src'); import {PassThrough} from 'stream'; @@ -41,7 +42,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -182,8 +185,6 @@ describe('v1beta1.MessagingClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateRoomRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createRoom = mockSimpleGrpcMethod( request, @@ -234,8 +235,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetRoomRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getRoom = mockSimpleGrpcMethod( request, @@ -288,8 +287,6 @@ describe('v1beta1.MessagingClient', () => { const request: protosTypes.google.showcase.v1beta1.IUpdateRoomRequest = {}; request.room = {}; request.room.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateRoom = mockSimpleGrpcMethod( request, @@ -340,8 +337,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteRoomRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteRoom = mockSimpleGrpcMethod( request, @@ -392,8 +387,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateBlurbRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createBlurb = mockSimpleGrpcMethod( request, @@ -444,8 +437,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetBlurbRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getBlurb = mockSimpleGrpcMethod( request, @@ -498,8 +489,6 @@ describe('v1beta1.MessagingClient', () => { const request: protosTypes.google.showcase.v1beta1.IUpdateBlurbRequest = {}; request.blurb = {}; request.blurb.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.updateBlurb = mockSimpleGrpcMethod( request, @@ -550,8 +539,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteBlurbRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteBlurb = mockSimpleGrpcMethod( request, @@ -605,8 +592,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.ISearchBlurbsRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.searchBlurbs = mockLongRunningGrpcMethod( request, @@ -660,8 +645,6 @@ describe('v1beta1.MessagingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IStreamBlurbsRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.streamBlurbs = mockServerStreamingGrpcMethod(request, null, error); const stream = client.streamBlurbs(request); @@ -707,8 +690,6 @@ describe('v1beta1.MessagingClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.IConnectRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.connect = mockBidiStreamingGrpcMethod(request, null, error); const stream = client.connect().on('data', () =>{ diff --git a/baselines/showcase/test/gapic-testing-v1beta1.ts.baseline b/baselines/showcase/test/gapic-testing-v1beta1.ts.baseline index 93ef93e30..816b708e0 100644 --- a/baselines/showcase/test/gapic-testing-v1beta1.ts.baseline +++ b/baselines/showcase/test/gapic-testing-v1beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const testingModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -128,8 +131,6 @@ describe('v1beta1.TestingClient', () => { client.initialize(); // Mock request const request: protosTypes.google.showcase.v1beta1.ICreateSessionRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createSession = mockSimpleGrpcMethod( request, @@ -180,8 +181,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IGetSessionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getSession = mockSimpleGrpcMethod( request, @@ -232,8 +231,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteSessionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteSession = mockSimpleGrpcMethod( request, @@ -284,8 +281,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IReportSessionRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.reportSession = mockSimpleGrpcMethod( request, @@ -336,8 +331,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IDeleteTestRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteTest = mockSimpleGrpcMethod( request, @@ -388,8 +381,6 @@ describe('v1beta1.TestingClient', () => { // Mock request const request: protosTypes.google.showcase.v1beta1.IVerifyTestRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.verifyTest = mockSimpleGrpcMethod( request, diff --git a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline index 4a4edcd9d..e3870c61d 100644 --- a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline +++ b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline @@ -165,6 +165,7 @@ export class TextToSpeechClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.texttospeech.v1.TextToSpeech') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.cloud.texttospeech.v1.TextToSpeech, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/texttospeech/test/gapic-text_to_speech-v1.ts.baseline b/baselines/texttospeech/test/gapic-text_to_speech-v1.ts.baseline index 981bb20be..b460d1ac4 100644 --- a/baselines/texttospeech/test/gapic-text_to_speech-v1.ts.baseline +++ b/baselines/texttospeech/test/gapic-text_to_speech-v1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const texttospeechModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -128,8 +131,6 @@ describe('v1.TextToSpeechClient', () => { client.initialize(); // Mock request const request: protosTypes.google.cloud.texttospeech.v1.IListVoicesRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.listVoices = mockSimpleGrpcMethod( request, @@ -178,8 +179,6 @@ describe('v1.TextToSpeechClient', () => { client.initialize(); // Mock request const request: protosTypes.google.cloud.texttospeech.v1.ISynthesizeSpeechRequest = {}; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.synthesizeSpeech = mockSimpleGrpcMethod( request, diff --git a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline index b5debda7b..9be473ccc 100644 --- a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline +++ b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; -import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, PaginationResponse} from 'google-gax'; +import {APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation} from 'google-gax'; import * as path from 'path'; import { Transform } from 'stream'; @@ -158,6 +158,7 @@ export class TranslationServiceClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback? + /* eslint-disable @typescript-eslint/no-var-requires */ this._gaxModule.protobuf.Root.fromJSON(require("../../protos/protos.json")) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -227,6 +228,7 @@ export class TranslationServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.translation.v3beta1.TranslationService') : // tslint:disable-next-line no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (this._protos as any).google.cloud.translation.v3beta1.TranslationService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/translate/test/gapic-translation_service-v3beta1.ts.baseline b/baselines/translate/test/gapic-translation_service-v3beta1.ts.baseline index a2c7a8b58..df40bda67 100644 --- a/baselines/translate/test/gapic-translation_service-v3beta1.ts.baseline +++ b/baselines/translate/test/gapic-translation_service-v3beta1.ts.baseline @@ -19,6 +19,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; import { describe, it } from 'mocha'; +/* eslint-disable @typescript-eslint/no-var-requires */ const translationserviceModule = require('../src'); @@ -39,7 +40,9 @@ export interface Callback { } export class Operation{ + /* eslint-disable @typescript-eslint/no-empty-function */ constructor(){}; + /* eslint-disable @typescript-eslint/no-empty-function */ promise() {}; } function mockSimpleGrpcMethod(expectedRequest: {}, response: {} | null, error: FakeError | null) { @@ -148,8 +151,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.ITranslateTextRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.translateText = mockSimpleGrpcMethod( request, @@ -200,8 +201,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.IDetectLanguageRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.detectLanguage = mockSimpleGrpcMethod( request, @@ -252,8 +251,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getSupportedLanguages = mockSimpleGrpcMethod( request, @@ -304,8 +301,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.IGetGlossaryRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.getGlossary = mockSimpleGrpcMethod( request, @@ -359,8 +354,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.IBatchTranslateTextRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.batchTranslateText = mockLongRunningGrpcMethod( request, @@ -418,8 +411,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.ICreateGlossaryRequest = {}; request.parent = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.createGlossary = mockLongRunningGrpcMethod( request, @@ -477,8 +468,6 @@ describe('v3beta1.TranslationServiceClient', () => { // Mock request const request: protosTypes.google.cloud.translation.v3beta1.IDeleteGlossaryRequest = {}; request.name = ''; - // Mock response - const expectedResponse = {}; // Mock gRPC layer client._innerApiCalls.deleteGlossary = mockLongRunningGrpcMethod( request, From 9654177be63a52f9a54e72aa765a9143be7a29e0 Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Mon, 23 Mar 2020 18:35:49 -0700 Subject: [PATCH 4/7] fix --- .../src/v1beta1/big_query_storage_client.ts.baseline | 2 +- .../disable-packing-test/src/v1beta1/echo_client.ts.baseline | 2 +- .../src/v1beta1/identity_client.ts.baseline | 2 +- .../src/v1beta1/messaging_client.ts.baseline | 2 +- .../disable-packing-test/src/v1beta1/testing_client.ts.baseline | 2 +- baselines/dlp/src/v2/dlp_service_client.ts.baseline | 2 +- baselines/kms/src/v1/key_management_service_client.ts.baseline | 2 +- baselines/logging/src/v2/config_service_v2_client.ts.baseline | 2 +- baselines/logging/src/v2/logging_service_v2_client.ts.baseline | 2 +- baselines/logging/src/v2/metrics_service_v2_client.ts.baseline | 2 +- .../monitoring/src/v3/alert_policy_service_client.ts.baseline | 2 +- baselines/monitoring/src/v3/group_service_client.ts.baseline | 2 +- baselines/monitoring/src/v3/metric_service_client.ts.baseline | 2 +- .../src/v3/notification_channel_service_client.ts.baseline | 2 +- .../src/v3/service_monitoring_service_client.ts.baseline | 2 +- .../monitoring/src/v3/uptime_check_service_client.ts.baseline | 2 +- baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline | 2 +- baselines/showcase/src/v1beta1/echo_client.ts.baseline | 2 +- baselines/showcase/src/v1beta1/identity_client.ts.baseline | 2 +- baselines/showcase/src/v1beta1/messaging_client.ts.baseline | 2 +- baselines/showcase/src/v1beta1/testing_client.ts.baseline | 2 +- baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline | 2 +- .../src/v3beta1/translation_service_client.ts.baseline | 2 +- templates/typescript_gapic/src/$version/$service_client.ts.njk | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline index 4d77c66a6..b031e3cec 100644 --- a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline +++ b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline @@ -185,8 +185,8 @@ export class BigQueryStorageClient { this.bigQueryStorageStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.bigquery.storage.v1beta1.BigQueryStorage') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.bigquery.storage.v1beta1.BigQueryStorage, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline index 827f85288..6e378fdec 100644 --- a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline @@ -238,8 +238,8 @@ export class EchoClient { this.echoStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline index f34a806ee..2b8fe51e8 100644 --- a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline @@ -201,8 +201,8 @@ export class IdentityClient { this.identityStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline index ab97cb064..44a9816c6 100644 --- a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline @@ -239,8 +239,8 @@ export class MessagingClient { this.messagingStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline index fcf062cb3..f7bad148c 100644 --- a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline @@ -204,8 +204,8 @@ export class TestingClient { this.testingStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/dlp/src/v2/dlp_service_client.ts.baseline b/baselines/dlp/src/v2/dlp_service_client.ts.baseline index 666274e2a..daf150f25 100644 --- a/baselines/dlp/src/v2/dlp_service_client.ts.baseline +++ b/baselines/dlp/src/v2/dlp_service_client.ts.baseline @@ -226,8 +226,8 @@ export class DlpServiceClient { this.dlpServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.privacy.dlp.v2.DlpService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.privacy.dlp.v2.DlpService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/kms/src/v1/key_management_service_client.ts.baseline b/baselines/kms/src/v1/key_management_service_client.ts.baseline index 7afe04f0e..5beefd07b 100644 --- a/baselines/kms/src/v1/key_management_service_client.ts.baseline +++ b/baselines/kms/src/v1/key_management_service_client.ts.baseline @@ -189,8 +189,8 @@ export class KeyManagementServiceClient { this.keyManagementServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.kms.v1.KeyManagementService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.kms.v1.KeyManagementService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/config_service_v2_client.ts.baseline b/baselines/logging/src/v2/config_service_v2_client.ts.baseline index 49b4a5c77..493057dcb 100644 --- a/baselines/logging/src/v2/config_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/config_service_v2_client.ts.baseline @@ -253,8 +253,8 @@ export class ConfigServiceV2Client { this.configServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.ConfigServiceV2') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.ConfigServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline index 8f5b03301..3ace8765d 100644 --- a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline @@ -273,8 +273,8 @@ export class LoggingServiceV2Client { this.loggingServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.LoggingServiceV2') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.LoggingServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline index 6abdbba80..fbe8f46f5 100644 --- a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline @@ -246,8 +246,8 @@ export class MetricsServiceV2Client { this.metricsServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.MetricsServiceV2') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline index 75fda55d4..62279ca00 100644 --- a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline @@ -260,8 +260,8 @@ export class AlertPolicyServiceClient { this.alertPolicyServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.AlertPolicyService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.AlertPolicyService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/group_service_client.ts.baseline b/baselines/monitoring/src/v3/group_service_client.ts.baseline index 6ad0a0035..96eb8cebe 100644 --- a/baselines/monitoring/src/v3/group_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/group_service_client.ts.baseline @@ -265,8 +265,8 @@ export class GroupServiceClient { this.groupServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.GroupService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.GroupService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/metric_service_client.ts.baseline b/baselines/monitoring/src/v3/metric_service_client.ts.baseline index 4bf8c47e3..0de4c81b4 100644 --- a/baselines/monitoring/src/v3/metric_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/metric_service_client.ts.baseline @@ -275,8 +275,8 @@ export class MetricServiceClient { this.metricServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.MetricService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.MetricService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline index 87b4da8fe..c30bb8ed7 100644 --- a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline @@ -255,8 +255,8 @@ export class NotificationChannelServiceClient { this.notificationChannelServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.NotificationChannelService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.NotificationChannelService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline index b138e064f..b7cb7354c 100644 --- a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline @@ -257,8 +257,8 @@ export class ServiceMonitoringServiceClient { this.serviceMonitoringServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.ServiceMonitoringService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.ServiceMonitoringService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline index 6d906a11f..2fbb67a8d 100644 --- a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline @@ -261,8 +261,8 @@ export class UptimeCheckServiceClient { this.uptimeCheckServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.UptimeCheckService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.UptimeCheckService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline index 8e036646a..baed05dc4 100644 --- a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline +++ b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline @@ -265,8 +265,8 @@ export class CloudRedisClient { this.cloudRedisStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.redis.v1beta1.CloudRedis') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.redis.v1beta1.CloudRedis, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/echo_client.ts.baseline b/baselines/showcase/src/v1beta1/echo_client.ts.baseline index 827f85288..6e378fdec 100644 --- a/baselines/showcase/src/v1beta1/echo_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/echo_client.ts.baseline @@ -238,8 +238,8 @@ export class EchoClient { this.echoStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/identity_client.ts.baseline b/baselines/showcase/src/v1beta1/identity_client.ts.baseline index f34a806ee..2b8fe51e8 100644 --- a/baselines/showcase/src/v1beta1/identity_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/identity_client.ts.baseline @@ -201,8 +201,8 @@ export class IdentityClient { this.identityStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline index ab97cb064..44a9816c6 100644 --- a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline @@ -239,8 +239,8 @@ export class MessagingClient { this.messagingStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/testing_client.ts.baseline b/baselines/showcase/src/v1beta1/testing_client.ts.baseline index fcf062cb3..f7bad148c 100644 --- a/baselines/showcase/src/v1beta1/testing_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/testing_client.ts.baseline @@ -204,8 +204,8 @@ export class TestingClient { this.testingStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline index e3870c61d..0b71d3232 100644 --- a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline +++ b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline @@ -164,8 +164,8 @@ export class TextToSpeechClient { this.textToSpeechStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.texttospeech.v1.TextToSpeech') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.texttospeech.v1.TextToSpeech, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline index 9be473ccc..f80f79b82 100644 --- a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline +++ b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline @@ -227,8 +227,8 @@ export class TranslationServiceClient { this.translationServiceStub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.translation.v3beta1.TranslationService') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.translation.v3beta1.TranslationService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index 03fd06fc2..c516cbcc5 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -281,8 +281,8 @@ export class {{ service.name }}Client { this.{{ service.name.toCamelCase() }}Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService('{{api.naming.protoPackage}}.{{ service.name }}') : - // tslint:disable-next-line no-any /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).{{api.naming.protoPackage}}.{{ service.name }}, this._opts) as Promise<{[method: string]: Function}>; From 5cca47f1009d555f4bee81805b5a9510914a20bb Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Tue, 24 Mar 2020 00:08:41 -0700 Subject: [PATCH 5/7] remove tslint no-any comment --- .../src/v1beta1/big_query_storage_client.ts.baseline | 1 - .../disable-packing-test/src/v1beta1/echo_client.ts.baseline | 1 - .../disable-packing-test/src/v1beta1/identity_client.ts.baseline | 1 - .../src/v1beta1/messaging_client.ts.baseline | 1 - .../disable-packing-test/src/v1beta1/testing_client.ts.baseline | 1 - baselines/dlp/src/v2/dlp_service_client.ts.baseline | 1 - baselines/kms/src/v1/key_management_service_client.ts.baseline | 1 - baselines/logging/src/v2/config_service_v2_client.ts.baseline | 1 - baselines/logging/src/v2/logging_service_v2_client.ts.baseline | 1 - baselines/logging/src/v2/metrics_service_v2_client.ts.baseline | 1 - .../monitoring/src/v3/alert_policy_service_client.ts.baseline | 1 - baselines/monitoring/src/v3/group_service_client.ts.baseline | 1 - baselines/monitoring/src/v3/metric_service_client.ts.baseline | 1 - .../src/v3/notification_channel_service_client.ts.baseline | 1 - .../src/v3/service_monitoring_service_client.ts.baseline | 1 - .../monitoring/src/v3/uptime_check_service_client.ts.baseline | 1 - baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline | 1 - baselines/showcase/src/v1beta1/echo_client.ts.baseline | 1 - baselines/showcase/src/v1beta1/identity_client.ts.baseline | 1 - baselines/showcase/src/v1beta1/messaging_client.ts.baseline | 1 - baselines/showcase/src/v1beta1/testing_client.ts.baseline | 1 - baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline | 1 - .../translate/src/v3beta1/translation_service_client.ts.baseline | 1 - templates/typescript_gapic/src/$version/$service_client.ts.njk | 1 - 24 files changed, 24 deletions(-) diff --git a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline index b031e3cec..9e41c4081 100644 --- a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline +++ b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline @@ -186,7 +186,6 @@ export class BigQueryStorageClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.bigquery.storage.v1beta1.BigQueryStorage') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.cloud.bigquery.storage.v1beta1.BigQueryStorage, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline index 6e378fdec..24b113a4b 100644 --- a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline @@ -239,7 +239,6 @@ export class EchoClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline index 2b8fe51e8..6a252f164 100644 --- a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline @@ -202,7 +202,6 @@ export class IdentityClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline index 44a9816c6..4c2c9b641 100644 --- a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline @@ -240,7 +240,6 @@ export class MessagingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline index f7bad148c..709dc3346 100644 --- a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline @@ -205,7 +205,6 @@ export class TestingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/dlp/src/v2/dlp_service_client.ts.baseline b/baselines/dlp/src/v2/dlp_service_client.ts.baseline index daf150f25..00c684bfd 100644 --- a/baselines/dlp/src/v2/dlp_service_client.ts.baseline +++ b/baselines/dlp/src/v2/dlp_service_client.ts.baseline @@ -227,7 +227,6 @@ export class DlpServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.privacy.dlp.v2.DlpService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.privacy.dlp.v2.DlpService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/kms/src/v1/key_management_service_client.ts.baseline b/baselines/kms/src/v1/key_management_service_client.ts.baseline index 5beefd07b..48fc2c0b5 100644 --- a/baselines/kms/src/v1/key_management_service_client.ts.baseline +++ b/baselines/kms/src/v1/key_management_service_client.ts.baseline @@ -190,7 +190,6 @@ export class KeyManagementServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.kms.v1.KeyManagementService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.cloud.kms.v1.KeyManagementService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/config_service_v2_client.ts.baseline b/baselines/logging/src/v2/config_service_v2_client.ts.baseline index 493057dcb..91757ca41 100644 --- a/baselines/logging/src/v2/config_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/config_service_v2_client.ts.baseline @@ -254,7 +254,6 @@ export class ConfigServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.ConfigServiceV2') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.ConfigServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline index 3ace8765d..431a5a0d2 100644 --- a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline @@ -274,7 +274,6 @@ export class LoggingServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.LoggingServiceV2') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.LoggingServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline index fbe8f46f5..f60f8c421 100644 --- a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline @@ -247,7 +247,6 @@ export class MetricsServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.MetricsServiceV2') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline index 62279ca00..ac560db12 100644 --- a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline @@ -261,7 +261,6 @@ export class AlertPolicyServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.AlertPolicyService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.AlertPolicyService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/group_service_client.ts.baseline b/baselines/monitoring/src/v3/group_service_client.ts.baseline index 96eb8cebe..d45245dde 100644 --- a/baselines/monitoring/src/v3/group_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/group_service_client.ts.baseline @@ -266,7 +266,6 @@ export class GroupServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.GroupService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.GroupService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/metric_service_client.ts.baseline b/baselines/monitoring/src/v3/metric_service_client.ts.baseline index 0de4c81b4..258f13ef9 100644 --- a/baselines/monitoring/src/v3/metric_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/metric_service_client.ts.baseline @@ -276,7 +276,6 @@ export class MetricServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.MetricService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.MetricService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline index c30bb8ed7..2f9c3b925 100644 --- a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline @@ -256,7 +256,6 @@ export class NotificationChannelServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.NotificationChannelService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.NotificationChannelService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline index b7cb7354c..8229c8136 100644 --- a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline @@ -258,7 +258,6 @@ export class ServiceMonitoringServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.ServiceMonitoringService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.ServiceMonitoringService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline index 2fbb67a8d..13e48aa26 100644 --- a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline @@ -262,7 +262,6 @@ export class UptimeCheckServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.UptimeCheckService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.UptimeCheckService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline index baed05dc4..035aaeb09 100644 --- a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline +++ b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline @@ -266,7 +266,6 @@ export class CloudRedisClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.redis.v1beta1.CloudRedis') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.cloud.redis.v1beta1.CloudRedis, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/echo_client.ts.baseline b/baselines/showcase/src/v1beta1/echo_client.ts.baseline index 6e378fdec..24b113a4b 100644 --- a/baselines/showcase/src/v1beta1/echo_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/echo_client.ts.baseline @@ -239,7 +239,6 @@ export class EchoClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/identity_client.ts.baseline b/baselines/showcase/src/v1beta1/identity_client.ts.baseline index 2b8fe51e8..6a252f164 100644 --- a/baselines/showcase/src/v1beta1/identity_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/identity_client.ts.baseline @@ -202,7 +202,6 @@ export class IdentityClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline index 44a9816c6..4c2c9b641 100644 --- a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline @@ -240,7 +240,6 @@ export class MessagingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/testing_client.ts.baseline b/baselines/showcase/src/v1beta1/testing_client.ts.baseline index f7bad148c..709dc3346 100644 --- a/baselines/showcase/src/v1beta1/testing_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/testing_client.ts.baseline @@ -205,7 +205,6 @@ export class TestingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline index 0b71d3232..d22eb3f10 100644 --- a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline +++ b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline @@ -165,7 +165,6 @@ export class TextToSpeechClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.texttospeech.v1.TextToSpeech') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.cloud.texttospeech.v1.TextToSpeech, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline index f80f79b82..1e236d92d 100644 --- a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline +++ b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline @@ -228,7 +228,6 @@ export class TranslationServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.translation.v3beta1.TranslationService') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).google.cloud.translation.v3beta1.TranslationService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index c516cbcc5..f5f78c9c0 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -282,7 +282,6 @@ export class {{ service.name }}Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('{{api.naming.protoPackage}}.{{ service.name }}') : /* eslint-disable @typescript-eslint/no-explicit-any */ - // tslint:disable-next-line no-any (this._protos as any).{{api.naming.protoPackage}}.{{ service.name }}, this._opts) as Promise<{[method: string]: Function}>; From 43c865431f0d746690dd1e9a116c46eeb7e7420b Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Tue, 24 Mar 2020 00:25:11 -0700 Subject: [PATCH 6/7] add eslint config json --- baselines/bigquery-storage/.eslintignore.baseline | 6 ++++++ baselines/bigquery-storage/.eslintrc.json.baseline | 3 +++ baselines/disable-packing-test/.eslintignore.baseline | 6 ++++++ baselines/disable-packing-test/.eslintrc.json.baseline | 3 +++ baselines/dlp/.eslintignore.baseline | 6 ++++++ baselines/dlp/.eslintrc.json.baseline | 3 +++ baselines/kms/.eslintignore.baseline | 6 ++++++ baselines/kms/.eslintrc.json.baseline | 3 +++ baselines/logging/.eslintignore.baseline | 6 ++++++ baselines/logging/.eslintrc.json.baseline | 3 +++ baselines/monitoring/.eslintignore.baseline | 6 ++++++ baselines/monitoring/.eslintrc.json.baseline | 3 +++ baselines/redis/.eslintignore.baseline | 6 ++++++ baselines/redis/.eslintrc.json.baseline | 3 +++ baselines/showcase/.eslintignore.baseline | 6 ++++++ baselines/showcase/.eslintrc.json.baseline | 3 +++ baselines/texttospeech/.eslintignore.baseline | 6 ++++++ baselines/texttospeech/.eslintrc.json.baseline | 3 +++ baselines/translate/.eslintignore.baseline | 6 ++++++ baselines/translate/.eslintrc.json.baseline | 3 +++ templates/typescript_gapic/.eslintignore.njk | 6 ++++++ templates/typescript_gapic/.eslintrc.json.njk | 3 +++ 22 files changed, 99 insertions(+) create mode 100644 baselines/bigquery-storage/.eslintignore.baseline create mode 100644 baselines/bigquery-storage/.eslintrc.json.baseline create mode 100644 baselines/disable-packing-test/.eslintignore.baseline create mode 100644 baselines/disable-packing-test/.eslintrc.json.baseline create mode 100644 baselines/dlp/.eslintignore.baseline create mode 100644 baselines/dlp/.eslintrc.json.baseline create mode 100644 baselines/kms/.eslintignore.baseline create mode 100644 baselines/kms/.eslintrc.json.baseline create mode 100644 baselines/logging/.eslintignore.baseline create mode 100644 baselines/logging/.eslintrc.json.baseline create mode 100644 baselines/monitoring/.eslintignore.baseline create mode 100644 baselines/monitoring/.eslintrc.json.baseline create mode 100644 baselines/redis/.eslintignore.baseline create mode 100644 baselines/redis/.eslintrc.json.baseline create mode 100644 baselines/showcase/.eslintignore.baseline create mode 100644 baselines/showcase/.eslintrc.json.baseline create mode 100644 baselines/texttospeech/.eslintignore.baseline create mode 100644 baselines/texttospeech/.eslintrc.json.baseline create mode 100644 baselines/translate/.eslintignore.baseline create mode 100644 baselines/translate/.eslintrc.json.baseline create mode 100644 templates/typescript_gapic/.eslintignore.njk create mode 100644 templates/typescript_gapic/.eslintrc.json.njk diff --git a/baselines/bigquery-storage/.eslintignore.baseline b/baselines/bigquery-storage/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/bigquery-storage/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/bigquery-storage/.eslintrc.json.baseline b/baselines/bigquery-storage/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/bigquery-storage/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/disable-packing-test/.eslintignore.baseline b/baselines/disable-packing-test/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/disable-packing-test/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/disable-packing-test/.eslintrc.json.baseline b/baselines/disable-packing-test/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/disable-packing-test/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/dlp/.eslintignore.baseline b/baselines/dlp/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/dlp/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/dlp/.eslintrc.json.baseline b/baselines/dlp/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/dlp/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/kms/.eslintignore.baseline b/baselines/kms/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/kms/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/kms/.eslintrc.json.baseline b/baselines/kms/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/kms/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/logging/.eslintignore.baseline b/baselines/logging/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/logging/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/logging/.eslintrc.json.baseline b/baselines/logging/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/logging/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/monitoring/.eslintignore.baseline b/baselines/monitoring/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/monitoring/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/monitoring/.eslintrc.json.baseline b/baselines/monitoring/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/monitoring/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/redis/.eslintignore.baseline b/baselines/redis/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/redis/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/redis/.eslintrc.json.baseline b/baselines/redis/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/redis/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/showcase/.eslintignore.baseline b/baselines/showcase/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/showcase/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/showcase/.eslintrc.json.baseline b/baselines/showcase/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/showcase/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/texttospeech/.eslintignore.baseline b/baselines/texttospeech/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/texttospeech/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/texttospeech/.eslintrc.json.baseline b/baselines/texttospeech/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/texttospeech/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/baselines/translate/.eslintignore.baseline b/baselines/translate/.eslintignore.baseline new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/baselines/translate/.eslintignore.baseline @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/baselines/translate/.eslintrc.json.baseline b/baselines/translate/.eslintrc.json.baseline new file mode 100644 index 000000000..782153495 --- /dev/null +++ b/baselines/translate/.eslintrc.json.baseline @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/templates/typescript_gapic/.eslintignore.njk b/templates/typescript_gapic/.eslintignore.njk new file mode 100644 index 000000000..521dc25a2 --- /dev/null +++ b/templates/typescript_gapic/.eslintignore.njk @@ -0,0 +1,6 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ diff --git a/templates/typescript_gapic/.eslintrc.json.njk b/templates/typescript_gapic/.eslintrc.json.njk new file mode 100644 index 000000000..eb23147be --- /dev/null +++ b/templates/typescript_gapic/.eslintrc.json.njk @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} From 3045ec89b447797ceb1d284c07108b5e4819ac4a Mon Sep 17 00:00:00 2001 From: xiaozhenliugg Date: Tue, 24 Mar 2020 11:47:26 -0700 Subject: [PATCH 7/7] test --- .../src/v1beta1/big_query_storage_client.ts.baseline | 1 + .../disable-packing-test/src/v1beta1/echo_client.ts.baseline | 1 + .../disable-packing-test/src/v1beta1/identity_client.ts.baseline | 1 + .../src/v1beta1/messaging_client.ts.baseline | 1 + .../disable-packing-test/src/v1beta1/testing_client.ts.baseline | 1 + baselines/dlp/src/v2/dlp_service_client.ts.baseline | 1 + baselines/kms/src/v1/key_management_service_client.ts.baseline | 1 + baselines/logging/src/v2/config_service_v2_client.ts.baseline | 1 + baselines/logging/src/v2/logging_service_v2_client.ts.baseline | 1 + baselines/logging/src/v2/metrics_service_v2_client.ts.baseline | 1 + .../monitoring/src/v3/alert_policy_service_client.ts.baseline | 1 + baselines/monitoring/src/v3/group_service_client.ts.baseline | 1 + baselines/monitoring/src/v3/metric_service_client.ts.baseline | 1 + .../src/v3/notification_channel_service_client.ts.baseline | 1 + .../src/v3/service_monitoring_service_client.ts.baseline | 1 + .../monitoring/src/v3/uptime_check_service_client.ts.baseline | 1 + baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline | 1 + baselines/showcase/src/v1beta1/echo_client.ts.baseline | 1 + baselines/showcase/src/v1beta1/identity_client.ts.baseline | 1 + baselines/showcase/src/v1beta1/messaging_client.ts.baseline | 1 + baselines/showcase/src/v1beta1/testing_client.ts.baseline | 1 + baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline | 1 + .../translate/src/v3beta1/translation_service_client.ts.baseline | 1 + templates/typescript_gapic/src/$version/$service_client.ts.njk | 1 + 24 files changed, 24 insertions(+) diff --git a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline index 9e41c4081..b031e3cec 100644 --- a/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline +++ b/baselines/bigquery-storage/src/v1beta1/big_query_storage_client.ts.baseline @@ -186,6 +186,7 @@ export class BigQueryStorageClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.bigquery.storage.v1beta1.BigQueryStorage') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.bigquery.storage.v1beta1.BigQueryStorage, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline index 24b113a4b..6e378fdec 100644 --- a/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/echo_client.ts.baseline @@ -239,6 +239,7 @@ export class EchoClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline index 6a252f164..2b8fe51e8 100644 --- a/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/identity_client.ts.baseline @@ -202,6 +202,7 @@ export class IdentityClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline index 4c2c9b641..44a9816c6 100644 --- a/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/messaging_client.ts.baseline @@ -240,6 +240,7 @@ export class MessagingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline index 709dc3346..f7bad148c 100644 --- a/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline +++ b/baselines/disable-packing-test/src/v1beta1/testing_client.ts.baseline @@ -205,6 +205,7 @@ export class TestingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/dlp/src/v2/dlp_service_client.ts.baseline b/baselines/dlp/src/v2/dlp_service_client.ts.baseline index 00c684bfd..daf150f25 100644 --- a/baselines/dlp/src/v2/dlp_service_client.ts.baseline +++ b/baselines/dlp/src/v2/dlp_service_client.ts.baseline @@ -227,6 +227,7 @@ export class DlpServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.privacy.dlp.v2.DlpService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.privacy.dlp.v2.DlpService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/kms/src/v1/key_management_service_client.ts.baseline b/baselines/kms/src/v1/key_management_service_client.ts.baseline index 48fc2c0b5..5beefd07b 100644 --- a/baselines/kms/src/v1/key_management_service_client.ts.baseline +++ b/baselines/kms/src/v1/key_management_service_client.ts.baseline @@ -190,6 +190,7 @@ export class KeyManagementServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.kms.v1.KeyManagementService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.kms.v1.KeyManagementService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/config_service_v2_client.ts.baseline b/baselines/logging/src/v2/config_service_v2_client.ts.baseline index 91757ca41..493057dcb 100644 --- a/baselines/logging/src/v2/config_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/config_service_v2_client.ts.baseline @@ -254,6 +254,7 @@ export class ConfigServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.ConfigServiceV2') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.ConfigServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline index 431a5a0d2..3ace8765d 100644 --- a/baselines/logging/src/v2/logging_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/logging_service_v2_client.ts.baseline @@ -274,6 +274,7 @@ export class LoggingServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.LoggingServiceV2') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.LoggingServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline index f60f8c421..fbe8f46f5 100644 --- a/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline +++ b/baselines/logging/src/v2/metrics_service_v2_client.ts.baseline @@ -247,6 +247,7 @@ export class MetricsServiceV2Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.logging.v2.MetricsServiceV2') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline index ac560db12..62279ca00 100644 --- a/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/alert_policy_service_client.ts.baseline @@ -261,6 +261,7 @@ export class AlertPolicyServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.AlertPolicyService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.AlertPolicyService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/group_service_client.ts.baseline b/baselines/monitoring/src/v3/group_service_client.ts.baseline index d45245dde..96eb8cebe 100644 --- a/baselines/monitoring/src/v3/group_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/group_service_client.ts.baseline @@ -266,6 +266,7 @@ export class GroupServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.GroupService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.GroupService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/metric_service_client.ts.baseline b/baselines/monitoring/src/v3/metric_service_client.ts.baseline index 258f13ef9..0de4c81b4 100644 --- a/baselines/monitoring/src/v3/metric_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/metric_service_client.ts.baseline @@ -276,6 +276,7 @@ export class MetricServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.MetricService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.MetricService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline index 2f9c3b925..c30bb8ed7 100644 --- a/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/notification_channel_service_client.ts.baseline @@ -256,6 +256,7 @@ export class NotificationChannelServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.NotificationChannelService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.NotificationChannelService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline index 8229c8136..b7cb7354c 100644 --- a/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/service_monitoring_service_client.ts.baseline @@ -258,6 +258,7 @@ export class ServiceMonitoringServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.ServiceMonitoringService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.ServiceMonitoringService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline index 13e48aa26..2fbb67a8d 100644 --- a/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline +++ b/baselines/monitoring/src/v3/uptime_check_service_client.ts.baseline @@ -262,6 +262,7 @@ export class UptimeCheckServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.monitoring.v3.UptimeCheckService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.monitoring.v3.UptimeCheckService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline index 035aaeb09..baed05dc4 100644 --- a/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline +++ b/baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline @@ -266,6 +266,7 @@ export class CloudRedisClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.redis.v1beta1.CloudRedis') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.redis.v1beta1.CloudRedis, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/echo_client.ts.baseline b/baselines/showcase/src/v1beta1/echo_client.ts.baseline index 24b113a4b..6e378fdec 100644 --- a/baselines/showcase/src/v1beta1/echo_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/echo_client.ts.baseline @@ -239,6 +239,7 @@ export class EchoClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Echo') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Echo, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/identity_client.ts.baseline b/baselines/showcase/src/v1beta1/identity_client.ts.baseline index 6a252f164..2b8fe51e8 100644 --- a/baselines/showcase/src/v1beta1/identity_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/identity_client.ts.baseline @@ -202,6 +202,7 @@ export class IdentityClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Identity') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Identity, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline index 4c2c9b641..44a9816c6 100644 --- a/baselines/showcase/src/v1beta1/messaging_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/messaging_client.ts.baseline @@ -240,6 +240,7 @@ export class MessagingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Messaging') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Messaging, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/showcase/src/v1beta1/testing_client.ts.baseline b/baselines/showcase/src/v1beta1/testing_client.ts.baseline index 709dc3346..f7bad148c 100644 --- a/baselines/showcase/src/v1beta1/testing_client.ts.baseline +++ b/baselines/showcase/src/v1beta1/testing_client.ts.baseline @@ -205,6 +205,7 @@ export class TestingClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.showcase.v1beta1.Testing') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.showcase.v1beta1.Testing, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline index d22eb3f10..0b71d3232 100644 --- a/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline +++ b/baselines/texttospeech/src/v1/text_to_speech_client.ts.baseline @@ -165,6 +165,7 @@ export class TextToSpeechClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.texttospeech.v1.TextToSpeech') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.texttospeech.v1.TextToSpeech, this._opts) as Promise<{[method: string]: Function}>; diff --git a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline index 1e236d92d..f80f79b82 100644 --- a/baselines/translate/src/v3beta1/translation_service_client.ts.baseline +++ b/baselines/translate/src/v3beta1/translation_service_client.ts.baseline @@ -228,6 +228,7 @@ export class TranslationServiceClient { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('google.cloud.translation.v3beta1.TranslationService') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).google.cloud.translation.v3beta1.TranslationService, this._opts) as Promise<{[method: string]: Function}>; diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index f5f78c9c0..c516cbcc5 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -282,6 +282,7 @@ export class {{ service.name }}Client { this._opts.fallback ? (this._protos as protobuf.Root).lookupService('{{api.naming.protoPackage}}.{{ service.name }}') : /* eslint-disable @typescript-eslint/no-explicit-any */ + // tslint:disable-next-line no-any (this._protos as any).{{api.naming.protoPackage}}.{{ service.name }}, this._opts) as Promise<{[method: string]: Function}>;