Skip to content

Commit

Permalink
Enable no-var in eslint (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and alexander-fenster committed Sep 18, 2018
1 parent f6a35a7 commit 21630ef
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 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 @@ -11,3 +11,4 @@ rules:
block-scoped-var: error
eqeqeq: error
no-warning-comments: warn
no-var: error
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,26 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
it('successfully makes a call to the service', done => {
const videoIntelligence = require('../src');

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

var inputUri = 'gs://demomaker/cat.mp4';
var featuresElement = 'LABEL_DETECTION';
var features = [featuresElement];
var request = {
let client = new videoIntelligence.v1p1beta1.VideoIntelligenceServiceClient(
{
// optional auth parameters.
}
);

let inputUri = 'gs://demomaker/cat.mp4';
let featuresElement = 'LABEL_DETECTION';
let features = [featuresElement];
let request = {
inputUri: inputUri,
features: features,
};

// Handle the operation using the promise pattern.
client.annotateVideo(request)
client
.annotateVideo(request)
.then(responses => {
var operation = responses[0];
var initialApiResponse = responses[1];
let operation = responses[0];
let initialApiResponse = responses[1];
console.log(operation);
console.log(initialApiResponse);

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

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

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

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

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

var inputUri = 'gs://demomaker/cat.mp4';
var featuresElement = 'LABEL_DETECTION';
var features = [featuresElement];
var request = {
let inputUri = 'gs://demomaker/cat.mp4';
let featuresElement = 'LABEL_DETECTION';
let features = [featuresElement];
let request = {
inputUri: inputUri,
features: features,
};

// Handle the operation using the event emitter pattern.
client.annotateVideo(request)
client
.annotateVideo(request)
.then(responses => {
var operation = responses[0];
var initialApiResponse = responses[1];
let operation = responses[0];
let initialApiResponse = responses[1];

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

0 comments on commit 21630ef

Please sign in to comment.