Skip to content

Commit

Permalink
Apply eslint and prettier linter
Browse files Browse the repository at this point in the history
  • Loading branch information
fhinkel committed Nov 14, 2018
1 parent 48a8867 commit c1c3e5e
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 11 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
appengine/loopback/*
functions/**
iot/*
appengine/parse-server/cloud/main.js
3 changes: 1 addition & 2 deletions appengine/building-an-app/update/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "1.4.17",
"ava": "0.25.0",
"semistandard": "^12.0.1"
"ava": "0.25.0"
}
}
5 changes: 4 additions & 1 deletion appengine/cloudsql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0"
"ava": "0.25.0",
"proxyquire": "^2.1.0",
"sinon": "^7.1.1",
"supertest": "^3.3.0"
},
"cloud-repo-tools": {
"requiresKeyFile": true,
Expand Down
5 changes: 4 additions & 1 deletion appengine/cloudsql_postgresql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0"
"ava": "0.25.0",
"proxyquire": "^2.1.0",
"sinon": "^7.1.1",
"supertest": "^3.3.0"
},
"cloud-repo-tools": {
"requiresKeyFile": true,
Expand Down
5 changes: 4 additions & 1 deletion appengine/endpoints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0"
"ava": "0.25.0",
"proxyquire": "^2.1.0",
"sinon": "^7.1.1",
"supertest": "^3.3.0"
}
}
2 changes: 1 addition & 1 deletion appengine/errorreporting/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ app.get('/', (req, res, next) => {
next(new Error('something is wrong!'));
});

app.use((err, req, res, next) => {
app.use((err, req, res) => {
errors.report(err);
res.status(500).send(err.message || 'Something broke!');
});
Expand Down
3 changes: 2 additions & 1 deletion appengine/errorreporting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"ava": "0.25.0",
"proxyquire": "2.0.0",
"sinon": "4.4.2"
"sinon": "4.4.2",
"supertest": "^3.3.0"
},
"cloud-repo-tools": {
"test": {
Expand Down
3 changes: 3 additions & 0 deletions appengine/storage/flexible/system-test/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
no-empty: off
2 changes: 1 addition & 1 deletion appengine/storage/flexible/system-test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const requestObj = utils.getRequest({cwd: cwd});

test.before(async () => {
utils.checkCredentials();
await bucket.create(bucket).then(data => {
await bucket.create(bucket).then(() => {
return bucket.acl.add({
entity: 'allUsers',
role: Storage.acl.READER_ROLE,
Expand Down
3 changes: 3 additions & 0 deletions appengine/storage/standard/system-test/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
no-empty: off
2 changes: 1 addition & 1 deletion appengine/storage/standard/system-test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const requestObj = utils.getRequest({cwd: cwd});

test.before(async () => {
utils.checkCredentials();
await bucket.create(bucket).then(data => {
await bucket.create(bucket).then(() => {
return bucket.acl.add({
entity: 'allUsers',
role: Storage.acl.READER_ROLE,
Expand Down
2 changes: 1 addition & 1 deletion appengine/system-test/all.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var sampleTests = [
msg: 'Hello World! Express.js + Grunt.js on Google App Engine.',
TRAVIS_NODE_VERSION: '0.12',
},
// TODO: Investigate flaky test
// Investigate flaky test
// {
// dir: 'appengine/loopback',
// cmd: 'node',
Expand Down
4 changes: 3 additions & 1 deletion appengine/twilio/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ if (!TWILIO_NUMBER) {
console.log(
'Please configure environment variables as described in README.md'
);
process.exit(1);
throw new Error(
'Please configure environment variables as described in README.md'
);
}

const twilio = require('twilio')(
Expand Down
3 changes: 3 additions & 0 deletions appengine/uglifyjs/static/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
env:
browser: true

0 comments on commit c1c3e5e

Please sign in to comment.