Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Fix the linter #154

Merged
merged 2 commits into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"samples-test": "cd samples/ && npm link ../ && cd startup-script && npm link ../../ && cd ../ && npm test && cd ../",
"system-test": "mocha system-test/*.js --timeout 600000",
"test-no-cover": "mocha test/*.js",
"test": "npm run cover"
"test": "npm run cover",
"fix": "eslint --fix **/*.js && npm run prettier"
},
"dependencies": {
"@google-cloud/common": "^0.17.0",
Expand Down
2 changes: 1 addition & 1 deletion test/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Address', function() {
});

it('should inherit from ServiceObject', function(done) {
var regionInstance = extend({}, REGION, {
const regionInstance = extend({}, REGION, {
createAddress: {
bind: function(context) {
assert.strictEqual(context, regionInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/autoscaler.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Autoscaler', function() {
it('should inherit from ServiceObject', function() {
let createMethod = util.noop;

var zoneInstance = extend({}, ZONE, {
const zoneInstance = extend({}, ZONE, {
createAutoscaler: {
bind: function(context) {
assert.strictEqual(context, zoneInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/disk.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('Disk', function() {
});

it('should inherit from ServiceObject', function(done) {
var zoneInstance = extend({}, ZONE, {
const zoneInstance = extend({}, ZONE, {
createDisk: {
bind: function(context) {
assert.strictEqual(context, zoneInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/firewall.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Firewall', function() {
});

it('should inherit from ServiceObject', function() {
var computeInstance = extend({}, COMPUTE, {
const computeInstance = extend({}, COMPUTE, {
createFirewall: {
bind: function(context) {
assert.strictEqual(context, computeInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Image', function() {
});

it('should inherit from ServiceObject', function() {
var computeInstance = extend({}, COMPUTE, {
const computeInstance = extend({}, COMPUTE, {
createImage: {
bind: function(context) {
assert.strictEqual(context, computeInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/instance-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('InstanceGroup', function() {
it('should inherit from ServiceObject', function(done) {
let instanceGroup;

var zoneInstance = extend({}, ZONE, {
const zoneInstance = extend({}, ZONE, {
createInstanceGroup: {
bind: function(context) {
assert.strictEqual(context, zoneInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('Network', function() {
});

it('should inherit from ServiceObject', function(done) {
var computeInstance = extend({}, COMPUTE, {
const computeInstance = extend({}, COMPUTE, {
createNetwork: {
bind: function(context) {
assert.strictEqual(context, computeInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Service', function() {
it('should inherit from ServiceObject', function() {
let createMethod = util.noop;

var computeInstance = extend({}, COMPUTE, {
const computeInstance = extend({}, COMPUTE, {
createService: {
bind: function(context) {
assert.strictEqual(context, computeInstance);
Expand Down
2 changes: 1 addition & 1 deletion test/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('Snapshot', function() {
});

it('should allow creating for a Disk object snapshot', function(done) {
var scope = {
const scope = {
constructor: {
name: 'Disk',
},
Expand Down
2 changes: 1 addition & 1 deletion test/subnetwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Subnetwork', function() {
it('should inherit from ServiceObject', function() {
let createSubnetworkBound = {};

var regionInstance = extend({}, REGION, {
const regionInstance = extend({}, REGION, {
createSubnetwork: {
bind: function(context) {
assert.strictEqual(context, regionInstance);
Expand Down
11 changes: 5 additions & 6 deletions test/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('VM', function() {
});

it('should inherit from ServiceObject', function(done) {
var zoneInstance = extend({}, ZONE, {
const zoneInstance = extend({}, ZONE, {
createVM: {
bind: function(context) {
assert.strictEqual(context, zoneInstance);
Expand All @@ -150,7 +150,6 @@ describe('VM', function() {
});

describe('attachDisk', function() {
let CONFIG = {};
let EXPECTED_BODY;

beforeEach(function() {
Expand All @@ -162,12 +161,12 @@ describe('VM', function() {

it('should throw if a Disk object is not provided', function() {
assert.throws(function() {
vm.attachDisk('disk-3', CONFIG, assert.ifError);
vm.attachDisk('disk-3', {}, assert.ifError);
}, /A Disk object must be provided/);

assert.doesNotThrow(function() {
vm.request = util.noop;
vm.attachDisk(DISK, CONFIG, assert.ifError);
vm.attachDisk(DISK, {}, assert.ifError);
});
});

Expand All @@ -181,7 +180,7 @@ describe('VM', function() {
});

describe('options.readOnly', function() {
var CONFIG = extend({}, CONFIG, {readOnly: true});
const CONFIG = {readOnly: true};

it('should set the correct mode', function(done) {
let expectedBody = extend({}, EXPECTED_BODY, {mode: 'READ_ONLY'});
Expand Down Expand Up @@ -213,7 +212,7 @@ describe('VM', function() {
callback();
};

vm.attachDisk(DISK, CONFIG, done);
vm.attachDisk(DISK, {}, done);
});
});

Expand Down