From ae88a01bea85890bfe19afcb496eba59f2eced91 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Tue, 18 May 2021 17:20:49 -0600 Subject: [PATCH] fix eslint and admin not loading --- .eslintrc.yml | 10 +++------- resources/scripts/components/App.tsx | 7 ++++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 001ba7f9a..d10acf15f 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -76,13 +76,9 @@ rules: - 1 - "line-aligned" "react/jsx-closing-tag-location": 1 - # This setup is required to avoid a spam of errors when running eslint about React being - # used before it is defined. - # - # see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use - no-use-before-define: 0 - "@typescript-eslint/no-use-before-define": - - warn + "no-use-before-define": 0 + "@typescript-eslint/no-use-before-define": 1 + "multiline-ternary": 0 overrides: - files: - "**/*.tsx" diff --git a/resources/scripts/components/App.tsx b/resources/scripts/components/App.tsx index 3a76ceb2e..f46abc53e 100644 --- a/resources/scripts/components/App.tsx +++ b/resources/scripts/components/App.tsx @@ -1,4 +1,4 @@ -import React, { lazy, useEffect, Suspense } from 'react'; +import React, { useEffect, Suspense } from 'react'; import ReactGA from 'react-ga'; import { hot } from 'react-hot-loader/root'; import { Route, Router, Switch, useLocation } from 'react-router-dom'; @@ -15,8 +15,9 @@ import GlobalStylesheet from '@/assets/css/GlobalStylesheet'; import { history } from '@/components/history'; import { setupInterceptors } from '@/api/interceptors'; import TailwindGlobalStyles from '@/components/GlobalStyles'; +import AdminRouter from '@/routers/AdminRouter'; -const ChunkedAdminRouter = lazy(() => import(/* webpackChunkName: "admin" */'@/routers/AdminRouter')); +// const ChunkedAdminRouter = lazy(() => import(/* webpackChunkName: "admin" */'@/routers/AdminRouter')); interface ExtendedWindow extends Window { SiteConfiguration?: SiteSettings; @@ -93,7 +94,7 @@ const App = () => { - +