Browse Source

Check for and remove all trailing commas

pull/542/head
Preston 1 year ago
parent
commit
4e92b378da
  1. 12
      .eslintrc.js
  2. 2
      .prettierrc
  3. 2
      src/renderer/App.js
  4. 2
      src/renderer/components/ft-input/ft-input.js
  5. 2
      src/renderer/components/ft-share-button/ft-share-button.js
  6. 4
      src/renderer/components/ft-toast/ft-toast.js
  7. 20
      src/renderer/components/top-nav/top-nav.js
  8. 2
      src/renderer/components/watch-video-playlist/watch-video-playlist.js
  9. 14
      src/renderer/views/Watch/Watch.js

12
.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
}
}

2
.prettierrc

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

2
src/renderer/App.js

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

2
src/renderer/components/ft-input/ft-input.js

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

2
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: {

4
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)
}
},
}
})

20
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')
},
},
}
}
})

2
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) {

14
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()
}
}
},
},
}
}
})

Loading…
Cancel
Save