mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
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 723fa38271
Reenables vue/require-prop-types and vue/require-default-prop
This commit is contained in:
@@ -626,48 +626,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async mounted () {
|
||||
// notification click to refresh
|
||||
this.$root.$on(EVENTS.PM_REFRESH, async () => {
|
||||
await this.reload();
|
||||
|
||||
this.selectFirstConversation();
|
||||
});
|
||||
|
||||
// header sync button
|
||||
this.$root.$on(EVENTS.RESYNC_COMPLETED, async () => {
|
||||
await this.reload();
|
||||
|
||||
this.selectFirstConversation();
|
||||
});
|
||||
|
||||
await this.reload();
|
||||
|
||||
// close members modal if the Private Messages page is opened in an existing tab
|
||||
this.$root.$emit('bv::hide::modal', 'profile');
|
||||
this.$root.$emit('bv::hide::modal', 'members-modal');
|
||||
|
||||
const data = this.$store.state.privateMessageOptions;
|
||||
if (data && data.userIdToMessage) {
|
||||
this.initiatedConversation = {
|
||||
uuid: data.userIdToMessage,
|
||||
user: data.displayName,
|
||||
username: data.username,
|
||||
backer: data.backer,
|
||||
contributor: data.contributor,
|
||||
userStyles: data.userStyles,
|
||||
canReceive: true,
|
||||
};
|
||||
|
||||
this.$store.state.privateMessageOptions = {};
|
||||
|
||||
this.selectConversation(this.initiatedConversation.uuid);
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$root.$off(EVENTS.RESYNC_COMPLETED);
|
||||
this.$root.$off(EVENTS.PM_REFRESH);
|
||||
},
|
||||
computed: {
|
||||
...mapState({ user: 'user.data' }),
|
||||
canLoadMore () {
|
||||
@@ -819,6 +777,48 @@ export default {
|
||||
|| this.disabledTexts !== null;
|
||||
},
|
||||
},
|
||||
async mounted () {
|
||||
// notification click to refresh
|
||||
this.$root.$on(EVENTS.PM_REFRESH, async () => {
|
||||
await this.reload();
|
||||
|
||||
this.selectFirstConversation();
|
||||
});
|
||||
|
||||
// header sync button
|
||||
this.$root.$on(EVENTS.RESYNC_COMPLETED, async () => {
|
||||
await this.reload();
|
||||
|
||||
this.selectFirstConversation();
|
||||
});
|
||||
|
||||
await this.reload();
|
||||
|
||||
// close members modal if the Private Messages page is opened in an existing tab
|
||||
this.$root.$emit('bv::hide::modal', 'profile');
|
||||
this.$root.$emit('bv::hide::modal', 'members-modal');
|
||||
|
||||
const data = this.$store.state.privateMessageOptions;
|
||||
if (data && data.userIdToMessage) {
|
||||
this.initiatedConversation = {
|
||||
uuid: data.userIdToMessage,
|
||||
user: data.displayName,
|
||||
username: data.username,
|
||||
backer: data.backer,
|
||||
contributor: data.contributor,
|
||||
userStyles: data.userStyles,
|
||||
canReceive: true,
|
||||
};
|
||||
|
||||
this.$store.state.privateMessageOptions = {};
|
||||
|
||||
this.selectConversation(this.initiatedConversation.uuid);
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$root.$off(EVENTS.RESYNC_COMPLETED);
|
||||
this.$root.$off(EVENTS.PM_REFRESH);
|
||||
},
|
||||
|
||||
methods: {
|
||||
async reload () {
|
||||
|
||||
Reference in New Issue
Block a user