// jscs:disable requireMultipleVarDecl

'use strict';

var Promise = require('bluebird'),
    StorageBase = require('ghost-storage-base'),
    imgur = require('imgur');

class ImgurStore extends StorageBase {
    constructor() {
        super();
    }

    save(image) {
      // TODO: save delete url
      return new Promise(function(resolve, reject) {
        imgur.uploadFile(image.path)
          .then(function(json) {
            if(!json || !json.data || !json.data.link) return reject();
            resolve(json.data.link);
          })
          .catch(reject);
      });
    }

    exists(fileName, targetDir) {
      // TODO: check file status
      return new Promise(function(resolve) {
        resolve(true);
      });
    }

    serve() {
      return function customServe(req, res, next) {
        next();
      }
    }

    delete() {
      return Promise.reject('not implemented');
    }

    read(options) {
    }
}

module.exports = ImgurStore;

// jscs:disable requireMultipleVarDecl

'use strict';

var Promise = require('bluebird'),
    BaseStorage = require('ghost-storage-base'),
    imgur = require('imgur');

class ImgurStorage extends BaseStorage {
    constructor() {
        super();
    }

    save(image) {
      // TODO: save delete url
      return imgur.uploadFile(image.path)
        .then(function(json) {
          return json.data.link;
        })
        .catch(function(err) {
          return Promise.reject(err.message);
        });
    }

    exists(fileName, targetDir) {
      // TODO: check file status
      return Promise.resolve(true);
    }

    serve() {
      return function(req, res, next) {
        next();
      };
    }

    delete() {
      return Promise.reject('not implemented');
    }

    read(options) {
    }
}

module.exports = ImgurStorage;
Remove extraneous statements, use new class name
Remove extraneous statements, use new class name
