Skip to content

Commit

Permalink
Enable no-var in eslint (#153)
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 120bded commit 60d8205
Show file tree
Hide file tree
Showing 40 changed files with 1,506 additions and 1,505 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-compute/.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
10 changes: 5 additions & 5 deletions packages/google-cloud-compute/src/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'use strict';

var common = require('@google-cloud/common');
var util = require('util');
let common = require('@google-cloud/common');
let util = require('util');

/**
* An Address object allows you to interact with a Google Compute Engine
Expand All @@ -37,7 +37,7 @@ var util = require('util');
* const address = region.address('address1');
*/
function Address(region, name) {
var methods = {
let methods = {
/**
* Create an address.
*
Expand Down Expand Up @@ -216,7 +216,7 @@ util.inherits(Address, common.ServiceObject);
Address.prototype.delete = function(callback) {
callback = callback || common.util.noop;

var region = this.region;
let region = this.region;

this.request(
{
Expand All @@ -229,7 +229,7 @@ Address.prototype.delete = function(callback) {
return;
}

var operation = region.operation(resp.name);
let operation = region.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down
14 changes: 7 additions & 7 deletions packages/google-cloud-compute/src/autoscaler.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'use strict';

var common = require('@google-cloud/common');
var util = require('util');
let common = require('@google-cloud/common');
let util = require('util');

/*! Developer Documentation
*
Expand All @@ -41,7 +41,7 @@ var util = require('util');
* const autoscaler = zone.autoscaler('autoscaler-name');
*/
function Autoscaler(zone, name) {
var methods = {
let methods = {
/**
* Create an autoscaler.
*
Expand Down Expand Up @@ -231,15 +231,15 @@ util.inherits(Autoscaler, common.ServiceObject);
Autoscaler.prototype.delete = function(callback) {
callback = callback || common.util.noop;

var zone = this.zone;
let zone = this.zone;

common.ServiceObject.prototype.delete.call(this, function(err, resp) {
if (err) {
callback(err, null, resp);
return;
}

var operation = zone.operation(resp.name);
let operation = zone.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down Expand Up @@ -283,7 +283,7 @@ Autoscaler.prototype.delete = function(callback) {
* });
*/
Autoscaler.prototype.setMetadata = function(metadata, callback) {
var zone = this.zone;
let zone = this.zone;

callback = callback || common.util.noop;

Expand All @@ -306,7 +306,7 @@ Autoscaler.prototype.setMetadata = function(metadata, callback) {
return;
}

var operation = zone.operation(resp.name);
let operation = zone.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down
26 changes: 13 additions & 13 deletions packages/google-cloud-compute/src/disk.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

'use strict';

var common = require('@google-cloud/common');
var extend = require('extend');
var format = require('string-format-obj');
var is = require('is');
var util = require('util');
let common = require('@google-cloud/common');
let extend = require('extend');
let format = require('string-format-obj');
let is = require('is');
let util = require('util');

var Snapshot = require('./snapshot.js');
let Snapshot = require('./snapshot.js');

/**
* A Disk object allows you to interact with a Google Compute Engine disk.
Expand All @@ -41,7 +41,7 @@ var Snapshot = require('./snapshot.js');
* const disk = zone.disk('disk1');
*/
function Disk(zone, name) {
var methods = {
let methods = {
/**
* Create a persistent disk.
*
Expand Down Expand Up @@ -261,8 +261,8 @@ Disk.formatName_ = function(zone, name) {
* });
*/
Disk.prototype.createSnapshot = function(name, options, callback) {
var self = this;
var zone = this.zone;
let self = this;
let zone = this.zone;

if (is.fn(options)) {
callback = options;
Expand All @@ -283,9 +283,9 @@ Disk.prototype.createSnapshot = function(name, options, callback) {
return;
}

var snapshot = self.snapshot(name);
let snapshot = self.snapshot(name);

var operation = zone.operation(resp.name);
let operation = zone.operation(resp.name);
operation.metadata = resp;

callback(null, snapshot, operation, resp);
Expand Down Expand Up @@ -324,7 +324,7 @@ Disk.prototype.createSnapshot = function(name, options, callback) {
* });
*/
Disk.prototype.delete = function(callback) {
var zone = this.zone;
let zone = this.zone;

callback = callback || common.util.noop;

Expand All @@ -334,7 +334,7 @@ Disk.prototype.delete = function(callback) {
return;
}

var operation = zone.operation(resp.name);
let operation = zone.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down
14 changes: 7 additions & 7 deletions packages/google-cloud-compute/src/firewall.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'use strict';

var common = require('@google-cloud/common');
var util = require('util');
let common = require('@google-cloud/common');
let util = require('util');

/**
* A Firewall object allows you to interact with a Google Compute Engine
Expand All @@ -36,7 +36,7 @@ var util = require('util');
* const firewall = compute.firewall('tcp-3000');
*/
function Firewall(compute, name) {
var methods = {
let methods = {
/**
* Create a firewall.
*
Expand Down Expand Up @@ -222,7 +222,7 @@ util.inherits(Firewall, common.ServiceObject);
* });
*/
Firewall.prototype.delete = function(callback) {
var compute = this.compute;
let compute = this.compute;

callback = callback || common.util.noop;

Expand All @@ -232,7 +232,7 @@ Firewall.prototype.delete = function(callback) {
return;
}

var operation = compute.operation(resp.name);
let operation = compute.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down Expand Up @@ -275,7 +275,7 @@ Firewall.prototype.delete = function(callback) {
* });
*/
Firewall.prototype.setMetadata = function(metadata, callback) {
var compute = this.compute;
let compute = this.compute;

callback = callback || common.util.noop;

Expand All @@ -295,7 +295,7 @@ Firewall.prototype.setMetadata = function(metadata, callback) {
return;
}

var operation = compute.operation(resp.name);
let operation = compute.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down
22 changes: 11 additions & 11 deletions packages/google-cloud-compute/src/health-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

'use strict';

var common = require('@google-cloud/common');
var extend = require('extend');
var is = require('is');
var util = require('util');
let common = require('@google-cloud/common');
let extend = require('extend');
let is = require('is');
let util = require('util');

/**
* Health checks ensure that Compute Engine forwards new connections only to
Expand All @@ -44,7 +44,7 @@ var util = require('util');
* const healthCheck = gce.healthCheck('health-check-name');
*/
function HealthCheck(compute, name, options) {
var methods = {
let methods = {
/**
* Create an HTTP or HTTPS health check.
*
Expand Down Expand Up @@ -167,7 +167,7 @@ function HealthCheck(compute, name, options) {

options = options || {};

var https = options.https;
let https = options.https;

/**
* The parent {@link Compute} instance of this {@link HealthCheck} instance.
Expand Down Expand Up @@ -231,7 +231,7 @@ util.inherits(HealthCheck, common.ServiceObject);
* });
*/
HealthCheck.prototype.delete = function(callback) {
var compute = this.compute;
let compute = this.compute;

callback = callback || common.util.noop;

Expand All @@ -241,7 +241,7 @@ HealthCheck.prototype.delete = function(callback) {
return;
}

var operation = compute.operation(resp.name);
let operation = compute.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down Expand Up @@ -286,19 +286,19 @@ HealthCheck.prototype.delete = function(callback) {
* });
*/
HealthCheck.prototype.setMetadata = function(metadata, callback) {
var compute = this.compute;
let compute = this.compute;

callback = callback || common.util.noop;

var setMetadata = common.ServiceObject.prototype.setMetadata;
let setMetadata = common.ServiceObject.prototype.setMetadata;

setMetadata.call(this, metadata, function(err, resp) {
if (err) {
callback(err, null, resp);
return;
}

var operation = compute.operation(resp.name);
let operation = compute.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-compute/src/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'use strict';

var common = require('@google-cloud/common');
var util = require('util');
let common = require('@google-cloud/common');
let util = require('util');

/**
* An Image object allows you to interact with a Google Compute Engine image.
Expand All @@ -35,7 +35,7 @@ var util = require('util');
* const image = compute.image('image-name');
*/
function Image(compute, name) {
var methods = {
let methods = {
/**
* Create an image.
*
Expand Down Expand Up @@ -194,7 +194,7 @@ util.inherits(Image, common.ServiceObject);
* });
*/
Image.prototype.delete = function(callback) {
var compute = this.parent;
let compute = this.parent;

callback = callback || common.util.noop;

Expand All @@ -204,7 +204,7 @@ Image.prototype.delete = function(callback) {
return;
}

var operation = compute.operation(resp.name);
let operation = compute.operation(resp.name);
operation.metadata = resp;

callback(null, operation, resp);
Expand Down
Loading

0 comments on commit 60d8205

Please sign in to comment.