Skip to content

Commit

Permalink
Enable prefer-const in the eslint config (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and alexander-fenster committed Sep 20, 2018
1 parent 21630ef commit f3651ae
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-videointelligence/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ rules:
eqeqeq: error
no-warning-comments: warn
no-var: error
prefer-const: error
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
'use strict';

describe('VideoIntelligenceServiceSmokeTest', () => {
$unhandledCase: LongRunningOptionalArrayMethod$
LongRunningOptionalArrayMethod$;
});
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class VideoIntelligenceServiceClient {
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const videoIntelligenceServiceStubMethods = ['annotateVideo'];
for (let methodName of videoIntelligenceServiceStubMethods) {
for (const methodName of videoIntelligenceServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
videoIntelligenceServiceStub.then(
stub =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class VideoIntelligenceServiceClient {
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const videoIntelligenceServiceStubMethods = ['annotateVideo'];
for (let methodName of videoIntelligenceServiceStubMethods) {
for (const methodName of videoIntelligenceServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
videoIntelligenceServiceStub.then(
stub =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class VideoIntelligenceServiceClient {
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const videoIntelligenceServiceStubMethods = ['annotateVideo'];
for (let methodName of videoIntelligenceServiceStubMethods) {
for (const methodName of videoIntelligenceServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
videoIntelligenceServiceStub.then(
stub =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class VideoIntelligenceServiceClient {
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const videoIntelligenceServiceStubMethods = ['annotateVideo'];
for (let methodName of videoIntelligenceServiceStubMethods) {
for (const methodName of videoIntelligenceServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
videoIntelligenceServiceStub.then(
stub =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class VideoIntelligenceServiceClient {
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const videoIntelligenceServiceStubMethods = ['annotateVideo'];
for (let methodName of videoIntelligenceServiceStubMethods) {
for (const methodName of videoIntelligenceServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
videoIntelligenceServiceStub.then(
stub =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
it('successfully makes a call to the service', done => {
const videoIntelligence = require('../src');

let client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
const client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
{
// optional auth parameters.
}
);

let inputUri = 'gs://demomaker/cat.mp4';
let featuresElement = 'LABEL_DETECTION';
let features = [featuresElement];
let request = {
const inputUri = 'gs://demomaker/cat.mp4';
const featuresElement = 'LABEL_DETECTION';
const features = [featuresElement];
const request = {
inputUri: inputUri,
features: features,
};
Expand All @@ -36,8 +36,8 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
client
.annotateVideo(request)
.then(responses => {
let operation = responses[0];
let initialApiResponse = responses[1];
const operation = responses[0];
const initialApiResponse = responses[1];
console.log(operation);
console.log(initialApiResponse);

Expand All @@ -46,13 +46,13 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
})
.then(responses => {
// The final result of the operation.
let result = responses[0];
const result = responses[0];

// The metadata value of the completed operation.
let metadata = responses[1];
const metadata = responses[1];

// The response of the api call returning the complete operation.
let finalApiResponse = responses[2];
const finalApiResponse = responses[2];

console.log(result);
console.log(metadata);
Expand All @@ -65,16 +65,16 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
it('successfully makes a call to the service', done => {
const videoIntelligence = require('../src');

let client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
const client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
{
// optional auth parameters.
}
);

let inputUri = 'gs://demomaker/cat.mp4';
let featuresElement = 'LABEL_DETECTION';
let features = [featuresElement];
let request = {
const inputUri = 'gs://demomaker/cat.mp4';
const featuresElement = 'LABEL_DETECTION';
const features = [featuresElement];
const request = {
inputUri: inputUri,
features: features,
};
Expand All @@ -83,8 +83,8 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
client
.annotateVideo(request)
.then(responses => {
let operation = responses[0];
let initialApiResponse = responses[1];
const operation = responses[0];
const initialApiResponse = responses[1];

// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
Expand Down

0 comments on commit f3651ae

Please sign in to comment.