Browse Source

chore(linting): fixed warnings

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 5 years ago
parent
commit
c3d85d4d3d

+ 1 - 1
frontend/.eslintrc

@@ -28,7 +28,7 @@
 		"no-console": 0,
 		"no-control-regex": 0,
 		"no-var": 2,
-		"no-underscore-dangle": 1,
+		"no-underscore-dangle": 0,
 		"prefer-promise-reject-errors": 0, // temp
 		"no-nested-ternary": 0, // temp
 		"radix": 0,

+ 1 - 1
frontend/components/Admin/QueueSongs.vue

@@ -187,7 +187,7 @@ export default {
 					_this.songs.push(queueSong);
 				});
 				_this.socket.on("event:admin.queueSong.removed", songId => {
-					_this.songs = _this.songs.filter(function(song) {
+					_this.songs = _this.songs.filter(song => {
 						return song._id !== songId;
 					});
 				});

+ 3 - 3
frontend/components/Admin/Songs.vue

@@ -110,8 +110,8 @@ export default {
 		})
 	},
 	watch: {
-		"modals.editSong": function(value) {
-			if (!value) this.stopVideo();
+		"modals.editSong": val => {
+			if (!val) this.stopVideo();
 		}
 	},
 	methods: {
@@ -158,7 +158,7 @@ export default {
 					_this.songs.push(song);
 				});
 				_this.socket.on("event:admin.song.removed", songId => {
-					_this.songs = _this.songs.filter(function(song) {
+					_this.songs = _this.songs.filter(song => {
 						return song._id !== songId;
 					});
 				});

+ 1 - 3
frontend/components/Modals/Modal.vue

@@ -31,9 +31,7 @@ export default {
 				.toLowerCase()
 				.replace(/[-_]+/g, " ")
 				.replace(/[^\w\s]/g, "")
-				.replace(/ (.)/g, function($1) {
-					return $1.toUpperCase();
-				})
+				.replace(/ (.)/g, $1 => $1.toUpperCase())
 				.replace(/ /g, "");
 		},
 		...mapActions("modals", ["closeCurrentModal"])

+ 1 - 1
frontend/components/Modals/Register.vue

@@ -108,7 +108,7 @@ export default {
 				grecaptcha.ready(() => {
 					grecaptcha
 						.execute(this.recaptcha.key, { action: "login" })
-						.then(function(token) {
+						.then(token => {
 							_this.recaptcha.token = token;
 						});
 				});