Fix eslint warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-27 19:27:44 +01:00
parent 487ac56b4c
commit da42522073
130 changed files with 702 additions and 734 deletions

View File

@@ -18,7 +18,6 @@ export enum EventRouteName {
EVENT_PARTICIPATE_WITHOUT_ACCOUNT = "EVENT_PARTICIPATE_WITHOUT_ACCOUNT",
EVENT_PARTICIPATE_LOGGED_OUT = "EVENT_PARTICIPATE_LOGGED_OUT",
EVENT_PARTICIPATE_CONFIRM = "EVENT_PARTICIPATE_CONFIRM",
LOCATION = "Location",
TAG = "Tag",
}
@@ -46,14 +45,17 @@ export const eventRoutes: RouteConfig[] = [
name: EventRouteName.EDIT_EVENT,
component: editEvent,
meta: { requiredAuth: true },
props: (route: Route) => ({ ...route.params, ...{ isUpdate: true } }),
props: (route: Route): Record<string, unknown> => ({ ...route.params, ...{ isUpdate: true } }),
},
{
path: "/events/duplicate/:eventId",
name: EventRouteName.DUPLICATE_EVENT,
component: editEvent,
meta: { requiredAuth: true },
props: (route: Route) => ({ ...route.params, ...{ isDuplicate: true } }),
props: (route: Route): Record<string, unknown> => ({
...route.params,
...{ isDuplicate: true },
}),
},
{
path: "/events/:eventId/participations",
@@ -62,12 +64,6 @@ export const eventRoutes: RouteConfig[] = [
meta: { requiredAuth: true },
props: true,
},
{
path: "/location/new",
name: EventRouteName.LOCATION,
component: () => import(/* webpackChunkName: "Location" */ "@/views/Location.vue"),
meta: { requiredAuth: true },
},
{
path: "/events/:uuid",
name: EventRouteName.EVENT,

View File

@@ -1,7 +1,7 @@
import { NavigationGuard } from "vue-router";
import { UserRouteName } from "@/router/user";
import { LoginErrorCode } from "@/types/login-error-code.model";
import { AUTH_ACCESS_TOKEN } from "@/constants";
import { LoginErrorCode } from "@/types/enums";
// eslint-disable-next-line import/prefer-default-export
export const authGuardIfNeeded: NavigationGuard = async (to, from, next) => {

View File

@@ -1,6 +1,6 @@
import { ErrorCode } from "@/types/enums";
import { NavigationGuard } from "vue-router";
import { CONFIG } from "../../graphql/config";
import { ErrorCode } from "../../types/error-code.model";
import apolloProvider from "../../vue-apollo";
// eslint-disable-next-line import/prefer-default-export

View File

@@ -1,4 +1,4 @@
import { RouteConfig } from "vue-router";
import { Route, RouteConfig } from "vue-router";
export enum SettingsRouteName {
SETTINGS = "SETTINGS",
@@ -199,7 +199,10 @@ export const settingsRoutes: RouteConfig[] = [
import(
/* webpackChunkName: "EditIdentity" */ "@/views/Account/children/EditIdentity.vue"
),
props: (route) => ({ identityName: route.params.identityName, isUpdate: false }),
props: (route: Route): Record<string, unknown> => ({
identityName: route.params.identityName,
isUpdate: false,
}),
meta: { requiredAuth: true },
},
{
@@ -209,7 +212,10 @@ export const settingsRoutes: RouteConfig[] = [
import(
/* webpackChunkName: "EditIdentity" */ "@/views/Account/children/EditIdentity.vue"
),
props: (route) => ({ identityName: route.params.identityName, isUpdate: true }),
props: (route: Route): Record<string, unknown> => ({
identityName: route.params.identityName,
isUpdate: true,
}),
meta: { requiredAuth: true },
},
],

View File

@@ -1,5 +1,5 @@
import { beforeRegisterGuard } from "@/router/guards/register-guard";
import { RouteConfig } from "vue-router";
import { Route, RouteConfig } from "vue-router";
export enum UserRouteName {
REGISTER = "Register",
@@ -27,7 +27,7 @@ export const userRoutes: RouteConfig[] = [
component: () =>
import(/* webpackChunkName: "RegisterProfile" */ "@/views/Account/Register.vue"),
// We can only pass string values through params, therefore
props: (route) => ({
props: (route: Route): Record<string, unknown> => ({
email: route.params.email,
userAlreadyActivated: route.params.userAlreadyActivated === "true",
}),