Skip to content

Commit

Permalink
Eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneEveritt committed Aug 15, 2017
1 parent e42a41b commit 74b652a
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Ignore lib folder since those files are compiled by babel
lib/*.js

# Ignore JSON Files
**/*.json

src/services/**/*.js
node_modules
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- "8"
- "7"
- "6"
env:
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"start": "node src/index.js | node_modules/bunyan/bin/bunyan -o short",
"test": "./node_modules/eslint/bin/eslint.js --quiet --config .eslintrc --ignore-path src/services/*/* src/* scripts/*",
"test": "./node_modules/eslint/bin/eslint.js --quiet --config .eslintrc src scripts",
"configure": "node scripts/configure.js",
"diagnostics": "node scripts/diagnostics.js"
},
Expand Down Expand Up @@ -66,5 +66,8 @@
"socket.io": "2.0.3",
"socketio-file-upload": "0.6.0",
"yargs": "8.0.2"
},
"pkg": {
"scripts": "src/**/*.js"
}
}
1 change: 0 additions & 1 deletion src/controllers/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const Config = new ConfigHelper();
const SFTP = new SFTPController();

class Builder {

constructor(json) {
if (!json || !_.isObject(json) || json === null || !_.keys(json).length) {
throw new Error('Invalid JSON was passed to Builder.');
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Delete {
const Servers = rfr('src/helpers/initialize.js').Servers;

// Prevent crash detection
if (! _.isUndefined(Servers[this.json.uuid]) && _.isFunction(Servers[this.json.uuid].setStatus)) {
if (!_.isUndefined(Servers[this.json.uuid]) && _.isFunction(Servers[this.json.uuid].setStatus)) {
Servers[this.json.uuid].setStatus(Status.OFF);
}

Expand Down
1 change: 0 additions & 1 deletion src/controllers/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const Async = require('async');
const Util = require('util');
const _ = require('lodash');
const Carrier = require('carrier');
const Fs = require('fs-extra');

const Log = rfr('src/helpers/logger.js');
const Status = rfr('src/helpers/status.js');
Expand Down
1 change: 0 additions & 1 deletion src/controllers/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const DockerController = new Dockerode({
const NETWORK_NAME = Config.get('docker.network.name', 'pterodactyl_nw');

class Network {

// Initalization Sequence for Networking
// Called when Daemon boots.
init(next) {
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const SFTP = new SFTPController();
const Config = new ConfigHelper();

class Server extends EventEmitter {

constructor(json, next) {
super();

Expand Down Expand Up @@ -748,7 +747,6 @@ class Server extends EventEmitter {
},
], next);
}

}

module.exports = Server;
2 changes: 0 additions & 2 deletions src/helpers/fileparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const ConfigHelper = rfr('src/helpers/config.js');
const Config = new ConfigHelper();

class FileParser {

constructor(server) {
this.server = server;
}
Expand Down Expand Up @@ -252,7 +251,6 @@ class FileParser {
},
], next);
}

}

module.exports = FileParser;
1 change: 0 additions & 1 deletion src/helpers/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const DockerController = new Dockerode({
});

class DockerImage {

/**
* Determines if an image exists.
* @return boolean
Expand Down
1 change: 0 additions & 1 deletion src/helpers/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const Server = rfr('src/controllers/server.js');
const Servers = {};

class Initialize {

/**
* Initializes all servers on the system and loads them into memory for NodeJS.
* @param {Function} next [description]
Expand Down
1 change: 0 additions & 1 deletion src/helpers/responses.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class Responses {
'type': this.req.contentType,
});
}

}

module.exports = Responses;
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const compareVersions = require('compare-versions');
const Fs = require('fs-extra');
const _ = require('lodash');

const Docker = rfr('src/controllers/docker.js');
const Log = rfr('src/helpers/logger.js');
const Package = rfr('package.json');

Expand Down Expand Up @@ -168,7 +167,7 @@ Async.auto({
if (_.isString(results.check_version)) {
Log.info(results.check_version);
} else if (_.isArray(results.check_version)) {
_.each(results.check_version, line => { Log.warn(line); });
_.forEach(results.check_version, line => { Log.warn(line); });
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/middleware/authorizable.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class AuthorizationMiddleware {
allServers() {
return Servers;
}

}

module.exports = AuthorizationMiddleware;
1 change: 0 additions & 1 deletion src/services/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ class Core {
}
});
}

}

module.exports = Core;

0 comments on commit 74b652a

Please sign in to comment.