Fix lint issues

And disable eslint when building in prod mode

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-30 10:24:11 +01:00
parent da42522073
commit 2d541f2e32
161 changed files with 3869 additions and 1236 deletions

View File

@@ -1,5 +1,6 @@
import { beforeRegisterGuard } from "@/router/guards/register-guard";
import { Route, RouteConfig } from "vue-router";
import { EsModuleComponent } from "vue/types/options";
export enum UserRouteName {
REGISTER = "Register",
@@ -16,7 +17,10 @@ export const userRoutes: RouteConfig[] = [
{
path: "/register/user",
name: UserRouteName.REGISTER,
component: () => import(/* webpackChunkName: "RegisterUser" */ "@/views/User/Register.vue"),
component: (): Promise<EsModuleComponent> =>
import(
/* webpackChunkName: "RegisterUser" */ "@/views/User/Register.vue"
),
props: true,
meta: { requiredAuth: false },
beforeEnter: beforeRegisterGuard,
@@ -24,8 +28,10 @@ export const userRoutes: RouteConfig[] = [
{
path: "/register/profile",
name: UserRouteName.REGISTER_PROFILE,
component: () =>
import(/* webpackChunkName: "RegisterProfile" */ "@/views/Account/Register.vue"),
component: (): Promise<EsModuleComponent> =>
import(
/* webpackChunkName: "RegisterProfile" */ "@/views/Account/Register.vue"
),
// We can only pass string values through params, therefore
props: (route: Route): Record<string, unknown> => ({
email: route.params.email,
@@ -36,46 +42,56 @@ export const userRoutes: RouteConfig[] = [
{
path: "/resend-instructions",
name: UserRouteName.RESEND_CONFIRMATION,
component: () =>
import(/* webpackChunkName: "ResendConfirmation" */ "@/views/User/ResendConfirmation.vue"),
component: (): Promise<EsModuleComponent> =>
import(
/* webpackChunkName: "ResendConfirmation" */ "@/views/User/ResendConfirmation.vue"
),
props: true,
meta: { requiresAuth: false },
},
{
path: "/password-reset/send",
name: UserRouteName.SEND_PASSWORD_RESET,
component: () =>
import(/* webpackChunkName: "SendPasswordReset" */ "@/views/User/SendPasswordReset.vue"),
component: (): Promise<EsModuleComponent> =>
import(
/* webpackChunkName: "SendPasswordReset" */ "@/views/User/SendPasswordReset.vue"
),
props: true,
meta: { requiresAuth: false },
},
{
path: "/password-reset/:token",
name: UserRouteName.PASSWORD_RESET,
component: () =>
import(/* webpackChunkName: "PasswordReset" */ "@/views/User/PasswordReset.vue"),
component: (): Promise<EsModuleComponent> =>
import(
/* webpackChunkName: "PasswordReset" */ "@/views/User/PasswordReset.vue"
),
meta: { requiresAuth: false },
props: true,
},
{
path: "/validate/email/:token",
name: UserRouteName.EMAIL_VALIDATE,
component: () =>
import(/* webpackChunkName: "EmailValidate" */ "@/views/User/EmailValidate.vue"),
component: (): Promise<EsModuleComponent> =>
import(
/* webpackChunkName: "EmailValidate" */ "@/views/User/EmailValidate.vue"
),
props: true,
meta: { requiresAuth: false },
},
{
path: "/validate/:token",
name: UserRouteName.VALIDATE,
component: () => import(/* webpackChunkName: "Validate" */ "@/views/User/Validate.vue"),
component: (): Promise<EsModuleComponent> =>
import(/* webpackChunkName: "Validate" */ "@/views/User/Validate.vue"),
props: true,
meta: { requiresAuth: false },
},
{
path: "/login",
name: UserRouteName.LOGIN,
component: () => import(/* webpackChunkName: "Login" */ "@/views/User/Login.vue"),
component: (): Promise<EsModuleComponent> =>
import(/* webpackChunkName: "Login" */ "@/views/User/Login.vue"),
props: true,
meta: { requiredAuth: false },
},