From 0c3b4972286f6878351276b8ef84103160c03c18 Mon Sep 17 00:00:00 2001 From: Griffin Sullivan <48397354+Griffin-Sullivan@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:33:57 -0400 Subject: [PATCH] Update tsconfig files (#284) Signed-off-by: Griffin-Sullivan --- .../src/__tests__/cypress/cypress.config.ts | 2 +- .../cypress/tests/mocked/application.cy.ts | 4 ++-- .../frontend/src/__tests__/cypress/tsconfig.json | 4 +--- clients/ui/frontend/src/app/App.tsx | 4 ++-- clients/ui/frontend/src/app/AppRoutes.tsx | 8 ++++---- clients/ui/frontend/src/app/NavSidebar.tsx | 2 +- clients/ui/frontend/src/index.tsx | 2 +- clients/ui/frontend/tsconfig.json | 16 ++++++---------- 8 files changed, 18 insertions(+), 24 deletions(-) diff --git a/clients/ui/frontend/src/__tests__/cypress/cypress.config.ts b/clients/ui/frontend/src/__tests__/cypress/cypress.config.ts index e7c0fc6c..6c9ff5ce 100644 --- a/clients/ui/frontend/src/__tests__/cypress/cypress.config.ts +++ b/clients/ui/frontend/src/__tests__/cypress/cypress.config.ts @@ -9,7 +9,7 @@ import cypressHighResolution from 'cypress-high-resolution'; // @ts-ignore no types available import { beforeRunHook, afterRunHook } from 'cypress-mochawesome-reporter/lib'; import { mergeFiles } from 'junit-report-merger'; -import { env, BASE_URL } from '~/src/__tests__/cypress/cypress/utils/testConfig'; +import { env, BASE_URL } from '~/__tests__/cypress/cypress/utils/testConfig'; const resultsDir = `${env.CY_RESULTS_DIR || 'results'}/${env.CY_MOCK ? 'mocked' : 'e2e'}`; diff --git a/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/application.cy.ts b/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/application.cy.ts index 322e5c35..c6651694 100644 --- a/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/application.cy.ts +++ b/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/application.cy.ts @@ -1,5 +1,5 @@ -import { pageNotfound } from "~/src/__tests__/cypress/cypress/pages/pageNoteFound"; -import { home } from "~/src/__tests__/cypress/cypress/pages/home"; +import { pageNotfound } from "~/__tests__/cypress/cypress/pages/pageNoteFound"; +import { home } from "~/__tests__/cypress/cypress/pages/home"; describe('Application', () => { diff --git a/clients/ui/frontend/src/__tests__/cypress/tsconfig.json b/clients/ui/frontend/src/__tests__/cypress/tsconfig.json index ac8b479f..a6dac770 100644 --- a/clients/ui/frontend/src/__tests__/cypress/tsconfig.json +++ b/clients/ui/frontend/src/__tests__/cypress/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../../tsconfig.json", "include": ["../../**/*.ts"], - "exclude": ["node_modules", "public"], + "exclude": ["node_modules", "dist"], "compilerOptions": { - // TODO https://github.com/cypress-io/cypress/issues/26203 - "sourceMap": false, "types": ["node", "cypress", "@testing-library/cypress", "cypress-axe"] } } diff --git a/clients/ui/frontend/src/app/App.tsx b/clients/ui/frontend/src/app/App.tsx index d9be35e5..2183e990 100644 --- a/clients/ui/frontend/src/app/App.tsx +++ b/clients/ui/frontend/src/app/App.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import '@patternfly/react-core/dist/styles/base.css'; -import AppRoutes from '@app/AppRoutes'; -import '@app/app.css'; +import AppRoutes from './AppRoutes'; +import './app.css'; import { Flex, Masthead, diff --git a/clients/ui/frontend/src/app/AppRoutes.tsx b/clients/ui/frontend/src/app/AppRoutes.tsx index da6fc5c2..fce6104f 100644 --- a/clients/ui/frontend/src/app/AppRoutes.tsx +++ b/clients/ui/frontend/src/app/AppRoutes.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { Route, Routes } from 'react-router-dom'; -import { Dashboard } from '@app/Dashboard/Dashboard'; -import { Support } from '@app/Support/Support'; -import { NotFound } from '@app/NotFound/NotFound'; -import { Admin } from '@app/Settings/Admin'; +import { Dashboard } from './Dashboard/Dashboard'; +import { Support } from './Support/Support'; +import { NotFound } from './NotFound/NotFound'; +import { Admin } from './Settings/Admin'; export const isNavDataGroup = (navItem: NavDataItem): navItem is NavDataGroup => 'children' in navItem; diff --git a/clients/ui/frontend/src/app/NavSidebar.tsx b/clients/ui/frontend/src/app/NavSidebar.tsx index 297be610..e0c24606 100644 --- a/clients/ui/frontend/src/app/NavSidebar.tsx +++ b/clients/ui/frontend/src/app/NavSidebar.tsx @@ -8,7 +8,7 @@ import { PageSidebar, PageSidebarBody, } from '@patternfly/react-core'; -import { useNavData, isNavDataGroup, NavDataHref, NavDataGroup } from '@app/AppRoutes'; +import { useNavData, isNavDataGroup, NavDataHref, NavDataGroup } from './AppRoutes'; const NavHref: React.FC<{ item: NavDataHref }> = ({ item }) => (