chore(deps): upgrade eslint, prettier & related packages
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
0a53a1d7f0
commit
6c91f81b0e
@@ -8,8 +8,8 @@ import {
|
||||
} from '../../server/utils/auth';
|
||||
|
||||
const log = debug('fcc:models:UserCredential');
|
||||
module.exports = function(UserCredential) {
|
||||
UserCredential.link = function(
|
||||
module.exports = function (UserCredential) {
|
||||
UserCredential.link = function (
|
||||
userId,
|
||||
_provider,
|
||||
authScheme,
|
||||
|
||||
@@ -14,12 +14,12 @@ export function ensureLowerCaseEmail(profile) {
|
||||
: '';
|
||||
}
|
||||
|
||||
export default function(UserIdent) {
|
||||
export default function (UserIdent) {
|
||||
UserIdent.on('dataSourceAttached', () => {
|
||||
UserIdent.findOne$ = observeMethod(UserIdent, 'findOne');
|
||||
});
|
||||
|
||||
UserIdent.login = function(
|
||||
UserIdent.login = function (
|
||||
_provider,
|
||||
authScheme,
|
||||
profile,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Observable } from 'rx';
|
||||
|
||||
export default function(Block) {
|
||||
export default function (Block) {
|
||||
Block.on('dataSourceAttached', () => {
|
||||
Block.findOne$ = Observable.fromNodeCallback(Block.findOne, Block);
|
||||
Block.findById$ = Observable.fromNodeCallback(Block.findById, Block);
|
||||
|
||||
@@ -152,7 +152,7 @@ function populateRequiredFields(user) {
|
||||
return;
|
||||
}
|
||||
|
||||
export default function(User) {
|
||||
export default function (User) {
|
||||
// set salt factor for passwords
|
||||
User.settings.saltWorkFactor = 5;
|
||||
// set user.rand to random number
|
||||
@@ -180,7 +180,7 @@ export default function(User) {
|
||||
);
|
||||
});
|
||||
|
||||
User.observe('before save', function(ctx) {
|
||||
User.observe('before save', function (ctx) {
|
||||
const beforeCreate = Observable.of(ctx)
|
||||
.filter(({ isNewInstance }) => isNewInstance)
|
||||
// User.create
|
||||
@@ -229,7 +229,7 @@ export default function(User) {
|
||||
});
|
||||
|
||||
// remove lingering user identities before deleting user
|
||||
User.observe('before delete', function(ctx, next) {
|
||||
User.observe('before delete', function (ctx, next) {
|
||||
const UserIdentity = User.app.models.UserIdentity;
|
||||
const UserCredential = User.app.models.UserCredential;
|
||||
log('removing user', ctx.where);
|
||||
@@ -240,21 +240,21 @@ export default function(User) {
|
||||
return Observable.combineLatest(
|
||||
destroyAll(id, UserIdentity),
|
||||
destroyAll(id, UserCredential),
|
||||
function(identData, credData) {
|
||||
function (identData, credData) {
|
||||
return {
|
||||
identData: identData,
|
||||
credData: credData
|
||||
};
|
||||
}
|
||||
).subscribe(
|
||||
function(data) {
|
||||
function (data) {
|
||||
log('deleted', data);
|
||||
},
|
||||
function(err) {
|
||||
function (err) {
|
||||
log('error deleting user %s stuff', id, err);
|
||||
next(err);
|
||||
},
|
||||
function() {
|
||||
function () {
|
||||
log('user stuff deleted for user %s', id);
|
||||
next();
|
||||
}
|
||||
@@ -263,7 +263,7 @@ export default function(User) {
|
||||
|
||||
log('setting up user hooks');
|
||||
// overwrite lb confirm
|
||||
User.confirm = function(uid, token, redirectTo) {
|
||||
User.confirm = function (uid, token, redirectTo) {
|
||||
return this.findById(uid).then(user => {
|
||||
if (!user) {
|
||||
throw wrapHandledError(new Error(`User not found: ${uid}`), {
|
||||
@@ -339,7 +339,7 @@ export default function(User) {
|
||||
);
|
||||
};
|
||||
|
||||
User.afterRemote('logout', function({ req, res }, result, next) {
|
||||
User.afterRemote('logout', function ({ req, res }, result, next) {
|
||||
removeCookies(req, res);
|
||||
next();
|
||||
});
|
||||
@@ -802,7 +802,7 @@ export default function(User) {
|
||||
...user,
|
||||
about: showAbout ? about : '',
|
||||
calendar: showHeatMap ? calendar : {},
|
||||
completedChallenges: (function() {
|
||||
completedChallenges: (function () {
|
||||
if (showTimeLine) {
|
||||
return showCerts
|
||||
? completedChallenges
|
||||
|
||||
Reference in New Issue
Block a user