From 4e92b378da61903c2690f999a932bb0d1524d2af Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 4 Aug 2020 22:18:39 -0400 Subject: [PATCH] Check for and remove all trailing commas --- .eslintrc.js | 12 +++++------ .prettierrc | 2 +- src/renderer/App.js | 2 +- src/renderer/components/ft-input/ft-input.js | 2 +- .../ft-share-button/ft-share-button.js | 2 +- src/renderer/components/ft-toast/ft-toast.js | 4 ++-- src/renderer/components/top-nav/top-nav.js | 20 +++++++++---------- .../watch-video-playlist.js | 2 +- src/renderer/views/Watch/Watch.js | 14 ++++++------- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0c77dd79..b792f68d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { // https://eslint.org/docs/user-guide/configuring#specifying-environments env: { browser: true, - node: true, + node: true }, // https://eslint.org/docs/user-guide/configuring#specifying-parser @@ -15,7 +15,7 @@ module.exports = { parserOptions: { parser: 'babel-eslint', ecmaVersion: 2018, - sourceType: 'module', + sourceType: 'module' }, // https://eslint.org/docs/user-guide/configuring#extending-configuration-files @@ -26,7 +26,7 @@ module.exports = { 'prettier', 'eslint:recommended', 'plugin:vue/recommended', - 'standard', + 'standard' ], // https://eslint.org/docs/user-guide/configuring#configuring-plugins @@ -34,11 +34,11 @@ module.exports = { rules: { 'space-before-function-paren': 0, - 'comma-dangle': 0, + 'comma-dangle': ['error', 'never'], 'vue/no-v-html': 'off', 'no-console': 0, 'no-unused-vars': 1, 'no-undef': 1, - 'vue/no-template-key': 1, - }, + 'vue/no-template-key': 1 + } } diff --git a/.prettierrc b/.prettierrc index 76e9e8d2..b96994dd 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,6 +2,6 @@ "semi": false, "singleQuote": true, "tabWidth": 2, - "trailingComma": "es5", + "trailingComma": false, "useTabs": false } diff --git a/src/renderer/App.js b/src/renderer/App.js index f7d45d8f..38d02061 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -20,7 +20,7 @@ export default Vue.extend({ components: { TopNav, SideNav, - FtToast, + FtToast }, computed: { isOpen: function () { diff --git a/src/renderer/components/ft-input/ft-input.js b/src/renderer/components/ft-input/ft-input.js index 1bc81a66..11007b3d 100644 --- a/src/renderer/components/ft-input/ft-input.js +++ b/src/renderer/components/ft-input/ft-input.js @@ -26,7 +26,7 @@ export default Vue.extend({ dataList: { type: Array, default: () => { return [] } - }, + } }, data: function () { return { diff --git a/src/renderer/components/ft-share-button/ft-share-button.js b/src/renderer/components/ft-share-button/ft-share-button.js index 8da6f680..0693c2fc 100644 --- a/src/renderer/components/ft-share-button/ft-share-button.js +++ b/src/renderer/components/ft-share-button/ft-share-button.js @@ -39,7 +39,7 @@ export default Vue.extend({ youtubeEmbedURL() { return `https://www.youtube-nocookie.com/embed/${this.id}` - }, + } }, methods: { diff --git a/src/renderer/components/ft-toast/ft-toast.js b/src/renderer/components/ft-toast/ft-toast.js index 79a49c50..9d0ab55e 100644 --- a/src/renderer/components/ft-toast/ft-toast.js +++ b/src/renderer/components/ft-toast/ft-toast.js @@ -5,7 +5,7 @@ export default Vue.extend({ name: 'FtToast', data: function () { return { - toasts: [], + toasts: [] } }, mounted: function () { @@ -38,5 +38,5 @@ export default Vue.extend({ const removed = this.toasts.splice(index, 1) clearTimeout(removed[0].timeout) } - }, + } }) diff --git a/src/renderer/components/top-nav/top-nav.js b/src/renderer/components/top-nav/top-nav.js index aff22977..0b60b178 100644 --- a/src/renderer/components/top-nav/top-nav.js +++ b/src/renderer/components/top-nav/top-nav.js @@ -10,14 +10,14 @@ export default Vue.extend({ name: 'TopNav', components: { FtInput, - FtSearchFilters, + FtSearchFilters }, data: () => { return { component: this, windowWidth: 0, showFilters: false, - searchSuggestionsDataList: [], + searchSuggestionsDataList: [] } }, computed: { @@ -47,7 +47,7 @@ export default Vue.extend({ backendPreference: function () { return this.$store.getters.getBackendPreference - }, + } }, mounted: function () { const appWidth = $(window).width() @@ -83,7 +83,7 @@ export default Vue.extend({ this.$store.dispatch('getVideoIdFromUrl', query).then((result) => { if (result) { this.$router.push({ - path: `/watch/${result}`, + path: `/watch/${result}` }) } else { router.push({ @@ -92,8 +92,8 @@ export default Vue.extend({ sortBy: this.searchSettings.sortBy, time: this.searchSettings.time, type: this.searchSettings.type, - duration: this.searchSettings.duration, - }, + duration: this.searchSettings.duration + } }) } }) @@ -139,8 +139,8 @@ export default Vue.extend({ resource: 'search/suggestions', id: '', params: { - q: query, - }, + q: query + } } this.$store @@ -181,6 +181,6 @@ export default Vue.extend({ toggleSideNav: function () { this.$store.commit('toggleSideNav') - }, - }, + } + } }) diff --git a/src/renderer/components/watch-video-playlist/watch-video-playlist.js b/src/renderer/components/watch-video-playlist/watch-video-playlist.js index 12a100c0..28cd4704 100644 --- a/src/renderer/components/watch-video-playlist/watch-video-playlist.js +++ b/src/renderer/components/watch-video-playlist/watch-video-playlist.js @@ -63,7 +63,7 @@ export default Vue.extend({ watch: { videoId () { this.playlistWatchedVideoList.push(this.videoId) - }, + } }, mounted: function () { if (this.usingElectron) { diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 59d38d71..9d6d75c7 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -24,7 +24,7 @@ export default Vue.extend({ 'watch-video-comments': WatchVideoComments, 'watch-video-live-chat': WatchVideoLiveChat, 'watch-video-playlist': WatchVideoPlaylist, - 'watch-video-recommendations': WatchVideoRecommendations, + 'watch-video-recommendations': WatchVideoRecommendations }, data: function() { return { @@ -57,7 +57,7 @@ export default Vue.extend({ captionSourceList: [], recommendedVideos: [], watchingPlaylist: false, - playlistId: '', + playlistId: '' } }, computed: { @@ -134,9 +134,9 @@ export default Vue.extend({ type: 'application/dash+xml', label: 'Dash', qualityLabel: 'Auto' - }, + } ] - }, + } }, watch: { $route() { @@ -160,7 +160,7 @@ export default Vue.extend({ } break } - }, + } }, mounted: function () { this.videoId = this.$route.params.id @@ -525,6 +525,6 @@ export default Vue.extend({ this.enableDashFormat() } } - }, - }, + } + } })