Skip to content

Commit

Permalink
Merge pull request #2 from GoogleCloudPlatform/linting
Browse files Browse the repository at this point in the history
Add linting.
  • Loading branch information
Jonathan Wayne Parrott committed Aug 17, 2015
2 parents 12847ce + 9e64759 commit 2142bc3
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
18 changes: 13 additions & 5 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"camelcase" : true,
"indent" : 2,
"strict" : true,
"globalstrict" : true,
"node" : true
"camelcase" : true,
"curly": true,
"eqeqeq": true,
"globalstrict": true,
"indent": 2,
"newcap": true,
"maxlen": 80,
"node": true,
"quotmark": "single",
"strict": true,
"trailing": true,
"undef": true,
"unused": true
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ install:
#Use '-q' to disable interactive prompts

script:
#Test and/or deploy your app with gcloud commands here!
- jshint --exclude-path=.gitignore .
1 change: 1 addition & 0 deletions cloud-storage/authSample.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* @fileoverview Sample code that grabs default credentials from the
* environment, then uses it to make an api call.
*/
'use strict';

var google = require('googleapis');

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"devDependencies": {
"mocha": "~2.2.5",
"jshint": "~2.8.0",
"lodash": "~3.10.1"
},
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions test/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../.jshintrc",
"mocha": true
}
9 changes: 5 additions & 4 deletions test/cloud-storage/testAuthSample.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/**
* @fileoverview Tests for the list-buckets module.
*/
'use strict';

var assert = require("assert");
var assert = require('assert');
var _ = require('lodash');

var authSample = require("../../cloud-storage/authSample");
var authSample = require('../../cloud-storage/authSample');

describe('listBuckets', function() {
it('returns a list of buckets', function (done) {
it('returns a list of buckets', function(done) {
authSample.listBuckets(
process.env.TEST_PROJECT_ID,
function(error, success) {
Expand All @@ -17,7 +18,7 @@ describe('listBuckets', function() {
} else {
assert(success.items.length > 0);
assert(_.find(success.items, function(item) {
return item.name == process.env.TEST_BUCKET_NAME;
return item.name === process.env.TEST_BUCKET_NAME;
}));
done();
}
Expand Down

0 comments on commit 2142bc3

Please sign in to comment.