Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

Commit

Permalink
Upgrade eslint & standard and fix linting accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Mar 18, 2016
1 parent e577345 commit c475f49
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Expand Up @@ -3,8 +3,5 @@
"env": {
"browser": false,
"node": true
},
"globals": {
"window": false
}
}
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -24,9 +24,9 @@
"license": "ISC",
"homepage": "https://github.com/transloadit/uppy-server#readme",
"devDependencies": {
"eslint": "1.10.3",
"eslint-config-standard": "4.4.0",
"eslint-plugin-standard": "1.3.1",
"eslint": "2.4.0",
"eslint-config-standard": "5.1.0",
"eslint-plugin-standard": "1.3.2",
"frey": "0.3.7",
"fakefile": "0.0.8",
"nodemon": "1.8.1"
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/drive/get.js
Expand Up @@ -8,7 +8,7 @@ var clientSecret = config.drive.secret
var redirectUrl = config.server.url + config.drive.callback

module.exports = function () {
return function *(next) {
return function * (next) {
var service = google.drive('v2')
var auth = new GoogleAuth()

Expand Down
2 changes: 1 addition & 1 deletion server/controllers/drive/list.js
Expand Up @@ -7,7 +7,7 @@ var clientSecret = config.drive.secret
var redirectUrl = config.server.url + config.drive.callback

module.exports = function () {
return function *(next) {
return function * (next) {
var service = google.drive('v2')
var auth = new GoogleAuth()

Expand Down
2 changes: 1 addition & 1 deletion server/controllers/dropbox/auth.js
Expand Up @@ -3,7 +3,7 @@ var config = require('../../../config/auth')
var callback = config.server.protocol + '://' + config.server.host + config.dropbox.callback

module.exports = function () {
return function *(next) {
return function * (next) {
if (!this.session.dropbox) {
this.session.dropbox = {}
}
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/dropbox/fetch.js
@@ -1,6 +1,6 @@
// var request = require('request')

module.exports = function () {
return function *(next) {
return function * (next) {
}
}
2 changes: 1 addition & 1 deletion server/controllers/dropbox/readdir.js
@@ -1,5 +1,5 @@
module.exports = function () {
return function *(next) {
return function * (next) {
var dir = 'todo' // @todo Where is dir coming from?
this.session.dropbox.client.readdir(dir, (error, entries, stat, statFiles) => {
if (error) {
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/google/callback.js
@@ -1,4 +1,4 @@
module.exports = function *(next) {
module.exports = function * (next) {
this.session.google.token = this.query.access_token
this.body = this.session.google
}
2 changes: 1 addition & 1 deletion server/controllers/google/get.js
@@ -1,6 +1,6 @@
var fs = require('fs')

module.exports = function *(next) {
module.exports = function * (next) {
var Purest = require('purest')
var google = new Purest({provider: 'google', api: 'drive'})
yield function listFiles (cb) {
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/google/list.js
@@ -1,4 +1,4 @@
module.exports = function *(next) {
module.exports = function * (next) {
var self = this
var Purest = require('purest')
var google = new Purest({provider: 'google', api: 'drive'})
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/google/logout.js
@@ -1,3 +1,3 @@
module.exports = function *(next) {
module.exports = function * (next) {
this.session.google.token = null
}
2 changes: 1 addition & 1 deletion server/controllers/redirect.js
Expand Up @@ -5,7 +5,7 @@ var protocol = config.server.protocol
var host = config.server.host

module.exports = function (opts) {
return function *(next) {
return function * (next) {
this.redirect(config.dropbox.authURI + '?response_type=code&client_id=' + config.dropbox.key + '&redirect_uri=' + protocol + '://' + host + config.dropbox.callback)
}
}
2 changes: 1 addition & 1 deletion server/routes/google.js
Expand Up @@ -2,7 +2,7 @@ var router = require('koa-router')({ prefix: '/google' })
var handlers = require('../controllers/google')

module.exports = function (app) {
router.use('/', function *(next) {
router.use('/', function * (next) {
if (!this.session.google) {
this.session.google = {}
}
Expand Down

0 comments on commit c475f49

Please sign in to comment.