Merge pull request #3470 from overleaf/eslint

Upgrade and configure ESLint

GitOrigin-RevId: ad5aeaf85e72c847a125ff3a9db99a12855e38aa
This commit is contained in:
Alf Eaton
2020-12-16 03:08:28 +00:00
committed by Copybot
parent 1fcf94c3b9
commit 2ff1cf43d6
264 changed files with 3356 additions and 6520 deletions
@@ -42,11 +42,7 @@ async function syncUserEntitlements(userEntitlements, cachedEntitlements) {
cachedEntitlment.hasEntitlement !== samlIdentifier.hasEntitlement
) {
console.log(
`cached entitlement mismatch for user ${
userEntitlement.userId
} mongo(${samlIdentifier.hasEntitlement}) postgres(${
cachedEntitlment.hasEntitlement
})`
`cached entitlement mismatch for user ${userEntitlement.userId} mongo(${samlIdentifier.hasEntitlement}) postgres(${cachedEntitlment.hasEntitlement})`
)
await syncUserEntitlement(
userEntitlement.userId,
@@ -80,9 +76,7 @@ async function syncUserEntitlements(userEntitlements, cachedEntitlements) {
)
if (!email) {
console.log(
`missing email entry for samlIdentifier for user ${
userEntitlement.userId
}`
`missing email entry for samlIdentifier for user ${userEntitlement.userId}`
)
}
}
@@ -103,9 +97,7 @@ async function syncUserEntitlements(userEntitlements, cachedEntitlements) {
)
if (!samlIdentifier || !samlIdentifier.hasEntitlement) {
console.log(
`cached entitlement mismatch for user ${
userEntitlement.userId
} mongo(false) postgres(true)`
`cached entitlement mismatch for user ${userEntitlement.userId} mongo(false) postgres(true)`
)
await syncUserEntitlement(
userEntitlement.userId,
@@ -118,9 +110,7 @@ async function syncUserEntitlements(userEntitlements, cachedEntitlements) {
// entitlements were not exported
else {
console.log(
`missing cached entitlement in mongo for user ${
cachedEntitlment.userId
}`
`missing cached entitlement in mongo for user ${cachedEntitlment.userId}`
)
}
}
@@ -138,9 +128,7 @@ async function syncUserEntitlement(userId, email, hasEntitlement) {
}
} catch (err) {
console.error(
`error setting entitlement: ${userId}, ${email}, ${hasEntitlement} - ${
err.message
}`
`error setting entitlement: ${userId}, ${email}, ${hasEntitlement} - ${err.message}`
)
}
}