Skip to content

Commit

Permalink
Update tsconfig files (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: Griffin-Sullivan <[email protected]>
  • Loading branch information
Griffin-Sullivan authored Aug 21, 2024
1 parent 092a689 commit 0c3b497
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -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', () => {

Expand Down
4 changes: 1 addition & 3 deletions clients/ui/frontend/src/__tests__/cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
4 changes: 2 additions & 2 deletions clients/ui/frontend/src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
8 changes: 4 additions & 4 deletions clients/ui/frontend/src/app/AppRoutes.tsx
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion clients/ui/frontend/src/app/NavSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => (
<NavItem
Expand Down
2 changes: 1 addition & 1 deletion clients/ui/frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter as Router } from 'react-router-dom';
import App from '@app/App';
import App from './app/App';

if (process.env.NODE_ENV !== 'production') {
const config = {
Expand Down
16 changes: 6 additions & 10 deletions clients/ui/frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"baseUrl": ".",
"baseUrl": "./src",
"rootDir": ".",
"outDir": "dist",
"module": "esnext",
Expand All @@ -12,21 +12,16 @@
"sourceMap": true,
"jsx": "react",
"moduleResolution": "node",
"downlevelIteration": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": false,
"noImplicitAny": true,
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"paths": {
"@app/*": [
"src/app/*"
],
"@assets/*": [
"node_modules/@patternfly/react-core/dist/styles/assets/*"
],
"~/*": ["./*"]
},
"importHelpers": true,
Expand All @@ -37,9 +32,10 @@
"**/*.tsx",
"**/*.jsx",
"**/*.js",
".eslintrc.js"
],
"exclude": [
"node_modules"
"node_modules",
"dist",
"src/__tests__/cypress"
]
}

0 comments on commit 0c3b497

Please sign in to comment.