Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/artesca 13131 enable typescript checking #789

Merged
2 changes: 1 addition & 1 deletion .github/workflows/build-push-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run: npm ci

- name: build assets
run: npm run rsbuild
run: npm run build

- name: Build and push zenko ui
uses: docker/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: install dependencies
run: npm ci
- name: build assets
run: npm run rsbuild
run: npm run build
- name: Login to GitHub Registry
uses: docker/login-action@v2
with:
Expand Down
7 changes: 3 additions & 4 deletions .jest-setup.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import { TextEncoder, TextDecoder, ReadableStream } from 'util';

Object.assign(global, { TextDecoder, TextEncoder, ReadableStream });

Enzyme.configure({ adapter: new Adapter() });
HTMLCanvasElement.prototype.getContext = () => {
// return whatever getContext has to return
};
2 changes: 0 additions & 2 deletions @mf-types/shell/App.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions @mf-types/shell/apis.d.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export type AlertLabels = {
};
export declare function getAlerts(alertManagerUrl: string): Promise<import("./alertUtils").Alert[]>;
export declare const checkActiveAlertProvider: () => Promise<{
status: 'healthy' | 'critical';
status: "healthy" | "critical";
}>;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type Alert = {
description: string;
startsAt: string;
endsAt: string;
severity: string;
severity: Health;
labels: AlertLabels;
originalAlert: PrometheusAlert;
status: string;
Expand Down
2 changes: 1 addition & 1 deletion @mf-types/shell/compiled-types/src/auth/AuthProvider.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { User } from 'oidc-client';
import { User } from 'oidc-client-ts';
import React from 'react';
export declare function AuthProvider({ children }: {
children: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="react" />
import { CoreUITheme, CoreUIThemeName } from '@scality/core-ui/dist/style/theme';
export type NavbarEntry = {
groups?: string[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="react" />
export declare const useShellHistory: () => import("history").History<unknown>;
export declare const ShellHistoryProvider: ({ children }: {
children: any;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/// <reference types="react" />
export declare const NavbarUpdaterComponents: () => JSX.Element;
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/// <reference types="react" />
declare const NotificationCenter: () => JSX.Element;
export default NotificationCenter;
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/// <reference types="react" />
export declare const SleepingNotificationBell: () => JSX.Element;
1 change: 0 additions & 1 deletion @mf-types/shell/compiled-types/src/navbar/navbarHooks.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="react" />
import type { ViewDefinition } from '../initFederation/ConfigurationProviders';
import '../initFederation/ConfigurationProviders';
export type Link = {
Expand Down
2 changes: 0 additions & 2 deletions @mf-types/shell/lang.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions @mf-types/shell/useNotificationCenter.d.ts

This file was deleted.

6 changes: 6 additions & 0 deletions jestSetupAfterEnv.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import '@testing-library/jest-dom';
import fetch from 'node-fetch';
import { queryClient } from './src/react/utils/testUtil';

import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import 'core-js/stable';

Enzyme.configure({ adapter: new Adapter() });

window.fetch = (url, ...rest) =>
//@ts-expect-error fix this when you are working on it
fetch(/^https?:/.test(url) ? url : new URL(url, 'http://localhost'), ...rest);
Expand Down
Loading
Loading