Skip to content

Commit

Permalink
Fix some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
spider-hand committed Jun 18, 2023
1 parent d1df6b6 commit d5ee3f6
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/components/Game/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ watch(
() => props.randomLatLng,
(newVal: google.maps.LatLng | null) => {
if (newVal !== null) {
map.addListener("click", (e: any) => {
map.addListener("click", (e: google.maps.MapMouseEvent) => {
removeMarkers();
putMarker(e.latLng);
emit("updateSelectedLatLng", e.latLng);
putMarker(e.latLng as google.maps.LatLng);
emit("updateSelectedLatLng", e.latLng as google.maps.LatLng);
});
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Game/Overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defineProps({
msg: {
type: String,
required: false,
default: "",
},
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Game/ResultModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const emit = defineEmits<{
onClickNextRoundButton: [];
onClickViewSummaryButton: [];
onClickPlayAgainButton: [];
nClickExitButton: [];
onClickExitButton: [];
endMultiplayerGame: [];
}>();
Expand Down
2 changes: 2 additions & 0 deletions src/components/Game/ScoreBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ defineProps({
},
countdown: {
type: String,
required: true,
default: "",
},
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Game/StreetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { onMounted, watch, ref, PropType } from "vue";
const props = defineProps({
selectedMap: {
type: String,
requred: true,
required: true,
},
selectedMode: {
type: String,
Expand Down
4 changes: 4 additions & 0 deletions src/components/Home/Switch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ defineProps({
required: true,
},
});
defineEmits<{
onChangeValue: [val: boolean];
}>();
</script>

<style module lang="scss">
Expand Down
5 changes: 5 additions & 0 deletions src/components/Home/TextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ const props = defineProps({
errorMsg: {
type: String,
required: false,
default: null,
},
});
defineEmits<{
onChangeValue: [val: string];
}>();
const state = reactive<{
inputValue: string;
}>({
Expand Down
8 changes: 4 additions & 4 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

import Home from "@/views/Home.vue";
import Game from "@/views/Game.vue";
import HomeView from "@/views/HomeView.vue";
import GameView from "@/views/GameView.vue";

const routes: Array<RouteRecordRaw> = [
{
Expand All @@ -11,12 +11,12 @@ const routes: Array<RouteRecordRaw> = [
{
path: "/",
name: "home",
component: Home,
component: HomeView,
},
{
path: "/game",
name: "game",
component: Game,
component: GameView,
},
];

Expand Down
6 changes: 3 additions & 3 deletions src/views/Game.vue → src/views/GameView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,10 @@ onMounted(() => {
const latlng = new google.maps.LatLng(lat, lng);
const playerName = snapshot
.child("playerName")
.child(childSnapshot.key!)
.child(childSnapshot.key as string)
.val();
const distance = snapshot
.child(`round${inGameState.value.round}/${childSnapshot.key!}`)
.child(`round${inGameState.value.round}/${childSnapshot.key as string}`)
.val();
updateSelectedLatLngArr(latlng);
updateDistanceByPlayerArr({
Expand All @@ -461,7 +461,7 @@ onMounted(() => {
snapshot.child("score").forEach((childSnapshot) => {
const playerName = snapshot
.child("playerName")
.child(childSnapshot.key!)
.child(childSnapshot.key as string)
.val();
const score = childSnapshot.val();
state.multiplayerGameSummary.push({
Expand Down
File renamed without changes.

0 comments on commit d5ee3f6

Please sign in to comment.