More lint tweaking (#3164)

1. Add no space in paren rule
2. fix spec/eslintrc.json so it allow for inheriting from root rc.

Because the spce rc specified reccomended, it "turned off" all of the
rule tweaks in the root.  This fixes that.
This commit is contained in:
Arthur Cinader
2016-12-02 16:11:54 -08:00
committed by Florent Vilmart
parent b9afccd338
commit a270632570
19 changed files with 51 additions and 56 deletions

View File

@@ -4,7 +4,7 @@ import * as middleware from "../middlewares";
export class HooksRouter extends PromiseRouter {
createHook(aHook, config) {
return config.hooksController.createHook(aHook).then( (hook) => ({response: hook}));
return config.hooksController.createHook(aHook).then((hook) => ({response: hook}));
}
updateHook(aHook, config) {
@@ -18,7 +18,7 @@ export class HooksRouter extends PromiseRouter {
handleGetFunctions(req) {
var hooksController = req.config.hooksController;
if (req.params.functionName) {
return hooksController.getFunction(req.params.functionName).then( (foundFunction) => {
return hooksController.getFunction(req.params.functionName).then((foundFunction) => {
if (!foundFunction) {
throw new Parse.Error(143, `no function named: ${req.params.functionName} is defined`);
}

View File

@@ -88,13 +88,13 @@ export class IAPValidationRouter extends PromiseRouter {
return Promise.resolve({response: appStoreError(error.status) });
}
return validateWithAppStore(IAP_PRODUCTION_URL, receipt).then( () => {
return validateWithAppStore(IAP_PRODUCTION_URL, receipt).then(() => {
return successCallback();
}, (error) => {
if (error.status == 21007) {
return validateWithAppStore(IAP_SANDBOX_URL, receipt).then( () => {
return validateWithAppStore(IAP_SANDBOX_URL, receipt).then(() => {
return successCallback();
}, (error) => {
return errorCallback(error);

View File

@@ -24,7 +24,7 @@ export class PublicAPIRouter extends PromiseRouter {
}
let userController = config.userController;
return userController.verifyEmail(username, token).then( () => {
return userController.verifyEmail(username, token).then(() => {
let params = qs.stringify({username});
return Promise.resolve({
status: 302,
@@ -71,7 +71,7 @@ export class PublicAPIRouter extends PromiseRouter {
return this.invalidLink(req);
}
return config.userController.checkResetTokenValidity(username, token).then( () => {
return config.userController.checkResetTokenValidity(username, token).then(() => {
let params = qs.stringify({token, id: config.applicationId, username, app: config.appName, });
return Promise.resolve({
status: 302,