Check for and remove all trailing commas

This commit is contained in:
Preston 2020-08-04 22:18:39 -04:00
parent 30b4392a77
commit 4e92b378da
9 changed files with 30 additions and 30 deletions

View File

@ -5,7 +5,7 @@ module.exports = {
// https://eslint.org/docs/user-guide/configuring#specifying-environments // https://eslint.org/docs/user-guide/configuring#specifying-environments
env: { env: {
browser: true, browser: true,
node: true, node: true
}, },
// https://eslint.org/docs/user-guide/configuring#specifying-parser // https://eslint.org/docs/user-guide/configuring#specifying-parser
@ -15,7 +15,7 @@ module.exports = {
parserOptions: { parserOptions: {
parser: 'babel-eslint', parser: 'babel-eslint',
ecmaVersion: 2018, ecmaVersion: 2018,
sourceType: 'module', sourceType: 'module'
}, },
// https://eslint.org/docs/user-guide/configuring#extending-configuration-files // https://eslint.org/docs/user-guide/configuring#extending-configuration-files
@ -26,7 +26,7 @@ module.exports = {
'prettier', 'prettier',
'eslint:recommended', 'eslint:recommended',
'plugin:vue/recommended', 'plugin:vue/recommended',
'standard', 'standard'
], ],
// https://eslint.org/docs/user-guide/configuring#configuring-plugins // https://eslint.org/docs/user-guide/configuring#configuring-plugins
@ -34,11 +34,11 @@ module.exports = {
rules: { rules: {
'space-before-function-paren': 0, 'space-before-function-paren': 0,
'comma-dangle': 0, 'comma-dangle': ['error', 'never'],
'vue/no-v-html': 'off', 'vue/no-v-html': 'off',
'no-console': 0, 'no-console': 0,
'no-unused-vars': 1, 'no-unused-vars': 1,
'no-undef': 1, 'no-undef': 1,
'vue/no-template-key': 1, 'vue/no-template-key': 1
}, }
} }

View File

@ -2,6 +2,6 @@
"semi": false, "semi": false,
"singleQuote": true, "singleQuote": true,
"tabWidth": 2, "tabWidth": 2,
"trailingComma": "es5", "trailingComma": false,
"useTabs": false "useTabs": false
} }

View File

@ -20,7 +20,7 @@ export default Vue.extend({
components: { components: {
TopNav, TopNav,
SideNav, SideNav,
FtToast, FtToast
}, },
computed: { computed: {
isOpen: function () { isOpen: function () {

View File

@ -26,7 +26,7 @@ export default Vue.extend({
dataList: { dataList: {
type: Array, type: Array,
default: () => { return [] } default: () => { return [] }
}, }
}, },
data: function () { data: function () {
return { return {

View File

@ -39,7 +39,7 @@ export default Vue.extend({
youtubeEmbedURL() { youtubeEmbedURL() {
return `https://www.youtube-nocookie.com/embed/${this.id}` return `https://www.youtube-nocookie.com/embed/${this.id}`
}, }
}, },
methods: { methods: {

View File

@ -5,7 +5,7 @@ export default Vue.extend({
name: 'FtToast', name: 'FtToast',
data: function () { data: function () {
return { return {
toasts: [], toasts: []
} }
}, },
mounted: function () { mounted: function () {
@ -38,5 +38,5 @@ export default Vue.extend({
const removed = this.toasts.splice(index, 1) const removed = this.toasts.splice(index, 1)
clearTimeout(removed[0].timeout) clearTimeout(removed[0].timeout)
} }
}, }
}) })

View File

@ -10,14 +10,14 @@ export default Vue.extend({
name: 'TopNav', name: 'TopNav',
components: { components: {
FtInput, FtInput,
FtSearchFilters, FtSearchFilters
}, },
data: () => { data: () => {
return { return {
component: this, component: this,
windowWidth: 0, windowWidth: 0,
showFilters: false, showFilters: false,
searchSuggestionsDataList: [], searchSuggestionsDataList: []
} }
}, },
computed: { computed: {
@ -47,7 +47,7 @@ export default Vue.extend({
backendPreference: function () { backendPreference: function () {
return this.$store.getters.getBackendPreference return this.$store.getters.getBackendPreference
}, }
}, },
mounted: function () { mounted: function () {
const appWidth = $(window).width() const appWidth = $(window).width()
@ -83,7 +83,7 @@ export default Vue.extend({
this.$store.dispatch('getVideoIdFromUrl', query).then((result) => { this.$store.dispatch('getVideoIdFromUrl', query).then((result) => {
if (result) { if (result) {
this.$router.push({ this.$router.push({
path: `/watch/${result}`, path: `/watch/${result}`
}) })
} else { } else {
router.push({ router.push({
@ -92,8 +92,8 @@ export default Vue.extend({
sortBy: this.searchSettings.sortBy, sortBy: this.searchSettings.sortBy,
time: this.searchSettings.time, time: this.searchSettings.time,
type: this.searchSettings.type, type: this.searchSettings.type,
duration: this.searchSettings.duration, duration: this.searchSettings.duration
}, }
}) })
} }
}) })
@ -139,8 +139,8 @@ export default Vue.extend({
resource: 'search/suggestions', resource: 'search/suggestions',
id: '', id: '',
params: { params: {
q: query, q: query
}, }
} }
this.$store this.$store
@ -181,6 +181,6 @@ export default Vue.extend({
toggleSideNav: function () { toggleSideNav: function () {
this.$store.commit('toggleSideNav') this.$store.commit('toggleSideNav')
}, }
}, }
}) })

View File

@ -63,7 +63,7 @@ export default Vue.extend({
watch: { watch: {
videoId () { videoId () {
this.playlistWatchedVideoList.push(this.videoId) this.playlistWatchedVideoList.push(this.videoId)
}, }
}, },
mounted: function () { mounted: function () {
if (this.usingElectron) { if (this.usingElectron) {

View File

@ -24,7 +24,7 @@ export default Vue.extend({
'watch-video-comments': WatchVideoComments, 'watch-video-comments': WatchVideoComments,
'watch-video-live-chat': WatchVideoLiveChat, 'watch-video-live-chat': WatchVideoLiveChat,
'watch-video-playlist': WatchVideoPlaylist, 'watch-video-playlist': WatchVideoPlaylist,
'watch-video-recommendations': WatchVideoRecommendations, 'watch-video-recommendations': WatchVideoRecommendations
}, },
data: function() { data: function() {
return { return {
@ -57,7 +57,7 @@ export default Vue.extend({
captionSourceList: [], captionSourceList: [],
recommendedVideos: [], recommendedVideos: [],
watchingPlaylist: false, watchingPlaylist: false,
playlistId: '', playlistId: ''
} }
}, },
computed: { computed: {
@ -134,9 +134,9 @@ export default Vue.extend({
type: 'application/dash+xml', type: 'application/dash+xml',
label: 'Dash', label: 'Dash',
qualityLabel: 'Auto' qualityLabel: 'Auto'
}, }
] ]
}, }
}, },
watch: { watch: {
$route() { $route() {
@ -160,7 +160,7 @@ export default Vue.extend({
} }
break break
} }
}, }
}, },
mounted: function () { mounted: function () {
this.videoId = this.$route.params.id this.videoId = this.$route.params.id
@ -525,6 +525,6 @@ export default Vue.extend({
this.enableDashFormat() this.enableDashFormat()
} }
} }
}, }
}, }
}) })