Enable prefer-const lint rule (#3202)
This commit is contained in:
committed by
Florent Vilmart
parent
a6c988176e
commit
ca286b7108
@@ -57,11 +57,11 @@ function authDataValidator(adapter, appIds, options) {
|
||||
|
||||
module.exports = function(authOptions = {}, enableAnonymousUsers = true) {
|
||||
let _enableAnonymousUsers = enableAnonymousUsers;
|
||||
let setEnableAnonymousUsers = function(enable) {
|
||||
const setEnableAnonymousUsers = function(enable) {
|
||||
_enableAnonymousUsers = enable;
|
||||
}
|
||||
// To handle the test cases on configuration
|
||||
let getValidatorForProvider = function(provider) {
|
||||
const getValidatorForProvider = function(provider) {
|
||||
|
||||
if (provider === 'anonymous' && !_enableAnonymousUsers) {
|
||||
return;
|
||||
|
||||
@@ -28,7 +28,7 @@ function validateAppId() {
|
||||
|
||||
function handleMultipleConfigurations(authData, options) {
|
||||
if (Array.isArray(options)) {
|
||||
let consumer_key = authData.consumer_key;
|
||||
const consumer_key = authData.consumer_key;
|
||||
if (!consumer_key) {
|
||||
logger.error('Twitter Auth', 'Multiple twitter configurations are available, by no consumer_key was sent by the client.');
|
||||
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Twitter auth is invalid for this user.');
|
||||
|
||||
Reference in New Issue
Block a user