From 5165d491b0e234c266660a339e94119ceb96c8f0 Mon Sep 17 00:00:00 2001 From: Alys Date: Wed, 26 Aug 2020 02:06:39 +1000 Subject: [PATCH] fix some lint warnings (#12488) * prevent some lint warnings by turning off some rules we don't seem to care about require-prop-types has 167 violations require-default-prop has 93 violations * fix some lint warnings by adding eslint-disable-line comments * prevent lint warnings by moving vue hooks to a different order * apply some automatic lint fixes * fix lint error by making line shorter * prevent lint warnings from whitespace and @input, @click positioning * revert 723fa38271173c8c005e0e8a2520292b9dd7e738 Reenables vue/require-prop-types and vue/require-default-prop --- .../components/achievements/chooseClass.vue | 2 +- website/client/src/components/appFooter.vue | 2 +- .../client/src/components/auth/authForm.vue | 6 +- .../components/auth/registerLoginReset.vue | 18 ++-- .../components/challenges/challengeModal.vue | 2 +- .../challenges/closeChallengeModal.vue | 2 +- .../client/src/components/chat/chatCard.vue | 2 +- .../client/src/components/groups/group.vue | 4 +- .../src/components/groups/groupFormModal.vue | 6 +- .../src/components/groups/membersModal.vue | 6 +- .../src/components/groups/publicGuildItem.vue | 2 +- .../components/groups/questDetailsModal.vue | 4 +- .../components/groups/questSidebarSection.vue | 6 +- .../client/src/components/header/index.vue | 18 ++-- .../notifications/groupTaskApproval.vue | 2 +- .../header/notifications/guildInvitation.vue | 2 +- .../header/notifications/partyInvitation.vue | 2 +- .../components/messages/conversationItem.vue | 22 ++--- .../src/components/messages/messageCard.vue | 2 +- .../src/components/messages/messageList.vue | 16 ++-- .../src/components/payments/amazonButton.vue | 4 +- .../src/components/payments/amazonModal.vue | 2 +- .../client/src/components/settings/site.vue | 12 +-- .../client/src/components/shops/buyModal.vue | 2 +- .../components/shops/market/keysToKennel.vue | 12 +-- .../src/components/tasks/approvalFooter.vue | 6 +- .../src/components/tasks/approvalModal.vue | 2 +- .../src/components/tasks/brokenTaskModal.vue | 2 +- .../components/tasks/clearCompletedTodos.vue | 2 +- website/client/src/components/tasks/task.vue | 2 +- .../client/src/components/tasks/taskModal.vue | 4 +- .../client/src/components/ui/datepicker.vue | 16 ++-- .../client/src/mixins/avatarEditUtilities.js | 8 +- website/client/src/mixins/buy.js | 2 +- website/client/src/mixins/payments.js | 8 +- website/client/src/pages/private-messages.vue | 84 +++++++++---------- website/client/src/store/actions/guilds.js | 2 +- 37 files changed, 148 insertions(+), 148 deletions(-) diff --git a/website/client/src/components/achievements/chooseClass.vue b/website/client/src/components/achievements/chooseClass.vue index 5597f4328f..1f5d0e35f5 100644 --- a/website/client/src/components/achievements/chooseClass.vue +++ b/website/client/src/components/achievements/chooseClass.vue @@ -216,7 +216,7 @@ export default { this.$root.$emit('bv::hide::modal', 'choose-class'); }, clickSelectClass (heroClass) { - if (this.user.flags.classSelected && !window.confirm(this.$t('changeClassConfirmCost'))) return; + if (this.user.flags.classSelected && !window.confirm(this.$t('changeClassConfirmCost'))) return; // eslint-disable-line no-alert this.$store.dispatch('user:changeClass', { query: { class: heroClass } }); }, clickDisableClasses () { diff --git a/website/client/src/components/appFooter.vue b/website/client/src/components/appFooter.vue index a57b80100d..790b927e66 100644 --- a/website/client/src/components/appFooter.vue +++ b/website/client/src/components/appFooter.vue @@ -530,7 +530,7 @@ export default { }); }, async addMissedDay (numberOfDays) { - if (!window.confirm(`Are you sure you want to reset the day by ${numberOfDays} day(s)?`)) return; + if (!window.confirm(`Are you sure you want to reset the day by ${numberOfDays} day(s)?`)) return; // eslint-disable-line no-alert const date = moment(this.user.lastCron).subtract(numberOfDays, 'days').toDate(); diff --git a/website/client/src/components/auth/authForm.vue b/website/client/src/components/auth/authForm.vue index bc8700526b..e24951f496 100644 --- a/website/client/src/components/auth/authForm.vue +++ b/website/client/src/components/auth/authForm.vue @@ -360,12 +360,12 @@ export default { }, async register () { if (!this.email) { - window.alert(this.$t('missingEmail')); + window.alert(this.$t('missingEmail')); // eslint-disable-line no-alert return; } if (this.password !== this.passwordConfirm) { - window.alert(this.$t('passwordConfirmationMatch')); + window.alert(this.$t('passwordConfirmationMatch')); // eslint-disable-line no-alert return; } @@ -381,7 +381,7 @@ export default { } catch (e) { if (e.response.data.data && e.response.data.data.errors) { const message = e.response.data.data.errors.map(error => `${error.message}\n`); - window.alert(message); + window.alert(message); // eslint-disable-line no-alert } } }, diff --git a/website/client/src/components/auth/registerLoginReset.vue b/website/client/src/components/auth/registerLoginReset.vue index 6134f88b3a..820933b101 100644 --- a/website/client/src/components/auth/registerLoginReset.vue +++ b/website/client/src/components/auth/registerLoginReset.vue @@ -750,13 +750,13 @@ export default { const { code } = query; const hasError = query.hasError === 'true'; if (hasError) { - window.alert(query.message); + window.alert(query.message); // eslint-disable-line no-alert this.$router.push({ name: 'login' }); return; } if (!code) { - window.alert(this.$t('invalidPasswordResetCode')); + window.alert(this.$t('invalidPasswordResetCode')); // eslint-disable-line no-alert this.$router.push({ name: 'login' }); return; } @@ -797,12 +797,12 @@ export default { async register () { // @TODO do not use alert if (!this.email) { - window.alert(this.$t('missingEmail')); + window.alert(this.$t('missingEmail')); // eslint-disable-line no-alert return; } if (this.password !== this.passwordConfirm) { - window.alert(this.$t('passwordConfirmationMatch')); + window.alert(this.$t('passwordConfirmationMatch')); // eslint-disable-line no-alert return; } @@ -918,7 +918,7 @@ export default { }, async forgotPasswordLink () { if (!this.username) { - window.alert(this.$t('missingEmail')); + window.alert(this.$t('missingEmail')); // eslint-disable-line no-alert return; } @@ -926,17 +926,17 @@ export default { email: this.username, }); - window.alert(this.$t('newPassSent')); + window.alert(this.$t('newPassSent')); // eslint-disable-line no-alert }, async resetPasswordSetNewOneLink () { if (!this.password) { - window.alert(this.$t('missingNewPassword')); + window.alert(this.$t('missingNewPassword')); // eslint-disable-line no-alert return; } if (this.password !== this.passwordConfirm) { // @TODO i18n and don't use alerts - window.alert(this.$t('passwordConfirmationMatch')); + window.alert(this.$t('passwordConfirmationMatch')); // eslint-disable-line no-alert return; } @@ -947,7 +947,7 @@ export default { }); if (res.data.message) { - window.alert(res.data.message); + window.alert(res.data.message); // eslint-disable-line no-alert } this.password = ''; diff --git a/website/client/src/components/challenges/challengeModal.vue b/website/client/src/components/challenges/challengeModal.vue index 282e9367c4..5363eb9742 100644 --- a/website/client/src/components/challenges/challengeModal.vue +++ b/website/client/src/components/challenges/challengeModal.vue @@ -545,7 +545,7 @@ export default { if (this.workingChallenge.prize > this.maxPrize) errors.push(this.$t('cantAfford')); if (errors.length > 0) { - window.alert(errors.join('\n')); + window.alert(errors.join('\n')); // eslint-disable-line no-alert this.loading = false; return; } diff --git a/website/client/src/components/challenges/closeChallengeModal.vue b/website/client/src/components/challenges/closeChallengeModal.vue index a7f43455bf..a73d91fd87 100644 --- a/website/client/src/components/challenges/closeChallengeModal.vue +++ b/website/client/src/components/challenges/closeChallengeModal.vue @@ -148,7 +148,7 @@ export default { this.$router.push('/challenges/myChallenges'); }, async deleteChallenge () { - if (!window.confirm(this.$t('sureDelCha'))) return; + if (!window.confirm(this.$t('sureDelCha'))) return; // eslint-disable-line no-alert this.challenge = await this.$store.dispatch('challenges:deleteChallenge', { challengeId: this.challengeId, prize: this.prize, diff --git a/website/client/src/components/chat/chatCard.vue b/website/client/src/components/chat/chatCard.vue index 9c97856245..7329dd09c6 100644 --- a/website/client/src/components/chat/chatCard.vue +++ b/website/client/src/components/chat/chatCard.vue @@ -329,7 +329,7 @@ export default { }); }, async remove () { - if (!window.confirm(this.$t('areYouSureDeleteMessage'))) return; + if (!window.confirm(this.$t('areYouSureDeleteMessage'))) return; // eslint-disable-line no-alert const message = this.msg; this.$emit('message-removed', message); diff --git a/website/client/src/components/groups/group.vue b/website/client/src/components/groups/group.vue index 533c63d3a2..698c8c88e9 100644 --- a/website/client/src/components/groups/group.vue +++ b/website/client/src/components/groups/group.vue @@ -599,7 +599,7 @@ export default { return this.user.notifications.some(n => n.type === 'NEW_CHAT_MESSAGE' && n.data.group.id === groupId); }, async join () { - if (this.group.cancelledPlan && !window.confirm(this.$t('aboutToJoinCancelledGroupPlan'))) { + if (this.group.cancelledPlan && !window.confirm(this.$t('aboutToJoinCancelledGroupPlan'))) { // eslint-disable-line no-alert return; } await this.$store.dispatch('guilds:join', { groupId: this.group._id, type: 'guild' }); @@ -613,7 +613,7 @@ export default { }); // @TODO: Get challenges and ask to keep or remove - if (!window.confirm('Are you sure you want to leave?')) return; + if (!window.confirm('Are you sure you want to leave?')) return; // eslint-disable-line no-alert const keep = true; this.leave(keep); }, diff --git a/website/client/src/components/groups/groupFormModal.vue b/website/client/src/components/groups/groupFormModal.vue index 41c00fd91c..788f8f7845 100644 --- a/website/client/src/components/groups/groupFormModal.vue +++ b/website/client/src/components/groups/groupFormModal.vue @@ -531,7 +531,7 @@ export default { async submit () { if (this.$store.state.user.data.balance < 1 && !this.workingGroup.id) { // @TODO: Add proper notifications - window.alert(this.$t('notEnoughGems')); + window.alert(this.$t('notEnoughGems')); // eslint-disable-line no-alert return; // @TODO return $rootScope.openModal('buyGems', {track:"Gems > Gems > Create Group"}); } @@ -545,12 +545,12 @@ export default { if (!this.isParty && (!this.workingGroup.categories || this.workingGroup.categories.length === 0)) errors.push(this.$t('categoiresRequired')); if (errors.length > 0) { - window.alert(errors.join('\n')); + window.alert(errors.join('\n')); // eslint-disable-line no-alert return; } // @TODO: Add proper notifications - if (!this.workingGroup.id && !window.confirm(this.$t('confirmGuild'))) return; + if (!this.workingGroup.id && !window.confirm(this.$t('confirmGuild'))) return; // eslint-disable-line no-alert if (!this.workingGroup.privateGuild) { this.workingGroup.privacy = 'public'; diff --git a/website/client/src/components/groups/membersModal.vue b/website/client/src/components/groups/membersModal.vue index 17eb17d2a8..8670ec86c4 100644 --- a/website/client/src/components/groups/membersModal.vue +++ b/website/client/src/components/groups/membersModal.vue @@ -607,14 +607,14 @@ export default { groupId: this.groupId, memberId, }); - window.alert(this.$t('managerAdded')); + window.alert(this.$t('managerAdded')); // eslint-disable-line no-alert }, async removeManager (memberId) { await this.$store.dispatch('guilds:removeManager', { groupId: this.groupId, memberId, }); - window.alert(this.$t('managerRemoved')); + window.alert(this.$t('managerRemoved')); // eslint-disable-line no-alert }, close () { this.$root.$emit('bv::hide::modal', 'members-modal'); @@ -672,7 +672,7 @@ export default { groupData.leader = member._id; await this.$store.dispatch('guilds:update', { group: groupData }); - window.alert(this.$t('leaderChanged')); + window.alert(this.$t('leaderChanged')); // eslint-disable-line no-alert groupData.leader = member; this.$root.$emit('updatedGroup', groupData); diff --git a/website/client/src/components/groups/publicGuildItem.vue b/website/client/src/components/groups/publicGuildItem.vue index 1226b78bf0..ea2946a2a7 100644 --- a/website/client/src/components/groups/publicGuildItem.vue +++ b/website/client/src/components/groups/publicGuildItem.vue @@ -261,7 +261,7 @@ export default { }, async join () { // @TODO: This needs to be in the notifications where users will now accept invites - if (this.guild.cancelledPlan && !window.confirm(window.env.t('aboutToJoinCancelledGroupPlan'))) { + if (this.guild.cancelledPlan && !window.confirm(window.env.t('aboutToJoinCancelledGroupPlan'))) { // eslint-disable-line no-alert return; } await this.$store.dispatch('guilds:join', { groupId: this.guild._id, type: 'guild' }); diff --git a/website/client/src/components/groups/questDetailsModal.vue b/website/client/src/components/groups/questDetailsModal.vue index c095ea5e55..2f84787a81 100644 --- a/website/client/src/components/groups/questDetailsModal.vue +++ b/website/client/src/components/groups/questDetailsModal.vue @@ -262,7 +262,7 @@ export default { for (const uuid in this.group.quest.members) { if (this.group.quest.members[uuid]) count += 1; } - if (!window.confirm(this.$t('questConfirm', { + if (!window.confirm(this.$t('questConfirm', { // eslint-disable-line no-alert questmembers: count, totalmembers: this.group.memberCount, }))) return; @@ -274,7 +274,7 @@ export default { this.close(); }, async questCancel () { - if (!window.confirm(this.$t('sureCancel'))) return; + if (!window.confirm(this.$t('sureCancel'))) return; // eslint-disable-line no-alert const quest = await this.$store.dispatch('quests:sendAction', { groupId: this.group._id, action: 'quests/cancel' }); this.group.quest = quest; this.close(); diff --git a/website/client/src/components/groups/questSidebarSection.vue b/website/client/src/components/groups/questSidebarSection.vue index 6adb4055f1..74126fc5fb 100644 --- a/website/client/src/components/groups/questSidebarSection.vue +++ b/website/client/src/components/groups/questSidebarSection.vue @@ -412,13 +412,13 @@ export default { this.$root.$emit('bv::show::modal', 'participant-list'); }, async questAbort () { - if (!window.confirm(this.$t('sureAbort'))) return; - if (!window.confirm(this.$t('doubleSureAbort'))) return; + if (!window.confirm(this.$t('sureAbort'))) return; // eslint-disable-line no-alert + if (!window.confirm(this.$t('doubleSureAbort'))) return; // eslint-disable-line no-alert const quest = await this.$store.dispatch('quests:sendAction', { groupId: this.group._id, action: 'quests/abort' }); this.group.quest = quest; }, async questLeave () { - if (!window.confirm(this.$t('sureLeave'))) return; + if (!window.confirm(this.$t('sureLeave'))) return; // eslint-disable-line no-alert const quest = await this.$store.dispatch('quests:sendAction', { groupId: this.group._id, action: 'quests/leave' }); this.group.quest = quest; }, diff --git a/website/client/src/components/header/index.vue b/website/client/src/components/header/index.vue index f0126c2fd9..bbe5842a7d 100644 --- a/website/client/src/components/header/index.vue +++ b/website/client/src/components/header/index.vue @@ -147,15 +147,6 @@ export default { inviteModalGroupType: undefined, }; }, - watch: { - hideHeader () { - this.$nextTick(() => { - if (this.$refs.partyMembersDiv) { - this.setPartyMembersWidth({ width: this.$refs.partyMembersDiv.clientWidth }); - } - }); - }, - }, computed: { ...mapGetters({ user: 'user:data', @@ -202,6 +193,15 @@ export default { return ['groupPlan', 'privateMessages'].includes(this.$route.name); }, }, + watch: { + hideHeader () { + this.$nextTick(() => { + if (this.$refs.partyMembersDiv) { + this.setPartyMembersWidth({ width: this.$refs.partyMembersDiv.clientWidth }); + } + }); + }, + }, created () { if (this.user.party && this.user.party._id) { this.$store.state.memberModalOptions.groupId = this.user.party._id; diff --git a/website/client/src/components/header/notifications/groupTaskApproval.vue b/website/client/src/components/header/notifications/groupTaskApproval.vue index 9eee1e7644..127f233aa0 100644 --- a/website/client/src/components/header/notifications/groupTaskApproval.vue +++ b/website/client/src/components/header/notifications/groupTaskApproval.vue @@ -80,7 +80,7 @@ export default { return; } - if (!window.confirm(this.$t('confirmNeedsWork'))) return; + if (!window.confirm(this.$t('confirmNeedsWork'))) return; // eslint-disable-line no-alert await this.$store.dispatch('tasks:needsWork', { taskId: this.notification.data.groupTaskId, diff --git a/website/client/src/components/header/notifications/guildInvitation.vue b/website/client/src/components/header/notifications/guildInvitation.vue index 1a767b9db2..d4794ddf5f 100644 --- a/website/client/src/components/header/notifications/guildInvitation.vue +++ b/website/client/src/components/header/notifications/guildInvitation.vue @@ -60,7 +60,7 @@ export default { async accept () { const group = this.notification.data; - if (group.cancelledPlan && !window.confirm(this.$t('aboutToJoinCancelledGroupPlan'))) { + if (group.cancelledPlan && !window.confirm(this.$t('aboutToJoinCancelledGroupPlan'))) { // eslint-disable-line no-alert return; } diff --git a/website/client/src/components/header/notifications/partyInvitation.vue b/website/client/src/components/header/notifications/partyInvitation.vue index b13b261651..b454d02091 100644 --- a/website/client/src/components/header/notifications/partyInvitation.vue +++ b/website/client/src/components/header/notifications/partyInvitation.vue @@ -40,7 +40,7 @@ export default { async accept () { const group = this.notification.data; - if (group.cancelledPlan && !window.confirm(this.$t('aboutToJoinCancelledGroupPlan'))) { + if (group.cancelledPlan && !window.confirm(this.$t('aboutToJoinCancelledGroupPlan'))) { // eslint-disable-line no-alert return; } diff --git a/website/client/src/components/messages/conversationItem.vue b/website/client/src/components/messages/conversationItem.vue index 9227522904..9de47e2c54 100644 --- a/website/client/src/components/messages/conversationItem.vue +++ b/website/client/src/components/messages/conversationItem.vue @@ -73,19 +73,16 @@ export default { components: { userLabel, }, + filters: { + timeAgo (value) { + return moment(value).fromNow(); + }, + }, props: [ 'activeKey', 'uuid', 'backer', 'displayName', 'username', 'contributor', 'lastMessageText', 'lastMessageDate', ], - computed: { - ...mapState({ - userLoggedIn: 'user.data', - }), - isBlocked () { - return this.userLoggedIn.inbox.blocks.includes(this.uuid); - }, - }, data () { return { icons: Object.freeze({ @@ -94,9 +91,12 @@ export default { }), }; }, - filters: { - timeAgo (value) { - return moment(value).fromNow(); + computed: { + ...mapState({ + userLoggedIn: 'user.data', + }), + isBlocked () { + return this.userLoggedIn.inbox.blocks.includes(this.uuid); }, }, methods: { diff --git a/website/client/src/components/messages/messageCard.vue b/website/client/src/components/messages/messageCard.vue index f5a9dd587b..a6634f43d3 100644 --- a/website/client/src/components/messages/messageCard.vue +++ b/website/client/src/components/messages/messageCard.vue @@ -195,7 +195,7 @@ export default { }); }, async remove () { - if (!window.confirm(this.$t('areYouSureDeleteMessage'))) return; + if (!window.confirm(this.$t('areYouSureDeleteMessage'))) return; // eslint-disable-line no-alert const message = this.msg; this.$emit('message-removed', message); diff --git a/website/client/src/components/messages/messageList.vue b/website/client/src/components/messages/messageList.vue index d0d7cb3149..8aae8f54fa 100644 --- a/website/client/src/components/messages/messageList.vue +++ b/website/client/src/components/messages/messageList.vue @@ -216,6 +216,14 @@ export default { disablePerfectScroll: false, }; }, + computed: { + ...mapState({ user: 'user.data' }), + // @TODO: We need a different lazy load mechnism. + // But honestly, adding a paging route to chat would solve this + messages () { + return this.chat; + }, + }, mounted () { this.$el.addEventListener('selectstart', () => this.handleSelectStart()); this.$el.addEventListener('mouseup', () => this.handleSelectChange()); @@ -228,14 +236,6 @@ export default { this.$el.removeEventListener('mouseup', () => this.handleSelectChange()); window.removeEventListener('scroll', this.handleScroll); }, - computed: { - ...mapState({ user: 'user.data' }), - // @TODO: We need a different lazy load mechnism. - // But honestly, adding a paging route to chat would solve this - messages () { - return this.chat; - }, - }, methods: { async triggerLoad () { const { container } = this.$refs; diff --git a/website/client/src/components/payments/amazonButton.vue b/website/client/src/components/payments/amazonButton.vue index 5a292ed8e3..da7917422d 100644 --- a/website/client/src/components/payments/amazonButton.vue +++ b/website/client/src/components/payments/amazonButton.vue @@ -102,11 +102,11 @@ export default { scope: 'payments:widget', popup: true, }, response => { - if (response.error) return window.alert(response.error); + if (response.error) return window.alert(response.error); // eslint-disable-line const url = '/amazon/verifyAccessToken'; return axios.post(url, response).catch(e => { - window.alert(e.message); + window.alert(e.message); // eslint-disable-line no-alert }); }); }, diff --git a/website/client/src/components/payments/amazonModal.vue b/website/client/src/components/payments/amazonModal.vue index b18dab6175..2353422650 100644 --- a/website/client/src/components/payments/amazonModal.vue +++ b/website/client/src/components/payments/amazonModal.vue @@ -122,7 +122,7 @@ export default { this.amazonPayments.orderReferenceId = response.data.data.orderReferenceId; this.amazonInitWidgets(); } else { - window.alert(response.message); + window.alert(response.message); // eslint-disable-line no-alert } } }); diff --git a/website/client/src/components/settings/site.vue b/website/client/src/components/settings/site.vue index cdd8ee79b2..dcc984dee0 100644 --- a/website/client/src/components/settings/site.vue +++ b/website/client/src/components/settings/site.vue @@ -781,7 +781,7 @@ export default { openDayStartModal () { const nextCron = this.calculateNextCron(); // @TODO: Add generic modal - if (!window.confirm(this.$t('sureChangeCustomDayStartTime', { time: nextCron }))) return; + if (!window.confirm(this.$t('sureChangeCustomDayStartTime', { time: nextCron }))) return; // eslint-disable-line no-alert this.saveDayStart(); // $rootScope.openModal('change-day-start', { scope: $scope }); }, @@ -807,12 +807,12 @@ export default { this.user.flags.verifiedUsername = true; } else if (attribute === 'email') { this.user.auth.local.email = updates.newEmail; - window.alert(this.$t('emailSuccess')); + window.alert(this.$t('emailSuccess')); // eslint-disable-line no-alert } }, async changeDisplayName (newName) { await axios.put('/api/v4/user/', { 'profile.name': newName }); - window.alert(this.$t('displayNameSuccess')); + window.alert(this.$t('displayNameSuccess')); // eslint-disable-line no-alert this.user.profile.name = newName; this.temporaryDisplayName = newName; }, @@ -844,17 +844,17 @@ export default { } }, async changeClassForUser (confirmationNeeded) { - if (confirmationNeeded && !window.confirm(this.$t('changeClassConfirmCost'))) return; + if (confirmationNeeded && !window.confirm(this.$t('changeClassConfirmCost'))) return; // eslint-disable-line no-alert try { changeClass(this.user); await axios.post('/api/v4/user/change-class'); } catch (e) { - window.alert(e.message); + window.alert(e.message); // eslint-disable-line no-alert } }, async addLocalAuth () { await axios.post('/api/v4/user/auth/local/register', this.localAuth); - window.alert(this.$t('addedLocalAuth')); + window.alert(this.$t('addedLocalAuth')); // eslint-disable-line no-alert }, restoreEmptyUsername () { if (this.usernameUpdates.username.length < 1) { diff --git a/website/client/src/components/shops/buyModal.vue b/website/client/src/components/shops/buyModal.vue index 452ce3a533..0d658f8a97 100644 --- a/website/client/src/components/shops/buyModal.vue +++ b/website/client/src/components/shops/buyModal.vue @@ -577,7 +577,7 @@ export default { if ( petsRemaining < 0 - && !window.confirm(this.$t('purchasePetItemConfirm', { itemText: this.item.text })) + && !window.confirm(this.$t('purchasePetItemConfirm', { itemText: this.item.text })) // eslint-disable-line no-alert ) return; } diff --git a/website/client/src/components/shops/market/keysToKennel.vue b/website/client/src/components/shops/market/keysToKennel.vue index 71862238cd..55adef4d65 100644 --- a/website/client/src/components/shops/market/keysToKennel.vue +++ b/website/client/src/components/shops/market/keysToKennel.vue @@ -85,7 +85,7 @@ export default { purchaseType: 'keys', pinType: 'keys', buy: () => { - if (!window.confirm(this.$t('releasePetsConfirm'))) return; + if (!window.confirm(this.$t('releasePetsConfirm'))) return; // eslint-disable-line no-alert try { this.$store.dispatch('shops:releasePets', { user: this.user }); this.text(this.$t('releasePetsSuccess')); @@ -93,7 +93,7 @@ export default { // Reload because achievement is set in user.save instead of common window.location.reload(true); } catch (err) { - window.alert(err.message); + window.alert(err.message); // eslint-disable-line no-alert } }, }, @@ -108,7 +108,7 @@ export default { purchaseType: 'keys', pinType: 'keys', buy: () => { - if (!window.confirm(this.$t('releaseMountsConfirm'))) return; + if (!window.confirm(this.$t('releaseMountsConfirm'))) return; // eslint-disable-line no-alert try { this.$store.dispatch('shops:releaseMounts', { user: this.user }); this.text(this.$t('releaseMountsSuccess')); @@ -116,7 +116,7 @@ export default { // Reload because achievement is set in user.save instead of common window.location.reload(true); } catch (err) { - window.alert(err.message); + window.alert(err.message); // eslint-disable-line no-alert } }, }, @@ -131,7 +131,7 @@ export default { purchaseType: 'keys', pinType: 'keys', buy: () => { - if (!window.confirm(this.$t('releaseBothConfirm'))) return; + if (!window.confirm(this.$t('releaseBothConfirm'))) return; // eslint-disable-line no-alert try { this.$store.dispatch('shops:releaseBoth', { user: this.user }); this.text(this.$t('releaseBothSuccess')); @@ -139,7 +139,7 @@ export default { // Reload because achievement is set in user.save instead of common window.location.reload(true); } catch (err) { - window.alert(err.message); + window.alert(err.message); // eslint-disable-line no-alert } }, }, diff --git a/website/client/src/components/tasks/approvalFooter.vue b/website/client/src/components/tasks/approvalFooter.vue index c984247b1c..7a8080667b 100644 --- a/website/client/src/components/tasks/approvalFooter.vue +++ b/website/client/src/components/tasks/approvalFooter.vue @@ -2,9 +2,9 @@
@@ -1523,7 +1523,7 @@ export default { }, destroy () { const type = this.$t(this.task.type); - if (!window.confirm(this.$t('sureDeleteType', { type }))) return; + if (!window.confirm(this.$t('sureDeleteType', { type }))) return; // eslint-disable-line no-alert this.destroyTask(this.task); this.$emit('taskDestroyed', this.task); this.$root.$emit('bv::hide::modal', 'task-modal'); diff --git a/website/client/src/components/ui/datepicker.vue b/website/client/src/components/ui/datepicker.vue index 12fd519eac..646801f603 100644 --- a/website/client/src/components/ui/datepicker.vue +++ b/website/client/src/components/ui/datepicker.vue @@ -1,7 +1,6 @@