ソースを参照

style: fixed most frontend eslint errors after dependency updates

Kristian Vos 3 年 前
コミット
ee0e13497b
49 ファイル変更499 行追加456 行削除
  1. 1 1
      frontend/src/aw.js
  2. 4 12
      frontend/src/components/ActivityItem.vue
  3. 1 3
      frontend/src/components/AddToPlaylistDropdown.vue
  4. 1 3
      frontend/src/components/Confirm.vue
  5. 3 4
      frontend/src/components/Modal.vue
  6. 13 13
      frontend/src/components/Queue.vue
  7. 8 7
      frontend/src/components/SongItem.vue
  8. 18 20
      frontend/src/components/SongThumbnail.vue
  9. 1 1
      frontend/src/components/layout/MainHeader.vue
  10. 3 3
      frontend/src/components/modals/CreateCommunityStation.vue
  11. 3 7
      frontend/src/components/modals/EditNews.vue
  12. 1 3
      frontend/src/components/modals/EditPlaylist/Tabs/AddSongs.vue
  13. 2 6
      frontend/src/components/modals/EditPlaylist/Tabs/ImportPlaylists.vue
  14. 1 1
      frontend/src/components/modals/EditPlaylist/Tabs/Settings.vue
  15. 21 15
      frontend/src/components/modals/EditPlaylist/index.vue
  16. 7 11
      frontend/src/components/modals/EditSong/Tabs/Discogs.vue
  17. 18 4
      frontend/src/components/modals/EditSong/Tabs/Reports.vue
  18. 1 3
      frontend/src/components/modals/EditSong/Tabs/Youtube.vue
  19. 26 23
      frontend/src/components/modals/EditSong/index.vue
  20. 12 18
      frontend/src/components/modals/ImportAlbum.vue
  21. 33 33
      frontend/src/components/modals/ManageStation/Tabs/Playlists.vue
  22. 3 3
      frontend/src/components/modals/ManageStation/Tabs/Settings.vue
  23. 11 5
      frontend/src/components/modals/ManageStation/Tabs/Songs.vue
  24. 4 10
      frontend/src/components/modals/ManageStation/index.vue
  25. 5 7
      frontend/src/components/modals/RemoveAccount.vue
  26. 14 7
      frontend/src/components/modals/Report.vue
  27. 9 2
      frontend/src/components/modals/ViewReport.vue
  28. 1 1
      frontend/src/components/modals/WhatIsNew.vue
  29. 2 3
      frontend/src/mixins/SortablePlaylists.vue
  30. 6 5
      frontend/src/mixins/TabQueryHandler.vue
  31. 1 1
      frontend/src/pages/Admin/tabs/HiddenSongs.vue
  32. 5 5
      frontend/src/pages/Admin/tabs/Reports.vue
  33. 3 2
      frontend/src/pages/Admin/tabs/Stations.vue
  34. 28 7
      frontend/src/pages/Admin/tabs/Statistics.vue
  35. 1 1
      frontend/src/pages/Admin/tabs/UnverifiedSongs.vue
  36. 1 1
      frontend/src/pages/Admin/tabs/VerifiedSongs.vue
  37. 13 11
      frontend/src/pages/Home.vue
  38. 3 3
      frontend/src/pages/Profile/Tabs/Playlists.vue
  39. 8 2
      frontend/src/pages/ResetPassword.vue
  40. 1 1
      frontend/src/pages/Settings/Tabs/Security.vue
  41. 12 11
      frontend/src/pages/Station/Sidebar/Playlists.vue
  42. 8 10
      frontend/src/pages/Station/Sidebar/Users.vue
  43. 126 82
      frontend/src/pages/Station/index.vue
  44. 8 10
      frontend/src/pages/Team.vue
  45. 12 21
      frontend/src/store/modules/admin.js
  46. 3 4
      frontend/src/store/modules/modals/editSong.js
  47. 4 3
      frontend/src/store/modules/modals/importAlbum.js
  48. 23 39
      frontend/src/store/modules/user.js
  49. 6 8
      frontend/src/validation.js

+ 1 - 1
frontend/src/aw.js

@@ -68,7 +68,7 @@ export default {
 		if (!enabled) {
 			uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
 				/[xy]/g,
-				function abc(c) {
+				c => {
 					// eslint-disable-next-line
 					const r = (Math.random() * 16) | 0;
 					// eslint-disable-next-line

+ 4 - 12
frontend/src/components/ActivityItem.vue

@@ -46,12 +46,8 @@ export default {
 	},
 	computed: {
 		formattedMessage() {
-			const {
-				youtubeId,
-				playlistId,
-				stationId,
-				reportId
-			} = this.activity.payload;
+			const { youtubeId, playlistId, stationId, reportId } =
+				this.activity.payload;
 			let { message } = this.activity.payload;
 
 			if (youtubeId) {
@@ -91,12 +87,8 @@ export default {
 			};
 		},
 		textOnlyMessage() {
-			const {
-				youtubeId,
-				playlistId,
-				stationId,
-				reportId
-			} = this.activity.payload;
+			const { youtubeId, playlistId, stationId, reportId } =
+				this.activity.payload;
 			let { message } = this.activity.payload;
 
 			if (reportId) {

+ 1 - 3
frontend/src/components/AddToPlaylistDropdown.vue

@@ -55,9 +55,7 @@
 				class="button is-primary"
 				@click="createPlaylist()"
 			>
-				<i class="material-icons icon-with-button">
-					edit
-				</i>
+				<i class="material-icons icon-with-button"> edit </i>
 				Create Playlist
 			</button>
 		</template>

+ 1 - 3
frontend/src/components/Confirm.vue

@@ -16,9 +16,7 @@
 			<slot ref="trigger" />
 		</div>
 		<template #content>
-			<a @click="confirm($event)">
-				Click to Confirm
-			</a>
+			<a @click="confirm($event)"> Click to Confirm </a>
 		</template>
 	</tippy>
 </template>

+ 3 - 4
frontend/src/components/Modal.vue

@@ -29,14 +29,13 @@ export default {
 		this.type = this.toCamelCase(this.title);
 	},
 	methods: {
-		toCamelCase: str => {
-			return str
+		toCamelCase: str =>
+			str
 				.toLowerCase()
 				.replace(/[-_]+/g, " ")
 				.replace(/[^\w\s]/g, "")
 				.replace(/ (.)/g, $1 => $1.toUpperCase())
-				.replace(/ /g, "");
-		},
+				.replace(/ /g, ""),
 		...mapActions("modalVisibility", ["closeCurrentModal"])
 	}
 };

+ 13 - 13
frontend/src/components/Queue.vue

@@ -19,12 +19,12 @@
 				@end="drag = false"
 				@change="repositionSongInQueue"
 			>
-				<template #item="{element, index}">
+				<template #item="{ element, index }">
 					<song-item
 						:song="element"
 						:requested-by="
 							station.type === 'community' &&
-								station.partyMode === true
+							station.partyMode === true
 						"
 						:class="{
 							'item-draggable': isAdminOnly() || isOwnerOnly()
@@ -75,12 +75,12 @@
 			class="button is-primary tab-actionable-button"
 			v-if="
 				sector === 'station' &&
-					loggedIn &&
-					station.type === 'community' &&
-					station.partyMode &&
-					((station.locked && isOwnerOnly()) ||
-						!station.locked ||
-						(station.locked && isAdminOnly() && dismissedWarning))
+				loggedIn &&
+				station.type === 'community' &&
+				station.partyMode &&
+				((station.locked && isOwnerOnly()) ||
+					!station.locked ||
+					(station.locked && isAdminOnly() && dismissedWarning))
 			"
 			@click="openModal('manageStation') & showManageStationTab('songs')"
 		>
@@ -101,11 +101,11 @@
 			class="button is-primary tab-actionable-button disabled"
 			v-if="
 				sector === 'station' &&
-					!loggedIn &&
-					((station.type === 'community' &&
-						station.partyMode &&
-						!station.locked) ||
-						station.type === 'official')
+				!loggedIn &&
+				((station.type === 'community' &&
+					station.partyMode &&
+					!station.locked) ||
+					station.type === 'official')
 			"
 			content="Login to add songs to queue"
 			v-tippy="{ theme: 'info' }"

+ 8 - 7
frontend/src/components/SongItem.vue

@@ -91,9 +91,7 @@
 							<a
 								v-if="disabledActions.indexOf('youtube') === -1"
 								target="_blank"
-								:href="
-									`https://www.youtube.com/watch?v=${song.youtubeId}`
-								"
+								:href="`https://www.youtube.com/watch?v=${song.youtubeId}`"
 								content="View on Youtube"
 								v-tippy
 							>
@@ -111,14 +109,17 @@
 							<add-to-playlist-dropdown
 								v-if="
 									disabledActions.indexOf('addToPlaylist') ===
-										-1
+									-1
 								"
 								:song="song"
 								placement="top-end"
 							>
 								<template #button>
 									<i
-										class="material-icons add-to-playlist-icon"
+										class="
+											material-icons
+											add-to-playlist-icon
+										"
 										content="Add Song to Playlist"
 										v-tippy
 										>playlist_add</i
@@ -128,8 +129,8 @@
 							<i
 								v-if="
 									loggedIn &&
-										userRole === 'admin' &&
-										disabledActions.indexOf('edit') === -1
+									userRole === 'admin' &&
+									disabledActions.indexOf('edit') === -1
 								"
 								class="material-icons edit-icon"
 								@click="edit(song)"

+ 18 - 20
frontend/src/components/SongThumbnail.vue

@@ -3,17 +3,16 @@
 		<div
 			v-if="
 				song.youtubeId &&
-					(!song.thumbnail ||
-						(song.thumbnail &&
-							(song.thumbnail.lastIndexOf('notes-transparent') !==
+				(!song.thumbnail ||
+					(song.thumbnail &&
+						(song.thumbnail.lastIndexOf('notes-transparent') !==
+							-1 ||
+							song.thumbnail.lastIndexOf('/assets/notes.png') !==
 								-1 ||
-								song.thumbnail.lastIndexOf(
-									'/assets/notes.png'
-								) !== -1 ||
-								song.thumbnail.lastIndexOf('i.ytimg.com') !==
-									-1)) ||
-						song.thumbnail === 'empty' ||
-						song.thumbnail == null)
+							song.thumbnail.lastIndexOf('i.ytimg.com') !==
+								-1)) ||
+					song.thumbnail === 'empty' ||
+					song.thumbnail == null)
 			"
 			class="yt-thumbnail-bg"
 			:style="{
@@ -26,17 +25,16 @@
 		<img
 			v-if="
 				song.youtubeId &&
-					(!song.thumbnail ||
-						(song.thumbnail &&
-							(song.thumbnail.lastIndexOf('notes-transparent') !==
+				(!song.thumbnail ||
+					(song.thumbnail &&
+						(song.thumbnail.lastIndexOf('notes-transparent') !==
+							-1 ||
+							song.thumbnail.lastIndexOf('/assets/notes.png') !==
 								-1 ||
-								song.thumbnail.lastIndexOf(
-									'/assets/notes.png'
-								) !== -1 ||
-								song.thumbnail.lastIndexOf('i.ytimg.com') !==
-									-1)) ||
-						song.thumbnail === 'empty' ||
-						song.thumbnail == null)
+							song.thumbnail.lastIndexOf('i.ytimg.com') !==
+								-1)) ||
+					song.thumbnail === 'empty' ||
+					song.thumbnail == null)
 			"
 			loading="lazy"
 			:src="`https://img.youtube.com/vi/${song.youtubeId}/mqdefault.jpg`"

+ 1 - 1
frontend/src/components/layout/MainHeader.vue

@@ -31,7 +31,7 @@
 			</router-link>
 			<span v-if="loggedIn" class="grouped">
 				<router-link
-					class="nav-item "
+					class="nav-item"
 					:to="{
 						name: 'profile',
 						params: { username }

+ 3 - 3
frontend/src/components/modals/CreateCommunityStation.vue

@@ -91,9 +91,9 @@ export default {
 
 			let characters = description.split("");
 
-			characters = characters.filter(character => {
-				return character.charCodeAt(0) === 21328;
-			});
+			characters = characters.filter(
+				character => character.charCodeAt(0) === 21328
+			);
 
 			if (characters.length !== 0)
 				return new Toast("Invalid description format.");

+ 3 - 7
frontend/src/components/modals/EditNews.vue

@@ -45,7 +45,7 @@
 						<user-id-to-username
 							:user-id="createdBy"
 							:alt="createdBy"
-							:link="true"/></span
+							:link="true" /></span
 					><span :title="new Date(createdAt)">
 						{{
 							formatDistance(createdAt, new Date(), {
@@ -104,12 +104,8 @@ export default {
 		if (this.newsId) {
 			this.socket.dispatch(`news.getNewsFromId`, this.newsId, res => {
 				if (res.status === "success") {
-					const {
-						markdown,
-						status,
-						createdBy,
-						createdAt
-					} = res.data.news;
+					const { markdown, status, createdBy, createdAt } =
+						res.data.news;
 					this.markdown = markdown;
 					this.status = status;
 					this.createdBy = createdBy;

+ 1 - 3
frontend/src/components/modals/EditPlaylist/Tabs/AddSongs.vue

@@ -1,8 +1,6 @@
 <template>
 	<div class="youtube-tab section">
-		<label class="label">
-			Search for a song from YouTube
-		</label>
+		<label class="label"> Search for a song from YouTube </label>
 		<div class="control is-grouped input-with-button">
 			<p class="control is-expanded">
 				<input

+ 2 - 6
frontend/src/components/modals/EditPlaylist/Tabs/ImportPlaylists.vue

@@ -1,8 +1,6 @@
 <template>
 	<div class="youtube-tab section">
-		<label class="label">
-			Search for a playlist from YouTube
-		</label>
+		<label class="label"> Search for a playlist from YouTube </label>
 		<div class="control is-grouped input-with-button">
 			<p class="control is-expanded">
 				<input
@@ -17,9 +15,7 @@
 				<span class="select" id="playlist-import-type">
 					<select v-model="search.playlist.isImportingOnlyMusic">
 						<option :value="false">Import all</option>
-						<option :value="true">
-							Import only music
-						</option>
+						<option :value="true">Import only music</option>
 					</select>
 				</span>
 				<a

+ 1 - 1
frontend/src/components/modals/EditPlaylist/Tabs/Settings.vue

@@ -35,7 +35,7 @@
 		<div
 			v-if="
 				userId === playlist.createdBy ||
-					(playlist.type === 'genre' && isAdmin())
+				(playlist.type === 'genre' && isAdmin())
 			"
 		>
 			<label class="label"> Change privacy </label>

+ 21 - 15
frontend/src/components/modals/EditPlaylist/index.vue

@@ -28,8 +28,8 @@
 								@click="showTab('settings')"
 								v-if="
 									userId === playlist.createdBy ||
-										isEditable() ||
-										(playlist.type === 'genre' && isAdmin())
+									isEditable() ||
+									(playlist.type === 'genre' && isAdmin())
 								"
 							>
 								Settings
@@ -60,8 +60,8 @@
 							v-show="tab === 'settings'"
 							v-if="
 								userId === playlist.createdBy ||
-									isEditable() ||
-									(playlist.type === 'genre' && isAdmin())
+								isEditable() ||
+								(playlist.type === 'genre' && isAdmin())
 							"
 						/>
 						<add-songs
@@ -105,7 +105,7 @@
 								@end="drag = false"
 								@change="repositionSong"
 							>
-								<template #item="{element, index}">
+								<template #item="{ element, index }">
 									<div class="menu-list scrollable-list">
 										<song-item
 											:song="element"
@@ -115,10 +115,13 @@
 										>
 											<template #actions>
 												<i
-													class="material-icons add-to-queue-icon"
+													class="
+														material-icons
+														add-to-queue-icon
+													"
 													v-if="
 														station.partyMode &&
-															!station.locked
+														!station.locked
 													"
 													@click="
 														addSongToQueue(
@@ -133,7 +136,7 @@
 													v-if="
 														userId ===
 															playlist.createdBy ||
-															isEditable()
+														isEditable()
 													"
 													placement="left"
 													@confirm="
@@ -143,7 +146,10 @@
 													"
 												>
 													<i
-														class="material-icons delete-icon"
+														class="
+															material-icons
+															delete-icon
+														"
 														content="Remove Song from Playlist"
 														v-tippy
 														>delete_forever</i
@@ -153,7 +159,7 @@
 													class="material-icons"
 													v-if="
 														isEditable() &&
-															index > 0
+														index > 0
 													"
 													@click="
 														moveSongToTop(
@@ -168,9 +174,9 @@
 												<i
 													v-if="
 														isEditable() &&
-															playlistSongs.length -
-																1 !==
-																index
+														playlistSongs.length -
+															1 !==
+															index
 													"
 													@click="
 														moveSongToBottom(
@@ -214,8 +220,8 @@
 				class="button is-default"
 				v-if="
 					userId === playlist.createdBy ||
-						isEditable() ||
-						playlist.privacy === 'public'
+					isEditable() ||
+					playlist.privacy === 'public'
 				"
 				@click="downloadPlaylist()"
 				href="#"

+ 7 - 11
frontend/src/components/modals/EditSong/Tabs/Discogs.vue

@@ -134,8 +134,8 @@
 		<button
 			v-if="
 				discogs.apiResults.length > 0 &&
-					!discogs.disableLoadMore &&
-					discogs.page < discogs.pages
+				!discogs.disableLoadMore &&
+				discogs.page < discogs.pages
 			"
 			class="button is-fullwidth is-info discogs-load-more"
 			@click="loadNextDiscogsPage()"
@@ -190,9 +190,7 @@ export default {
 			else if (apiResult.gotMoreInfo === true) apiResult.expanded = true;
 			else {
 				fetch(apiResult.album.resourceUrl)
-					.then(response => {
-						return response.json();
-					})
+					.then(response => response.json())
 					.then(data => {
 						apiResult.album.artists = [];
 						apiResult.album.artistIds = [];
@@ -205,12 +203,10 @@ export default {
 							);
 							apiResult.album.artistIds.push(artist.id);
 						});
-						apiResult.tracks = data.tracklist.map(track => {
-							return {
-								position: track.position,
-								title: track.title
-							};
-						});
+						apiResult.tracks = data.tracklist.map(track => ({
+							position: track.position,
+							title: track.title
+						}));
 						apiResult.expanded = true;
 						apiResult.gotMoreInfo = true;
 					});

+ 18 - 4
frontend/src/components/modals/EditSong/Tabs/Reports.vue

@@ -50,7 +50,11 @@
 							:key="issueIndex"
 						>
 							<i
-								class="material-icons duration-icon report-sub-item-left-icon"
+								class="
+									material-icons
+									duration-icon
+									report-sub-item-left-icon
+								"
 								:content="issue.category"
 								v-tippy
 							>
@@ -70,7 +74,10 @@
 							</p>
 
 							<div
-								class="report-sub-item-actions universal-item-actions"
+								class="
+									report-sub-item-actions
+									universal-item-actions
+								"
 							>
 								<i
 									class="material-icons resolve-icon"
@@ -138,7 +145,11 @@
 							:key="issueIndex"
 						>
 							<i
-								class="material-icons duration-icon report-sub-item-left-icon"
+								class="
+									material-icons
+									duration-icon
+									report-sub-item-left-icon
+								"
 								:content="issue.category"
 								v-tippy
 							>
@@ -157,7 +168,10 @@
 							</p>
 
 							<div
-								class="report-sub-item-actions universal-item-actions"
+								class="
+									report-sub-item-actions
+									universal-item-actions
+								"
 							>
 								<i
 									class="material-icons resolve-icon"

+ 1 - 3
frontend/src/components/modals/EditSong/Tabs/Youtube.vue

@@ -1,8 +1,6 @@
 <template>
 	<div class="youtube-tab">
-		<label class="label">
-			Search for a song from YouTube
-		</label>
+		<label class="label"> Search for a song from YouTube </label>
 		<div class="control is-grouped input-with-button">
 			<p class="control is-expanded">
 				<input

+ 26 - 23
frontend/src/components/modals/EditSong/index.vue

@@ -41,7 +41,10 @@
 										>stop</i
 									>
 									<i
-										class="material-icons player-fast-forward"
+										class="
+											material-icons
+											player-fast-forward
+										"
 										@click="settings('skipToLast10Secs')"
 										@keyup.enter="
 											settings('skipToLast10Secs')
@@ -190,7 +193,7 @@
 									v-if="
 										(artistInputFocussed ||
 											artistAutosuggestContainerFocussed) &&
-											artistAutosuggestItems.length > 0
+										artistAutosuggestItems.length > 0
 									"
 									@mouseover="focusArtistContainer()"
 									@mouseleave="blurArtistContainer()"
@@ -264,7 +267,7 @@
 									v-if="
 										(genreInputFocussed ||
 											genreAutosuggestContainerFocussed) &&
-											genreAutosuggestItems.length > 0
+										genreAutosuggestItems.length > 0
 									"
 									@mouseover="focusGenreContainer()"
 									@mouseleave="blurGenreContainer()"
@@ -646,7 +649,8 @@ export default {
 								this.video.player.setVolume(volume);
 								if (volume > 0) this.video.player.unMute();
 
-								const duration = this.video.player.getDuration();
+								const duration =
+									this.video.player.getDuration();
 
 								this.youtubeVideoDuration = duration.toFixed(3);
 								this.youtubeVideoNote = "(~)";
@@ -671,10 +675,10 @@ export default {
 									!skipToLast10SecsPressed
 								) {
 									this.video.paused = false;
-									let youtubeDuration = this.video.player.getDuration();
-									const newYoutubeVideoDuration = youtubeDuration.toFixed(
-										3
-									);
+									let youtubeDuration =
+										this.video.player.getDuration();
+									const newYoutubeVideoDuration =
+										youtubeDuration.toFixed(3);
 
 									const songDurationNumber = Number(
 										this.song.duration
@@ -683,15 +687,12 @@ export default {
 										Number(this.song.duration) + 1;
 									const songDurationNumber3 =
 										Number(this.song.duration) - 1;
-									const fixedSongDuration = songDurationNumber.toFixed(
-										3
-									);
-									const fixedSongDuration2 = songDurationNumber2.toFixed(
-										3
-									);
-									const fixedSongDuration3 = songDurationNumber3.toFixed(
-										3
-									);
+									const fixedSongDuration =
+										songDurationNumber.toFixed(3);
+									const fixedSongDuration2 =
+										songDurationNumber2.toFixed(3);
+									const fixedSongDuration3 =
+										songDurationNumber3.toFixed(3);
 
 									if (
 										this.youtubeVideoDuration !==
@@ -703,9 +704,11 @@ export default {
 											fixedSongDuration3 ===
 												this.youtubeVideoDuration)
 									)
-										this.song.duration = newYoutubeVideoDuration;
+										this.song.duration =
+											newYoutubeVideoDuration;
 
-									this.youtubeVideoDuration = newYoutubeVideoDuration;
+									this.youtubeVideoDuration =
+										newYoutubeVideoDuration;
 									this.youtubeVideoNote = "";
 
 									if (this.song.duration === -1)
@@ -1226,11 +1229,11 @@ export default {
 			clearTimeout(this.keydownGenreInputTimeout);
 			this.keydownGenreInputTimeout = setTimeout(() => {
 				if (this.genreInputValue.length > 1) {
-					this.genreAutosuggestItems = this.genres.filter(genre => {
-						return genre
+					this.genreAutosuggestItems = this.genres.filter(genre =>
+						genre
 							.toLowerCase()
-							.startsWith(this.genreInputValue.toLowerCase());
-					});
+							.startsWith(this.genreInputValue.toLowerCase())
+					);
 				} else this.genreAutosuggestItems = [];
 			}, 1000);
 		},

+ 12 - 18
frontend/src/components/modals/ImportAlbum.vue

@@ -97,9 +97,7 @@
 									<div
 										class="track"
 										v-for="track in result.tracks"
-										:key="
-											`${track.position}-${track.title}`
-										"
+										:key="`${track.position}-${track.title}`"
 									>
 										<span>{{ track.position }}.</span>
 										<p>{{ track.title }}</p>
@@ -111,8 +109,8 @@
 					<button
 						v-if="
 							discogs.apiResults.length > 0 &&
-								!discogs.disableLoadMore &&
-								discogs.page < discogs.pages
+							!discogs.disableLoadMore &&
+							discogs.page < discogs.pages
 						"
 						class="button is-fullwidth is-info discogs-load-more"
 						@click="loadNextDiscogsPage()"
@@ -215,7 +213,7 @@
 						@end="drag = false"
 						@change="log"
 					>
-						<template #item="{element}">
+						<template #item="{ element }">
 							<song-item
 								:key="`playlist-song-${element._id}`"
 								:song="element"
@@ -246,7 +244,7 @@
 							@end="drag = false"
 							@change="log"
 						>
-							<template #item="{element}">
+							<template #item="{ element }">
 								<song-item
 									:key="`track-song-${element._id}`"
 									:song="element"
@@ -367,8 +365,8 @@ export default {
 				setTimeout(() => {
 					this.editSong({
 						_id: this.songsToEdit[this.currentEditSongIndex].songId,
-						discogs: this.songsToEdit[this.currentEditSongIndex]
-							.discogs
+						discogs:
+							this.songsToEdit[this.currentEditSongIndex].discogs
 					});
 					this.currentEditSongIndex += 1;
 					this.openModal("editSong");
@@ -469,9 +467,7 @@ export default {
 			else if (apiResult.gotMoreInfo === true) apiResult.expanded = true;
 			else {
 				fetch(apiResult.album.resourceUrl)
-					.then(response => {
-						return response.json();
-					})
+					.then(response => response.json())
 					.then(data => {
 						apiResult.album.artists = [];
 						apiResult.album.artistIds = [];
@@ -484,12 +480,10 @@ export default {
 							);
 							apiResult.album.artistIds.push(artist.id);
 						});
-						apiResult.tracks = data.tracklist.map(track => {
-							return {
-								position: track.position,
-								title: track.title
-							};
-						});
+						apiResult.tracks = data.tracklist.map(track => ({
+							position: track.position,
+							title: track.title
+						}));
 						apiResult.expanded = true;
 						apiResult.gotMoreInfo = true;
 					});

+ 33 - 33
frontend/src/components/modals/ManageStation/Tabs/Playlists.vue

@@ -78,7 +78,7 @@
 								class="material-icons"
 								v-if="
 									isAllowedToParty() &&
-										isSelected(playlist._id)
+									isSelected(playlist._id)
 								"
 								content="This playlist is currently selected"
 								v-tippy
@@ -89,8 +89,8 @@
 								class="material-icons"
 								v-else-if="
 									isOwnerOrAdmin() &&
-										isPlaylistMode() &&
-										isIncluded(playlist._id)
+									isPlaylistMode() &&
+									isIncluded(playlist._id)
 								"
 								content="This playlist is currently included"
 								v-tippy
@@ -144,8 +144,8 @@
 							<confirm
 								v-if="
 									isOwnerOrAdmin() &&
-										isPlaylistMode() &&
-										isIncluded(playlist._id)
+									isPlaylistMode() &&
+									isIncluded(playlist._id)
 								"
 								@confirm="removeIncludedPlaylist(playlist._id)"
 							>
@@ -160,8 +160,8 @@
 							<i
 								v-if="
 									isPartyMode() &&
-										!isSelected(playlist._id) &&
-										!isExcluded(playlist._id)
+									!isSelected(playlist._id) &&
+									!isExcluded(playlist._id)
 								"
 								@click="selectPartyPlaylist(playlist)"
 								class="material-icons play-icon"
@@ -172,9 +172,9 @@
 							<i
 								v-if="
 									isOwnerOrAdmin() &&
-										isPlaylistMode() &&
-										!isIncluded(playlist._id) &&
-										!isExcluded(playlist._id)
+									isPlaylistMode() &&
+									!isIncluded(playlist._id) &&
+									!isExcluded(playlist._id)
 								"
 								@click="includePlaylist(playlist)"
 								class="material-icons play-icon"
@@ -185,7 +185,7 @@
 							<confirm
 								v-if="
 									isOwnerOrAdmin() &&
-										!isExcluded(playlist._id)
+									!isExcluded(playlist._id)
 								"
 								@confirm="blacklistPlaylist(playlist._id)"
 							>
@@ -221,8 +221,7 @@
 							<i
 								v-if="
 									playlist.createdBy !== myUserId &&
-										(playlist.privacy === 'public' ||
-											isAdmin())
+									(playlist.privacy === 'public' || isAdmin())
 								"
 								@click="showPlaylist(playlist._id)"
 								class="material-icons edit-icon"
@@ -269,7 +268,7 @@
 						@end="drag = false"
 						@change="savePlaylistOrder"
 					>
-						<template #item="{element}">
+						<template #item="{ element }">
 							<playlist-item
 								class="item-draggable"
 								:playlist="element"
@@ -279,7 +278,7 @@
 										class="material-icons"
 										v-if="
 											isAllowedToParty() &&
-												isSelected(element._id)
+											isSelected(element._id)
 										"
 										content="This playlist is currently selected"
 										v-tippy
@@ -290,8 +289,8 @@
 										class="material-icons"
 										v-else-if="
 											isOwnerOrAdmin() &&
-												isPlaylistMode() &&
-												isIncluded(element._id)
+											isPlaylistMode() &&
+											isIncluded(element._id)
 										"
 										content="This playlist is currently included"
 										v-tippy
@@ -302,7 +301,7 @@
 										class="material-icons excluded-icon"
 										v-else-if="
 											isOwnerOrAdmin() &&
-												isExcluded(element._id)
+											isExcluded(element._id)
 										"
 										content="This playlist is currently excluded"
 										v-tippy
@@ -334,7 +333,7 @@
 									<i
 										v-if="
 											isPartyMode() &&
-												!isSelected(element._id)
+											!isSelected(element._id)
 										"
 										@click="selectPartyPlaylist(element)"
 										class="material-icons play-icon"
@@ -345,8 +344,8 @@
 									<i
 										v-if="
 											isPlaylistMode() &&
-												isOwnerOrAdmin() &&
-												!isSelected(element._id)
+											isOwnerOrAdmin() &&
+											!isSelected(element._id)
 										"
 										@click="includePlaylist(element)"
 										class="material-icons play-icon"
@@ -357,7 +356,7 @@
 									<confirm
 										v-if="
 											isPartyMode() &&
-												isSelected(element._id)
+											isSelected(element._id)
 										"
 										@confirm="
 											deselectPartyPlaylist(element._id)
@@ -373,8 +372,8 @@
 									<confirm
 										v-if="
 											isPlaylistMode() &&
-												isOwnerOrAdmin() &&
-												isIncluded(element._id)
+											isOwnerOrAdmin() &&
+											isIncluded(element._id)
 										"
 										@confirm="
 											removeIncludedPlaylist(element._id)
@@ -390,7 +389,7 @@
 									<confirm
 										v-if="
 											isOwnerOrAdmin() &&
-												!isExcluded(element._id)
+											!isExcluded(element._id)
 										"
 										@confirm="
 											blacklistPlaylist(element._id)
@@ -406,7 +405,7 @@
 									<confirm
 										v-if="
 											isOwnerOrAdmin() &&
-												isExcluded(element._id)
+											isExcluded(element._id)
 										"
 										@confirm="
 											removeExcludedPlaylist(element._id)
@@ -490,8 +489,7 @@
 							<i
 								v-if="
 									playlist.createdBy !== myUserId &&
-										(playlist.privacy === 'public' ||
-											isAdmin())
+									(playlist.privacy === 'public' || isAdmin())
 								"
 								@click="showPlaylist(playlist._id)"
 								class="material-icons edit-icon"
@@ -563,8 +561,7 @@
 							<i
 								v-if="
 									playlist.createdBy !== myUserId &&
-										(playlist.privacy === 'public' ||
-											isAdmin())
+									(playlist.privacy === 'public' || isAdmin())
 								"
 								@click="showPlaylist(playlist._id)"
 								class="material-icons edit-icon"
@@ -924,9 +921,12 @@ export default {
 					if (queueSong.requestedBy === this.userId) isInQueue = true;
 				});
 				if (!isInQueue && this.partyPlaylists) {
-					const selectedPlaylist = this.partyPlaylists[
-						Math.floor(Math.random() * this.partyPlaylists.length)
-					];
+					const selectedPlaylist =
+						this.partyPlaylists[
+							Math.floor(
+								Math.random() * this.partyPlaylists.length
+							)
+						];
 					if (
 						selectedPlaylist._id &&
 						selectedPlaylist.songs.length > 0

+ 3 - 3
frontend/src/components/modals/ManageStation/Tabs/Settings.vue

@@ -409,9 +409,9 @@ export default {
 		updateDescription() {
 			if (this.originalStation.description !== this.station.description) {
 				const { description } = this.station;
-				const characters = description.split("").filter(character => {
-					return character.charCodeAt(0) === 21328;
-				});
+				const characters = description
+					.split("")
+					.filter(character => character.charCodeAt(0) === 21328);
 				if (!validation.isLength(description, 2, 200)) {
 					new Toast(
 						"Description must have between 2 and 200 characters."

+ 11 - 5
frontend/src/components/modals/ManageStation/Tabs/Songs.vue

@@ -32,8 +32,8 @@
 				v-show="tab === 'search'"
 				v-if="
 					station.type === 'community' &&
-						station.partyMode &&
-						(isOwnerOrAdmin() || !station.locked)
+					station.partyMode &&
+					(isOwnerOrAdmin() || !station.locked)
 				"
 			>
 				<div class="musare-songs">
@@ -128,7 +128,10 @@
 										key="added-to-queue"
 									>
 										<i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>done</i
 										>
 										Added to queue
@@ -142,7 +145,10 @@
 										key="add-to-queue"
 									>
 										<i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>add</i
 										>
 										Add to queue
@@ -165,7 +171,7 @@
 				v-show="tab === 'included'"
 				v-if="
 					isOwnerOrAdmin() &&
-						!(station.type === 'community' && station.partyMode)
+					!(station.type === 'community' && station.partyMode)
 				"
 			>
 				<div v-if="stationPlaylist.songs.length > 0">

+ 4 - 10
frontend/src/components/modals/ManageStation/index.vue

@@ -53,9 +53,7 @@
 									<i class="material-icons icon-with-button"
 										>play_arrow</i
 									>
-									<span>
-										Resume Station
-									</span>
+									<span> Resume Station </span>
 								</button>
 								<button
 									class="button is-danger"
@@ -65,9 +63,7 @@
 									<i class="material-icons icon-with-button"
 										>pause</i
 									>
-									<span>
-										Pause Station
-									</span>
+									<span> Pause Station </span>
 								</button>
 
 								<!-- (Admin) Skip Button -->
@@ -78,9 +74,7 @@
 									<i class="material-icons icon-with-button"
 										>skip_next</i
 									>
-									<span>
-										Force Skip
-									</span>
+									<span> Force Skip </span>
 								</button>
 
 								<!-- Station Settings Button -->
@@ -164,7 +158,7 @@
 							:song="currentSong"
 							:requested-by="
 								station.type === 'community' &&
-									station.partyMode === true
+								station.partyMode === true
 							"
 							header="Currently Playing.."
 							class="currently-playing"

+ 5 - 7
frontend/src/components/modals/RemoveAccount.vue

@@ -48,9 +48,7 @@
 				id="password-linked"
 				v-if="step === 'confirm-identity' && isPasswordLinked"
 			>
-				<h2 class="content-box-title">
-					Enter your password
-				</h2>
+				<h2 class="content-box-title">Enter your password</h2>
 				<p class="content-box-description">
 					Confirming your password will let us verify your identity.
 				</p>
@@ -248,13 +246,13 @@ export default {
 		remove() {
 			return this.socket.dispatch("users.remove", res => {
 				if (res.status === "success") {
-					return this.socket.dispatch("users.logout", () => {
-						return lofig.get("cookie").then(cookie => {
+					return this.socket.dispatch("users.logout", () =>
+						lofig.get("cookie").then(cookie => {
 							document.cookie = `${cookie.SIDname}=;expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
 							this.closeModal("removeAccount");
 							return window.location.reload();
-						});
-					});
+						})
+					);
 				}
 
 				return new Toast(res.message);

+ 14 - 7
frontend/src/components/modals/Report.vue

@@ -50,7 +50,8 @@
 											content="Provide More info"
 											v-tippy
 											@click="
-												issue.showDescription = !issue.showDescription
+												issue.showDescription =
+													!issue.showDescription
 											"
 										>
 											info
@@ -78,23 +79,29 @@
 										>
 
 										<button
-											class="button tab-actionable-button "
+											class="button tab-actionable-button"
 											content="Add an issue that isn't listed"
 											v-tippy
 											@click="customIssues.push('')"
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>add</i
 											>
-											<span>
-												Add Custom Issue
-											</span>
+											<span> Add Custom Issue </span>
 										</button>
 									</div>
 
 									<div
-										class="custom-issue control is-grouped input-with-button"
+										class="
+											custom-issue
+											control
+											is-grouped
+											input-with-button
+										"
 										v-for="(issue, index) in customIssues"
 										:key="index"
 									>

+ 9 - 2
frontend/src/components/modals/ViewReport.vue

@@ -28,7 +28,11 @@
 						:key="issueIndex"
 					>
 						<i
-							class="material-icons duration-icon report-sub-item-left-icon"
+							class="
+								material-icons
+								duration-icon
+								report-sub-item-left-icon
+							"
 							:content="issue.category"
 							v-tippy
 						>
@@ -47,7 +51,10 @@
 						</p>
 
 						<div
-							class="report-sub-item-actions universal-item-actions"
+							class="
+								report-sub-item-actions
+								universal-item-actions
+							"
 						>
 							<i
 								class="material-icons resolve-icon"

+ 1 - 1
frontend/src/components/modals/WhatIsNew.vue

@@ -13,7 +13,7 @@
 					<user-id-to-username
 						:user-id="news.createdBy"
 						:alt="news.createdBy"
-						:link="true"/></span
+						:link="true" /></span
 				><span :title="new Date(news.createdAt)">
 					{{
 						formatDistance(news.createdAt, new Date(), {

+ 2 - 3
frontend/src/mixins/SortablePlaylists.vue

@@ -111,9 +111,8 @@ export default {
 				const sortedPlaylists = [];
 
 				this.playlists.forEach(playlist => {
-					sortedPlaylists[
-						res.data.order.indexOf(playlist._id)
-					] = playlist;
+					sortedPlaylists[res.data.order.indexOf(playlist._id)] =
+						playlist;
 				});
 
 				this.playlists = sortedPlaylists;

+ 6 - 5
frontend/src/mixins/TabQueryHandler.vue

@@ -15,11 +15,12 @@ export default {
 				{},
 				null,
 				`${this.$route.path}?${Object.keys(queries)
-					.map(key => {
-						return `${encodeURIComponent(key)}=${encodeURIComponent(
-							queries[key]
-						)}`;
-					})
+					.map(
+						key =>
+							`${encodeURIComponent(key)}=${encodeURIComponent(
+								queries[key]
+							)}`
+					)
 					.join("&")}`
 			);
 		}

+ 1 - 1
frontend/src/pages/Admin/tabs/HiddenSongs.vue

@@ -75,7 +75,7 @@
 							<a
 								:href="
 									'https://www.youtube.com/watch?v=' +
-										`${song.youtubeId}`
+									`${song.youtubeId}`
 								"
 								target="_blank"
 							>

+ 5 - 5
frontend/src/pages/Admin/tabs/Reports.vue

@@ -24,7 +24,7 @@
 								<a
 									:href="
 										'https://www.youtube.com/watch?v=' +
-											`${report.song.youtubeId}`
+										`${report.song.youtubeId}`
 									"
 									target="_blank"
 								>
@@ -61,7 +61,7 @@
 								Expand
 							</a>
 							<a
-								class="button is-success "
+								class="button is-success"
 								href="#"
 								@click="resolve(report._id)"
 								content="Resolve"
@@ -124,9 +124,9 @@ export default {
 		});
 
 		this.socket.on("event:admin.report.resolved", res => {
-			this.reports = this.reports.filter(report => {
-				return report._id !== res.data.reportId;
-			});
+			this.reports = this.reports.filter(
+				report => report._id !== res.data.reportId
+			);
 		});
 
 		this.socket.on("event:admin.report.created", res =>

+ 3 - 2
frontend/src/pages/Admin/tabs/Stations.vue

@@ -151,8 +151,9 @@
 									>
 								</p>
 								<span
-									v-for="(genre,
-									index) in newStation.blacklistedGenres"
+									v-for="(
+										genre, index
+									) in newStation.blacklistedGenres"
 									:key="genre"
 									class="tag is-info"
 								>

+ 28 - 7
frontend/src/pages/Admin/tabs/Statistics.vue

@@ -3,7 +3,11 @@
 		<metadata title="Admin | Statistics" />
 		<div class="columns">
 			<div
-				class="card column is-10-desktop is-offset-1-desktop is-12-mobile"
+				class="
+					card
+					column
+					is-10-desktop is-offset-1-desktop is-12-mobile
+				"
 			>
 				<header class="card-header">
 					<p class="card-header-title">Average Logs</p>
@@ -51,7 +55,11 @@
 		<br />
 		<div class="columns" v-if="module">
 			<div
-				class="card column is-10-desktop is-offset-1-desktop is-12-mobile"
+				class="
+					card
+					column
+					is-10-desktop is-offset-1-desktop is-12-mobile
+				"
 			>
 				<header class="card-header">
 					<p class="card-header-title">Running tasks</p>
@@ -81,7 +89,11 @@
 				</div>
 			</div>
 			<div
-				class="card column is-10-desktop is-offset-1-desktop is-12-mobile"
+				class="
+					card
+					column
+					is-10-desktop is-offset-1-desktop is-12-mobile
+				"
 			>
 				<header class="card-header">
 					<p class="card-header-title">Paused tasks</p>
@@ -111,7 +123,11 @@
 				</div>
 			</div>
 			<div
-				class="card column is-10-desktop is-offset-1-desktop is-12-mobile"
+				class="
+					card
+					column
+					is-10-desktop is-offset-1-desktop is-12-mobile
+				"
 			>
 				<header class="card-header">
 					<p class="card-header-title">Queued tasks</p>
@@ -144,7 +160,11 @@
 		<br />
 		<div class="columns" v-if="module">
 			<div
-				class="card column is-10-desktop is-offset-1-desktop is-12-mobile"
+				class="
+					card
+					column
+					is-10-desktop is-offset-1-desktop is-12-mobile
+				"
 			>
 				<header class="card-header">
 					<p class="card-header-title">Average Logs</p>
@@ -163,8 +183,9 @@
 							</thead>
 							<tbody>
 								<tr
-									v-for="(job,
-									jobName) in module.jobStatistics"
+									v-for="(
+										job, jobName
+									) in module.jobStatistics"
 									:key="jobName"
 								>
 									<td>{{ jobName }}</td>

+ 1 - 1
frontend/src/pages/Admin/tabs/UnverifiedSongs.vue

@@ -75,7 +75,7 @@
 							<a
 								:href="
 									'https://www.youtube.com/watch?v=' +
-										`${song.youtubeId}`
+									`${song.youtubeId}`
 								"
 								target="_blank"
 							>

+ 1 - 1
frontend/src/pages/Admin/tabs/VerifiedSongs.vue

@@ -116,7 +116,7 @@
 							<a
 								:href="
 									'https://www.youtube.com/watch?v=' +
-										`${song.youtubeId}`
+									`${song.youtubeId}`
 								"
 								target="_blank"
 							>

+ 13 - 11
frontend/src/pages/Home.vue

@@ -47,7 +47,7 @@
 					v-bind="dragOptions"
 					@change="changeFavoriteOrder"
 				>
-					<template #item="{element}">
+					<template #item="{ element }">
 						<router-link
 							:to="{
 								name: 'station',
@@ -98,7 +98,10 @@
 										<h5>{{ element.displayName }}</h5>
 										<i
 											v-if="element.type === 'official'"
-											class="material-icons verified-station"
+											class="
+												material-icons
+												verified-station
+											"
 											content="Verified Station"
 											v-tippy="{
 												theme: 'info'
@@ -134,7 +137,7 @@
 										<i
 											v-if="
 												element.type === 'community' &&
-													isOwner(element)
+												isOwner(element)
 											"
 											class="homeIcon material-icons"
 											content="This is your station."
@@ -164,7 +167,7 @@
 								<i
 									v-if="
 										element.paused &&
-											element.currentSong.title
+										element.currentSong.title
 									"
 									class="material-icons"
 									content="Station Paused"
@@ -350,7 +353,7 @@
 								<i
 									v-if="
 										station.type === 'community' &&
-											isOwner(station)
+										isOwner(station)
 									"
 									class="homeIcon material-icons"
 									content="This is your station."
@@ -672,9 +675,10 @@ export default {
 
 			if (station) {
 				station.isFavorited = false;
-				this.orderOfFavoriteStations = this.orderOfFavoriteStations.filter(
-					favoritedId => favoritedId !== stationId
-				);
+				this.orderOfFavoriteStations =
+					this.orderOfFavoriteStations.filter(
+						favoritedId => favoritedId !== stationId
+					);
 			}
 		});
 
@@ -756,9 +760,7 @@ export default {
 			this.socket.dispatch(
 				"users.updateOrderOfFavoriteStations",
 				recalculatedOrder,
-				res => {
-					return new Toast(res.message);
-				}
+				res => new Toast(res.message)
 			);
 		},
 		...mapActions("modalVisibility", ["openModal"]),

+ 3 - 3
frontend/src/pages/Profile/Tabs/Playlists.vue

@@ -33,12 +33,12 @@
 				@end="drag = false"
 				@change="savePlaylistOrder"
 			>
-				<template #item="{element}">
+				<template #item="{ element }">
 					<playlist-item
 						v-if="
 							element.privacy === 'public' ||
-								(element.privacy === 'private' &&
-									element.createdBy === userId)
+							(element.privacy === 'private' &&
+								element.createdBy === userId)
 						"
 						:playlist="element"
 						:class="{

+ 8 - 2
frontend/src/pages/ResetPassword.vue

@@ -55,7 +55,10 @@
 										href="#"
 										@click="submitEmail()"
 										><i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>mail</i
 										>Request</a
 									>
@@ -112,7 +115,10 @@
 										href="#"
 										@click="verifyCode()"
 										><i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>vpn_key</i
 										>Verify</a
 									>

+ 1 - 1
frontend/src/pages/Settings/Tabs/Security.vue

@@ -204,7 +204,7 @@ export default {
 	},
 	watch: {
 		// eslint-disable-next-line func-names
-		"validation.newPassword.value": function(value) {
+		"validation.newPassword.value": function (value) {
 			if (!validation.isLength(value, 6, 200)) {
 				this.validation.newPassword.message =
 					"Password must have between 6 and 200 characters.";

+ 12 - 11
frontend/src/pages/Station/Sidebar/Playlists.vue

@@ -13,7 +13,7 @@
 				@end="drag = false"
 				@change="savePlaylistOrder"
 			>
-				<template #item="{element}">
+				<template #item="{ element }">
 					<playlist-item :playlist="element" class="item-draggable">
 						<template #actions>
 							<i
@@ -26,10 +26,9 @@
 							<i
 								v-if="
 									station.type === 'community' &&
-										(isOwnerOrAdmin() ||
-											station.partyMode) &&
-										!isSelected(element._id) &&
-										!isExcluded(element._id)
+									(isOwnerOrAdmin() || station.partyMode) &&
+									!isSelected(element._id) &&
+									!isExcluded(element._id)
 								"
 								@click="selectPlaylist(element)"
 								class="material-icons play-icon"
@@ -44,9 +43,8 @@
 							<confirm
 								v-if="
 									station.type === 'community' &&
-										(isOwnerOrAdmin() ||
-											station.partyMode) &&
-										isSelected(element._id)
+									(isOwnerOrAdmin() || station.partyMode) &&
+									isSelected(element._id)
 								"
 								@confirm="deselectPlaylist(element._id)"
 							>
@@ -280,9 +278,12 @@ export default {
 					if (queueSong.requestedBy === this.userId) isInQueue = true;
 				});
 				if (!isInQueue && this.partyPlaylists) {
-					const selectedPlaylist = this.partyPlaylists[
-						Math.floor(Math.random() * this.partyPlaylists.length)
-					];
+					const selectedPlaylist =
+						this.partyPlaylists[
+							Math.floor(
+								Math.random() * this.partyPlaylists.length
+							)
+						];
 					if (
 						selectedPlaylist._id &&
 						selectedPlaylist.songs.length > 0

+ 8 - 10
frontend/src/pages/Station/Sidebar/Users.vue

@@ -7,11 +7,11 @@
 				class="has-text-centered"
 				v-if="
 					users.loggedIn &&
-						users.loggedOut &&
-						((users.loggedIn.length === 1 &&
-							users.loggedOut.length === 0) ||
-							(users.loggedIn.length === 0 &&
-								users.loggedOut.length === 1))
+					users.loggedOut &&
+					((users.loggedIn.length === 1 &&
+						users.loggedOut.length === 0) ||
+						(users.loggedIn.length === 0 &&
+							users.loggedOut.length === 1))
 				"
 				key="only-me"
 			>
@@ -21,8 +21,8 @@
 				class="has-text-centered"
 				v-else-if="
 					users.loggedIn &&
-						users.loggedOut &&
-						users.loggedOut.length > 0
+					users.loggedOut &&
+					users.loggedOut.length > 0
 				"
 				key="logged-out-users"
 			>
@@ -58,9 +58,7 @@
 			@click="copyToClipboard()"
 		>
 			<i class="material-icons icon-with-button">share</i>
-			<span>
-				Share (copy to clipboard)
-			</span>
+			<span> Share (copy to clipboard) </span>
 		</button>
 	</div>
 </template>

+ 126 - 82
frontend/src/pages/Station/index.vue

@@ -37,9 +37,9 @@
 		<ul
 			v-if="
 				currentSong &&
-					(currentSong.youtubeId === 'l9PxOanFjxQ' ||
-						currentSong.youtubeId === 'xKVcVSYmesU' ||
-						currentSong.youtubeId === '60ItHLz5WEA')
+				(currentSong.youtubeId === 'l9PxOanFjxQ' ||
+					currentSong.youtubeId === 'xKVcVSYmesU' ||
+					currentSong.youtubeId === '60ItHLz5WEA')
 			"
 			class="bg-bubbles"
 		>
@@ -119,9 +119,7 @@
 									<i class="material-icons icon-with-button"
 										>play_arrow</i
 									>
-									<span>
-										Resume Station
-									</span>
+									<span> Resume Station </span>
 								</button>
 								<button
 									class="button is-danger"
@@ -131,9 +129,7 @@
 									<i class="material-icons icon-with-button"
 										>pause</i
 									>
-									<span>
-										Pause Station
-									</span>
+									<span> Pause Station </span>
 								</button>
 
 								<!-- (Admin) Skip Button -->
@@ -144,9 +140,7 @@
 									<i class="material-icons icon-with-button"
 										>skip_next</i
 									>
-									<span>
-										Force Skip
-									</span>
+									<span> Force Skip </span>
 								</button>
 
 								<!-- (Admin) Station Settings Button -->
@@ -157,9 +151,7 @@
 									<i class="material-icons icon-with-button"
 										>settings</i
 									>
-									<span>
-										Manage Station
-									</span>
+									<span> Manage Station </span>
 								</button>
 							</div>
 						</div>
@@ -207,8 +199,7 @@
 								<img
 									v-if="
 										currentSong &&
-											currentSong.youtubeId ===
-												'QH2-TGUlwu4'
+										currentSong.youtubeId === 'QH2-TGUlwu4'
 									"
 									src="https://freepngimg.com/thumb/nyan_cat/1-2-nyan-cat-free-download-png.png"
 									:style="{
@@ -221,14 +212,14 @@
 								<img
 									v-if="
 										currentSong &&
-											(currentSong.youtubeId ===
-												'DtVBCG6ThDk' ||
-												currentSong.youtubeId ===
-													'sI66hcu9fIs' ||
-												currentSong.youtubeId ===
-													'iYYRH4apXDo' ||
-												currentSong.youtubeId ===
-													'tRcPA7Fzebw')
+										(currentSong.youtubeId ===
+											'DtVBCG6ThDk' ||
+											currentSong.youtubeId ===
+												'sI66hcu9fIs' ||
+											currentSong.youtubeId ===
+												'iYYRH4apXDo' ||
+											currentSong.youtubeId ===
+												'tRcPA7Fzebw')
 									"
 									src="/assets/rocket.svg"
 									:style="{
@@ -242,8 +233,7 @@
 								<img
 									v-if="
 										currentSong &&
-											currentSong.youtubeId ===
-												'jofNR_WkoCE'
+										currentSong.youtubeId === 'jofNR_WkoCE'
 									"
 									src="/assets/fox.svg"
 									:style="{
@@ -258,12 +248,12 @@
 								<img
 									v-if="
 										currentSong &&
-											(currentSong.youtubeId ===
-												'l9PxOanFjxQ' ||
-												currentSong.youtubeId ===
-													'xKVcVSYmesU' ||
-												currentSong.youtubeId ===
-													'60ItHLz5WEA')
+										(currentSong.youtubeId ===
+											'l9PxOanFjxQ' ||
+											currentSong.youtubeId ===
+												'xKVcVSYmesU' ||
+											currentSong.youtubeId ===
+												'60ItHLz5WEA')
 									"
 									src="/assets/old_logo.png"
 									:style="{
@@ -289,7 +279,10 @@
 										v-tippy
 									>
 										<i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 										>
 											bug_report
 										</i>
@@ -325,7 +318,10 @@
 										v-tippy
 									>
 										<i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>skip_next</i
 										>
 									</button>
@@ -337,7 +333,10 @@
 										v-tippy
 									>
 										<i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>skip_next</i
 										>
 										{{ currentSong.skipVotes }}
@@ -349,7 +348,10 @@
 										v-tippy="{ theme: 'info' }"
 									>
 										<i
-											class="material-icons icon-with-button"
+											class="
+												material-icons
+												icon-with-button
+											"
 											>skip_next</i
 										>
 										{{ currentSong.skipVotes }}
@@ -418,7 +420,10 @@
 											v-tippy
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												:class="{
 													liked: currentSong.liked
 												}"
@@ -428,14 +433,21 @@
 
 										<!-- Dislike Song Button -->
 										<button
-											class="button is-danger dislike-song"
+											class="
+												button
+												is-danger
+												dislike-song
+											"
 											id="dislike-song"
 											@click="toggleDislike()"
 											content="Dislike Song"
 											v-tippy
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												:class="{
 													disliked:
 														currentSong.disliked
@@ -447,26 +459,42 @@
 									<div id="ratings" class="disabled" v-else>
 										<!-- Like Song Button -->
 										<button
-											class="button is-success like-song disabled"
+											class="
+												button
+												is-success
+												like-song
+												disabled
+											"
 											id="like-song"
 											content="Ratings have not been loaded yet"
 											v-tippy
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>thumb_up_alt</i
 											>
 										</button>
 
 										<!-- Dislike Song Button -->
 										<button
-											class="button is-danger dislike-song disabled"
+											class="
+												button
+												is-danger
+												dislike-song
+												disabled
+											"
 											id="dislike-song"
 											content="Ratings have not been loaded yet"
 											v-tippy
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>thumb_down_alt</i
 											>
 										</button>
@@ -485,10 +513,15 @@
 											>
 												<div class="control has-addons">
 													<button
-														class="button is-primary"
+														class="
+															button
+															is-primary
+														"
 													>
 														<i
-															class="material-icons"
+															class="
+																material-icons
+															"
 														>
 															playlist_add
 														</i>
@@ -498,7 +531,9 @@
 														id="dropdown-toggle"
 													>
 														<i
-															class="material-icons"
+															class="
+																material-icons
+															"
 														>
 															{{
 																showPlaylistDropdown
@@ -523,7 +558,10 @@
 											v-tippy="{ theme: 'info' }"
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>thumb_up_alt</i
 											>{{ currentSong.likes }}
 										</button>
@@ -536,7 +574,10 @@
 											v-tippy="{ theme: 'info' }"
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>thumb_down_alt</i
 											>{{ currentSong.dislikes }}
 										</button>
@@ -550,7 +591,10 @@
 											v-tippy="{ theme: 'info' }"
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>thumb_up_alt</i
 											>
 										</button>
@@ -563,7 +607,10 @@
 											v-tippy="{ theme: 'info' }"
 										>
 											<i
-												class="material-icons icon-with-button"
+												class="
+													material-icons
+													icon-with-button
+												"
 												>thumb_down_alt</i
 											>
 										</button>
@@ -572,7 +619,11 @@
 									<div id="add-song-to-playlist">
 										<div class="control has-addons">
 											<button
-												class="button is-primary disabled"
+												class="
+													button
+													is-primary
+													disabled
+												"
 												content="Log in to add songs to playlist"
 												v-tippy="{ theme: 'info' }"
 											>
@@ -602,7 +653,7 @@
 									:duration="false"
 									:requested-by="
 										station.type === 'community' &&
-											station.partyMode === true
+										station.partyMode === true
 									"
 									header="Currently Playing.."
 								/>
@@ -620,7 +671,7 @@
 									:duration="false"
 									:requested-by="
 										station.type === 'community' &&
-											station.partyMode === true
+										station.partyMode === true
 									"
 									header="Next Up.."
 								/>
@@ -868,9 +919,7 @@ export default {
 
 		window.scrollTo(0, 0);
 
-		Date.currently = () => {
-			return new Date().getTime() + this.systemDifference;
-		};
+		Date.currently = () => new Date().getTime() + this.systemDifference;
 
 		this.stationIdentifier = this.$route.params.id;
 
@@ -905,13 +954,8 @@ export default {
 		);
 
 		this.socket.on("event:station.nextSong", res => {
-			const {
-				currentSong,
-				startedAt,
-				paused,
-				timePaused,
-				natural
-			} = res.data;
+			const { currentSong, startedAt, paused, timePaused, natural } =
+				res.data;
 
 			if (this.noSong || !natural) {
 				this.setCurrentSong({
@@ -1101,11 +1145,12 @@ export default {
 
 			await this.$router.push(
 				`${res.data.name}?${Object.keys(this.$route.query)
-					.map(key => {
-						return `${encodeURIComponent(key)}=${encodeURIComponent(
-							this.$route.query[key]
-						)}`;
-					})
+					.map(
+						key =>
+							`${encodeURIComponent(key)}=${encodeURIComponent(
+								this.$route.query[key]
+							)}`
+					)
 					.join("&")}`
 			);
 
@@ -1243,13 +1288,8 @@ export default {
 			}
 		},
 		setCurrentSong(data) {
-			const {
-				currentSong,
-				startedAt,
-				paused,
-				timePaused,
-				pausedAt
-			} = data;
+			const { currentSong, startedAt, paused, timePaused, pausedAt } =
+				data;
 
 			if (currentSong) {
 				if (!currentSong.skipDuration || currentSong.skipDuration < 0)
@@ -1447,8 +1487,8 @@ export default {
 								});
 
 								// save current song id
-								const erroredYoutubeId = this.currentSong
-									.youtubeId;
+								const erroredYoutubeId =
+									this.currentSong.youtubeId;
 
 								// remove persistent toast if video has finished
 								window.isSongErroredInterval = setInterval(
@@ -1834,9 +1874,12 @@ export default {
 					if (queueSong.requestedBy === this.userId) isInQueue = true;
 				});
 				if (!isInQueue && this.partyPlaylists.length > 0) {
-					const selectedPlaylist = this.partyPlaylists[
-						Math.floor(Math.random() * this.partyPlaylists.length)
-					];
+					const selectedPlaylist =
+						this.partyPlaylists[
+							Math.floor(
+								Math.random() * this.partyPlaylists.length
+							)
+						];
 					if (
 						selectedPlaylist._id &&
 						selectedPlaylist.songs.length > 0
@@ -2144,7 +2187,8 @@ export default {
 					this.activityWatchVideoLastYouTubeId !==
 					this.currentSong.youtubeId
 				) {
-					this.activityWatchVideoLastYouTubeId = this.currentSong.youtubeId;
+					this.activityWatchVideoLastYouTubeId =
+						this.currentSong.youtubeId;
 					this.activityWatchVideoLastStartDuration =
 						this.currentSong.skipDuration + this.getTimeElapsed();
 				}

+ 8 - 10
frontend/src/pages/Team.vue

@@ -45,9 +45,9 @@
 									:key="project"
 									:href="
 										'https://github.com/Musare/' +
-											project +
-											'/commits?author=' +
-											member.github
+										project +
+										'/commits?author=' +
+										member.github
 									"
 									target="_blank"
 								>
@@ -96,9 +96,9 @@
 									:key="project"
 									:href="
 										'https://github.com/Musare/' +
-											project +
-											'/commits?author=' +
-											member.github
+										project +
+										'/commits?author=' +
+										member.github
 									"
 									target="_blank"
 								>
@@ -139,8 +139,7 @@ export default {
 			currentTeam: [
 				{
 					name: "Kristian Vos",
-					bio:
-						"Co-Founder, Owner, Lead Developer, System Admin and QA Tester.",
+					bio: "Co-Founder, Owner, Lead Developer, System Admin and QA Tester.",
 					projects: [
 						"MusareMeteor",
 						"MusareReact",
@@ -160,8 +159,7 @@ export default {
 				},
 				{
 					name: "Owen Diffey",
-					bio:
-						"Developer, Designer, System Admin and QA Tester. Previously Owner and Project Manager.",
+					bio: "Developer, Designer, System Admin and QA Tester. Previously Owner and Project Manager.",
 					projects: [
 						"MusareMeteor",
 						"MusareReact",

+ 12 - 21
frontend/src/store/modules/admin.js

@@ -33,9 +33,7 @@ const modules = {
 				state.songs.push(song);
 			},
 			removeSong(state, songId) {
-				state.songs = state.songs.filter(song => {
-					return song._id !== songId;
-				});
+				state.songs = state.songs.filter(song => song._id !== songId);
 			},
 			updateSong(state, updatedSong) {
 				state.songs.forEach((song, index) => {
@@ -66,9 +64,7 @@ const modules = {
 				state.songs.push(song);
 			},
 			removeSong(state, songId) {
-				state.songs = state.songs.filter(song => {
-					return song._id !== songId;
-				});
+				state.songs = state.songs.filter(song => song._id !== songId);
 			},
 			updateSong(state, updatedSong) {
 				state.songs.forEach((song, index) => {
@@ -99,9 +95,7 @@ const modules = {
 				state.songs.push(song);
 			},
 			removeSong(state, songId) {
-				state.songs = state.songs.filter(song => {
-					return song._id !== songId;
-				});
+				state.songs = state.songs.filter(song => song._id !== songId);
 			},
 			updateSong(state, updatedSong) {
 				state.songs.forEach((song, index) => {
@@ -133,9 +127,9 @@ const modules = {
 				state.stations.push(station);
 			},
 			stationRemoved(state, stationId) {
-				state.stations = state.stations.filter(station => {
-					return station._id !== stationId;
-				});
+				state.stations = state.stations.filter(
+					station => station._id !== stationId
+				);
 			}
 		}
 	},
@@ -147,14 +141,13 @@ const modules = {
 		getters: {},
 		actions: {
 			/* eslint-disable-next-line no-unused-vars */
-			resolveReport: ({ commit }, reportId) => {
-				return new Promise((resolve, reject) => {
-					return admin.reports
+			resolveReport: ({ commit }, reportId) =>
+				new Promise((resolve, reject) =>
+					admin.reports
 						.resolve(reportId)
 						.then(res => resolve(res))
-						.catch(err => reject(new Error(err.message)));
-				});
-			},
+						.catch(err => reject(new Error(err.message)))
+				),
 			indexReports({ commit }, reports) {
 				commit("indexReports", reports);
 			}
@@ -189,9 +182,7 @@ const modules = {
 				state.news.push(news);
 			},
 			removeNews(state, newsId) {
-				state.news = state.news.filter(news => {
-					return news._id !== newsId;
-				});
+				state.news = state.news.filter(news => news._id !== newsId);
 			},
 			updateNews(state, updatedNews) {
 				state.news.forEach((news, index) => {

+ 3 - 4
frontend/src/store/modules/modals/editSong.js

@@ -23,12 +23,11 @@ export default {
 		loadVideoById: ({ commit }, id, skipDuration) =>
 			commit("loadVideoById", id, skipDuration),
 		pauseVideo: ({ commit }, status) => commit("pauseVideo", status),
-		getCurrentTime: ({ commit, state }, fixedVal) => {
-			return new Promise(resolve => {
+		getCurrentTime: ({ commit, state }, fixedVal) =>
+			new Promise(resolve => {
 				commit("getCurrentTime", fixedVal);
 				resolve(state.video.currentTime);
-			});
-		},
+			}),
 		updateSongField: ({ commit }, data) => commit("updateSongField", data),
 		selectDiscogsInfo: ({ commit }, discogsInfo) =>
 			commit("selectDiscogsInfo", discogsInfo),

+ 4 - 3
frontend/src/store/modules/modals/importAlbum.js

@@ -37,9 +37,10 @@ export default {
 		selectDiscogsAlbum(state, discogsAlbum) {
 			state.discogsAlbum = JSON.parse(JSON.stringify(discogsAlbum));
 			if (state.discogsAlbum && state.discogsAlbum.tracks) {
-				state.tracks = state.discogsAlbum.tracks.map(track => {
-					return { ...track, songs: [] };
-				});
+				state.tracks = state.discogsAlbum.tracks.map(track => ({
+					...track,
+					songs: []
+				}));
 			}
 		},
 		toggleDiscogsAlbum(state) {

+ 23 - 39
frontend/src/store/modules/user.js

@@ -28,8 +28,8 @@ const modules = {
 		},
 		actions: {
 			/* eslint-disable-next-line no-unused-vars */
-			register: ({ commit }, user) => {
-				return new Promise((resolve, reject) => {
+			register: ({ commit }, user) =>
+				new Promise((resolve, reject) => {
 					const { username, email, password } = user;
 
 					if (!email || !username || !password)
@@ -78,43 +78,30 @@ const modules = {
 
 					return auth
 						.register(user)
-						.then(res => {
-							return resolve(res);
-						})
-						.catch(err => {
-							return reject(new Error(err.message));
-						});
-				});
-			},
+						.then(res => resolve(res))
+						.catch(err => reject(new Error(err.message)));
+				}),
 			/* eslint-disable-next-line no-unused-vars */
-			login: ({ commit }, user) => {
-				return new Promise((resolve, reject) => {
+			login: ({ commit }, user) =>
+				new Promise((resolve, reject) => {
 					auth.login(user)
-						.then(() => {
-							return resolve({
+						.then(() =>
+							resolve({
 								status: "success",
 								message: "Logged in!"
-							});
-						})
-						.catch(err => {
-							return reject(new Error(err.message));
-						});
-				});
-			},
-			logout: () => {
-				return new Promise((resolve, reject) => {
-					return auth
+							})
+						)
+						.catch(err => reject(new Error(err.message)));
+				}),
+			logout: () =>
+				new Promise((resolve, reject) =>
+					auth
 						.logout()
-						.then(() => {
-							return resolve();
-						})
-						.catch(() => {
-							return reject();
-						});
-				});
-			},
-			getUsernameFromId: ({ commit, state }, userId) => {
-				return new Promise(resolve => {
+						.then(() => resolve())
+						.catch(() => reject())
+				),
+			getUsernameFromId: ({ commit, state }, userId) =>
+				new Promise(resolve => {
 					if (typeof state.userIdMap[`Z${userId}`] !== "string") {
 						if (state.userIdRequested[`Z${userId}`] !== true) {
 							commit("requestingUserId", userId);
@@ -144,16 +131,13 @@ const modules = {
 						} else {
 							commit("pendingUsername", {
 								userId,
-								callback: username => {
-									return resolve(username);
-								}
+								callback: username => resolve(username)
 							});
 						}
 					} else {
 						resolve(state.userIdMap[`Z${userId}`]);
 					}
-				});
-			},
+				}),
 			authData: ({ commit }, data) => {
 				commit("authData", data);
 			},

+ 6 - 8
frontend/src/validation.js

@@ -5,16 +5,14 @@ export default {
 		emailSimple: /^[\x00-\x7F]+@[a-z0-9]+\.[a-z0-9]+(\.[a-z0-9]+)?$/,
 		ascii: /^[\x00-\x7F]+$/,
 		name: /^[\p{L} .'-]+$/u,
-		password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~])[A-Za-z\d!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/,
-		custom: regex => {
-			return new RegExp(`^[${regex}]+$`);
-		}
+		password:
+			/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~])[A-Za-z\d!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/,
+		custom: regex => new RegExp(`^[${regex}]+$`)
 	},
-	isLength: (string, min, max) => {
-		return !(
+	isLength: (string, min, max) =>
+		!(
 			typeof string !== "string" ||
 			string.length < min ||
 			string.length > max
-		);
-	}
+		)
 };