Adds liniting into the workflow (#3082)

* initial linting of src

* fix indent to 2 spaces

* Removes unnecessary rules

* ignore spec folder for now

* Spec linting

* Fix spec indent

* nits

* nits

* no no-empty rule
This commit is contained in:
Florent Vilmart
2016-11-24 15:47:41 -05:00
committed by GitHub
parent 6e2fba4ae4
commit 8c2c76dd26
149 changed files with 3478 additions and 3507 deletions

View File

@@ -1,5 +1,4 @@
import PromiseRouter from '../PromiseRouter';
import UserController from '../Controllers/UserController';
import Config from '../Config';
import express from 'express';
import path from 'path';
@@ -46,7 +45,7 @@ export class PublicAPIRouter extends PromiseRouter {
});
}
// Should we keep the file in memory or leave like that?
fs.readFile(path.resolve(views, "choose_password"), 'utf-8', (err, data) => {
fs.readFile(path.resolve(views, "choose_password"), 'utf-8', (err, data) => {
if (err) {
return reject(err);
}
@@ -72,7 +71,7 @@ export class PublicAPIRouter extends PromiseRouter {
return this.invalidLink(req);
}
return config.userController.checkResetTokenValidity(username, token).then( (user) => {
return config.userController.checkResetTokenValidity(username, token).then( () => {
let params = qs.stringify({token, id: config.applicationId, username, app: config.appName, });
return Promise.resolve({
status: 302,
@@ -101,7 +100,7 @@ export class PublicAPIRouter extends PromiseRouter {
return this.invalidLink(req);
}
return config.userController.updatePassword(username, token, new_password).then((result) => {
return config.userController.updatePassword(username, token, new_password).then(() => {
let params = qs.stringify({username: username});
return Promise.resolve({
status: 302,
@@ -119,8 +118,8 @@ export class PublicAPIRouter extends PromiseRouter {
invalidLink(req) {
return Promise.resolve({
status: 302,
location: req.config.invalidLinkURL
status: 302,
location: req.config.invalidLinkURL
});
}