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:
committed by
Florent Vilmart
parent
b9afccd338
commit
a270632570
@@ -258,7 +258,7 @@ const buildWhereClause = ({ schema, query, index }) => {
|
||||
let allowNull = false;
|
||||
values.push(fieldName);
|
||||
fieldValue.$in.forEach((listElem, listIndex) => {
|
||||
if (listElem === null ) {
|
||||
if (listElem === null) {
|
||||
allowNull = true;
|
||||
} else {
|
||||
values.push(listElem);
|
||||
|
||||
@@ -131,7 +131,7 @@ export class Config {
|
||||
throw 'passwordPolicy.validatorPattern must be a RegExp.';
|
||||
}
|
||||
|
||||
if(passwordPolicy.validatorCallback && typeof passwordPolicy.validatorCallback !== 'function' ) {
|
||||
if(passwordPolicy.validatorCallback && typeof passwordPolicy.validatorCallback !== 'function') {
|
||||
throw 'passwordPolicy.validatorCallback must be a function.';
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ export class AdaptableController {
|
||||
}
|
||||
|
||||
// Makes sure the prototype matches
|
||||
let mismatches = Object.getOwnPropertyNames(Type.prototype).reduce( (obj, key) => {
|
||||
let mismatches = Object.getOwnPropertyNames(Type.prototype).reduce((obj, key) => {
|
||||
const adapterType = typeof adapter[key];
|
||||
const expectedType = typeof Type.prototype[key];
|
||||
if (adapterType !== expectedType) {
|
||||
|
||||
@@ -305,7 +305,7 @@ class ParseServer {
|
||||
//This causes tests to spew some useless warnings, so disable in test
|
||||
if (!process.env.TESTING) {
|
||||
process.on('uncaughtException', (err) => {
|
||||
if ( err.code === "EADDRINUSE" ) { // user-friendly message for this common error
|
||||
if (err.code === "EADDRINUSE") { // user-friendly message for this common error
|
||||
/* eslint-disable no-console */
|
||||
console.error(`Unable to listen on port ${err.port}. The port is already in use.`);
|
||||
/* eslint-enable no-console */
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -118,7 +118,7 @@ OAuth.nonce = function(){
|
||||
var text = "";
|
||||
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
|
||||
for( var i=0; i < 30; i++ )
|
||||
for(var i=0; i < 30; i++)
|
||||
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
||||
|
||||
return text;
|
||||
|
||||
@@ -25,7 +25,7 @@ function validateAuthData(authData, params) {
|
||||
function vkOAuth2Request(params) {
|
||||
var promise = new Parse.Promise();
|
||||
return promise.then(function(){
|
||||
if (!params || !params.appIds || !params.appIds.length || !params.appSecret || !params.appSecret.length ) {
|
||||
if (!params || !params.appIds || !params.appIds.length || !params.appSecret || !params.appSecret.length) {
|
||||
logger.error('Vk Auth', 'Vk auth is not configured. Missing appIds or appSecret.');
|
||||
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Vk auth is not configured. Missing appIds or appSecret.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user