1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-20 13:49:43 +02:00

Move from prettier-eslint to eslint-plugin-prettier, update dependencies

This commit is contained in:
Maksim Eltyshev 2020-02-03 18:42:31 +05:00
parent f0e7fb8fd1
commit 9c7c96a780
254 changed files with 5539 additions and 5170 deletions

View file

@ -10,9 +10,10 @@ module.exports = {
},
values: {
type: 'json',
custom: (value) => _.isPlainObject(value)
&& (_.isUndefined(value.email) || _.isString(value.email))
&& (_.isUndefined(value.password) || _.isString(value.password)),
custom: value =>
_.isPlainObject(value) &&
(_.isUndefined(value.email) || _.isString(value.email)) &&
(_.isUndefined(value.password) || _.isString(value.password)),
required: true,
},
request: {
@ -26,12 +27,14 @@ module.exports = {
async fn(inputs, exits) {
if (!_.isUndefined(inputs.values.email)) {
// eslint-disable-next-line no-param-reassign
inputs.values.email = inputs.values.email.toLowerCase();
}
let isOnlyPasswordChange = false;
if (!_.isUndefined(inputs.values.password)) {
// eslint-disable-next-line no-param-reassign
inputs.values.password = bcrypt.hashSync(inputs.values.password, 10);
if (Object.keys(inputs.values).length === 1) {
@ -70,7 +73,7 @@ module.exports = {
const userIds = _.union([user.id], adminUserIds, userIdsForProject);
userIds.forEach((userId) => {
userIds.forEach(userId => {
sails.sockets.broadcast(
`user:${userId}`,
'userUpdate',