start upgrading eslint

This commit is contained in:
Matteo Pagliazzi
2019-10-08 16:57:10 +02:00
parent 90c917f69e
commit 621787915c
304 changed files with 5992 additions and 6394 deletions

View File

@@ -11,10 +11,10 @@ import content from '../content/index';
function markNotificationAsRead (user, cardType) {
const indexToRemove = user.notifications.findIndex(notification => {
if (
notification &&
notification.type === 'CARD_RECEIVED' &&
notification.data &&
notification.data.card === cardType
notification
&& notification.type === 'CARD_RECEIVED'
&& notification.data
&& notification.data.card === cardType
) return true;
});
@@ -23,7 +23,7 @@ function markNotificationAsRead (user, cardType) {
export default function readCard (user, req = {}) {
let cardType = get(req.params, 'cardType');
const cardType = get(req.params, 'cardType');
if (!cardType) {
throw new BadRequest(i18n.t('cardTypeRequired', req.language));
@@ -40,6 +40,6 @@ export default function readCard (user, req = {}) {
return [
{ specialItems: user.items.special, cardReceived: user.flags.cardReceived },
i18n.t('readCard', {cardType}, req.language),
i18n.t('readCard', { cardType }, req.language),
];
}