diff --git a/.eslintrc.js b/.eslintrc.js index 1846e7791a0dd..f342b62dd1104 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -112,6 +112,8 @@ module.exports = { ignoreText: ['-', '•', '/', 'YouTube', 'Invidious', 'FreeTube'] } ], + 'vue/require-explicit-emits': 'error', + 'vue/no-unused-emit-declarations': 'error', }, settings: { 'vue-i18n': { diff --git a/src/renderer/components/ft-auto-load-next-page-wrapper/ft-auto-load-next-page-wrapper.js b/src/renderer/components/ft-auto-load-next-page-wrapper/ft-auto-load-next-page-wrapper.js index aca042948c987..4b26e88665790 100644 --- a/src/renderer/components/ft-auto-load-next-page-wrapper/ft-auto-load-next-page-wrapper.js +++ b/src/renderer/components/ft-auto-load-next-page-wrapper/ft-auto-load-next-page-wrapper.js @@ -2,6 +2,7 @@ import { defineComponent } from 'vue' export default defineComponent({ name: 'FtAutoLoadNextPageWrapper', + emits: ['load-next-page'], computed: { generalAutoLoadMorePaginatedItemsEnabled() { return this.$store.getters.getGeneralAutoLoadMorePaginatedItemsEnabled diff --git a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js index c9854b34d6eb6..dbff93d28e7b4 100644 --- a/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js +++ b/src/renderer/components/ft-channel-bubble/ft-channel-bubble.js @@ -20,6 +20,7 @@ export default defineComponent({ default: false } }, + emits: ['click'], data: function () { return { selected: false diff --git a/src/renderer/components/ft-icon-button/ft-icon-button.js b/src/renderer/components/ft-icon-button/ft-icon-button.js index fb6b4a3a9be54..97062b49538d4 100644 --- a/src/renderer/components/ft-icon-button/ft-icon-button.js +++ b/src/renderer/components/ft-icon-button/ft-icon-button.js @@ -61,6 +61,7 @@ export default defineComponent({ default: false } }, + emits: ['click'], data: function () { return { dropdownShown: false, diff --git a/src/renderer/components/ft-input-tags/ft-input-tags.js b/src/renderer/components/ft-input-tags/ft-input-tags.js index e139db3b76b9e..281b3517171e8 100644 --- a/src/renderer/components/ft-input-tags/ft-input-tags.js +++ b/src/renderer/components/ft-input-tags/ft-input-tags.js @@ -53,6 +53,7 @@ export default defineComponent({ default: (_) => ({ preferredName: '', icon: '' }), } }, + emits: ['already-exists', 'change', 'error-find-tag-info', 'invalid-name'], methods: { updateTags: async function (text, _e) { if (this.areChannelTags) { diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index dc4c945c20af1..9c3bfc1972e80 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -64,6 +64,7 @@ export default defineComponent({ default: '' } }, + emits: ['clear', 'click', 'input'], data: function () { let actionIcon = ['fas', 'search'] if (this.forceActionButtonIconName !== null) { diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 8745a24832151..becb7185d2f35 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -84,6 +84,7 @@ export default defineComponent({ default: false, }, }, + emits: ['pause-player'], data: function () { return { id: '', diff --git a/src/renderer/components/ft-notification-banner/ft-notification-banner.js b/src/renderer/components/ft-notification-banner/ft-notification-banner.js index 9973993cb925f..75c7c4c8793ea 100644 --- a/src/renderer/components/ft-notification-banner/ft-notification-banner.js +++ b/src/renderer/components/ft-notification-banner/ft-notification-banner.js @@ -8,6 +8,7 @@ export default defineComponent({ required: true } }, + emits: ['click'], methods: { handleClick: function (response) { this.$emit('click', response) diff --git a/src/renderer/components/ft-playlist-selector/ft-playlist-selector.js b/src/renderer/components/ft-playlist-selector/ft-playlist-selector.js index 61c2551f21fb9..dbb64c2717976 100644 --- a/src/renderer/components/ft-playlist-selector/ft-playlist-selector.js +++ b/src/renderer/components/ft-playlist-selector/ft-playlist-selector.js @@ -25,6 +25,7 @@ export default defineComponent({ required: true, }, }, + emits: ['selected'], data: function () { return { title: '', diff --git a/src/renderer/components/ft-profile-edit/ft-profile-edit.js b/src/renderer/components/ft-profile-edit/ft-profile-edit.js index 4cf9029c9e27f..f89b449f1a795 100644 --- a/src/renderer/components/ft-profile-edit/ft-profile-edit.js +++ b/src/renderer/components/ft-profile-edit/ft-profile-edit.js @@ -32,6 +32,7 @@ export default defineComponent({ required: true } }, + emits: ['new-profile-created', 'profile-deleted'], data: function () { return { showDeletePrompt: false, diff --git a/src/renderer/components/ft-prompt/ft-prompt.js b/src/renderer/components/ft-prompt/ft-prompt.js index 060a4a006470e..45296bbfd8feb 100644 --- a/src/renderer/components/ft-prompt/ft-prompt.js +++ b/src/renderer/components/ft-prompt/ft-prompt.js @@ -38,6 +38,7 @@ export default defineComponent({ default: false } }, + emits: ['click'], data: function () { return { promptButtons: [], diff --git a/src/renderer/components/ft-search-filters/ft-search-filters.js b/src/renderer/components/ft-search-filters/ft-search-filters.js index 3fe6da742386b..bebeafcdcc67a 100644 --- a/src/renderer/components/ft-search-filters/ft-search-filters.js +++ b/src/renderer/components/ft-search-filters/ft-search-filters.js @@ -8,6 +8,7 @@ export default defineComponent({ 'ft-flex-box': FtFlexBox, 'ft-radio-button': FtRadioButton }, + emits: ['filterValueUpdated'], data: function () { return { sortByValues: [ diff --git a/src/renderer/components/ft-timestamp-catcher/ft-timestamp-catcher.js b/src/renderer/components/ft-timestamp-catcher/ft-timestamp-catcher.js index 1006ea5944499..fb60e08a229ab 100644 --- a/src/renderer/components/ft-timestamp-catcher/ft-timestamp-catcher.js +++ b/src/renderer/components/ft-timestamp-catcher/ft-timestamp-catcher.js @@ -8,6 +8,7 @@ export default defineComponent({ default: '' } }, + emits: ['timestamp-event'], methods: { catchTimestampClick: function (event) { this.$emit('timestamp-event', event.detail) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index afe83aff3cce6..4cacc6a195001 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -117,6 +117,7 @@ export default defineComponent({ default: false } }, + emits: ['ended', 'error', 'ready', 'store-caption-list', 'timeupdate', 'toggle-theatre-mode'], data: function () { return { powerSaveBlocker: null, diff --git a/src/renderer/components/playlist-info/playlist-info.js b/src/renderer/components/playlist-info/playlist-info.js index 082462405ee57..30801bd6fa208 100644 --- a/src/renderer/components/playlist-info/playlist-info.js +++ b/src/renderer/components/playlist-info/playlist-info.js @@ -96,6 +96,7 @@ export default defineComponent({ required: true, }, }, + emits: ['enter-edit-mode', 'exit-edit-mode', 'search-video-query-change'], data: function () { return { searchVideoMode: false, diff --git a/src/renderer/components/subscriptions-tab-ui/subscriptions-tab-ui.js b/src/renderer/components/subscriptions-tab-ui/subscriptions-tab-ui.js index 1c72b620b7c40..73e6e40fcdee5 100644 --- a/src/renderer/components/subscriptions-tab-ui/subscriptions-tab-ui.js +++ b/src/renderer/components/subscriptions-tab-ui/subscriptions-tab-ui.js @@ -47,6 +47,7 @@ export default defineComponent({ default: 100 } }, + emits: ['refresh'], data: function () { return { dataLimit: 100, diff --git a/src/renderer/components/watch-video-chapters/watch-video-chapters.js b/src/renderer/components/watch-video-chapters/watch-video-chapters.js index 74885cbdf8050..dd49f2e950427 100644 --- a/src/renderer/components/watch-video-chapters/watch-video-chapters.js +++ b/src/renderer/components/watch-video-chapters/watch-video-chapters.js @@ -16,6 +16,7 @@ export default defineComponent({ required: true } }, + emits: ['timestamp-event'], data: function () { return { showChapters: false, diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index b0e3bc9e5fe21..6db944bf3ba10 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -37,6 +37,7 @@ export default defineComponent({ default: null, }, }, + emits: ['timestamp-event'], data: function () { return { isLoading: false, diff --git a/src/renderer/components/watch-video-description/watch-video-description.js b/src/renderer/components/watch-video-description/watch-video-description.js index 7bab5214a19bc..7d96f86e54539 100644 --- a/src/renderer/components/watch-video-description/watch-video-description.js +++ b/src/renderer/components/watch-video-description/watch-video-description.js @@ -19,6 +19,7 @@ export default defineComponent({ default: '' } }, + emits: ['timestamp-event'], data: function () { return { shownDescription: '' diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js index 7bc33dc097e76..5069984592196 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -104,6 +104,7 @@ export default defineComponent({ required: true } }, + emits: ['set-info-area-sticky', 'scroll-to-info-area', 'pause-player'], computed: { hideSharingActions: function() { return this.$store.getters.getHideSharingActions