Skip to content

Commit f83fa71

Browse files
JustinBeckwithalexander-fenster
authored andcommitted
Enable no-var in eslint (#101)
1 parent f32efb4 commit f83fa71

2 files changed

Lines changed: 31 additions & 24 deletions

File tree

packages/google-cloud-videointelligence/.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ rules:
1111
block-scoped-var: error
1212
eqeqeq: error
1313
no-warning-comments: warn
14+
no-var: error

packages/google-cloud-videointelligence/system-test/video_intelligence_service_smoke_test.js

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,26 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
1818
it('successfully makes a call to the service', done => {
1919
const videoIntelligence = require('../src');
2020

21-
var client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient({
22-
// optional auth parameters.
23-
});
24-
25-
var inputUri = 'gs://demomaker/cat.mp4';
26-
var featuresElement = 'LABEL_DETECTION';
27-
var features = [featuresElement];
28-
var request = {
21+
let client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
22+
{
23+
// optional auth parameters.
24+
}
25+
);
26+
27+
let inputUri = 'gs://demomaker/cat.mp4';
28+
let featuresElement = 'LABEL_DETECTION';
29+
let features = [featuresElement];
30+
let request = {
2931
inputUri: inputUri,
3032
features: features,
3133
};
3234

3335
// Handle the operation using the promise pattern.
34-
client.annotateVideo(request)
36+
client
37+
.annotateVideo(request)
3538
.then(responses => {
36-
var operation = responses[0];
37-
var initialApiResponse = responses[1];
39+
let operation = responses[0];
40+
let initialApiResponse = responses[1];
3841
console.log(operation);
3942
console.log(initialApiResponse);
4043

@@ -43,13 +46,13 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
4346
})
4447
.then(responses => {
4548
// The final result of the operation.
46-
var result = responses[0];
49+
let result = responses[0];
4750

4851
// The metadata value of the completed operation.
49-
var metadata = responses[1];
52+
let metadata = responses[1];
5053

5154
// The response of the api call returning the complete operation.
52-
var finalApiResponse = responses[2];
55+
let finalApiResponse = responses[2];
5356

5457
console.log(result);
5558
console.log(metadata);
@@ -62,23 +65,26 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
6265
it('successfully makes a call to the service', done => {
6366
const videoIntelligence = require('../src');
6467

65-
var client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient({
66-
// optional auth parameters.
67-
});
68+
let client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
69+
{
70+
// optional auth parameters.
71+
}
72+
);
6873

69-
var inputUri = 'gs://demomaker/cat.mp4';
70-
var featuresElement = 'LABEL_DETECTION';
71-
var features = [featuresElement];
72-
var request = {
74+
let inputUri = 'gs://demomaker/cat.mp4';
75+
let featuresElement = 'LABEL_DETECTION';
76+
let features = [featuresElement];
77+
let request = {
7378
inputUri: inputUri,
7479
features: features,
7580
};
7681

7782
// Handle the operation using the event emitter pattern.
78-
client.annotateVideo(request)
83+
client
84+
.annotateVideo(request)
7985
.then(responses => {
80-
var operation = responses[0];
81-
var initialApiResponse = responses[1];
86+
let operation = responses[0];
87+
let initialApiResponse = responses[1];
8288

8389
// Adding a listener for the "complete" event starts polling for the
8490
// completion of the operation.

0 commit comments

Comments
 (0)