remove usage of @ts-ignore
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -57,7 +57,6 @@ describe('errorHandler', () => {
|
||||
|
||||
// mutate the response object to test the middleware.
|
||||
// it's hard to catch errors inside middleware from the outside.
|
||||
// @ts-ignore
|
||||
res.send = mockSend;
|
||||
throw new Error('some message');
|
||||
});
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import React from 'react';
|
||||
import { useTheme } from '@material-ui/core/styles';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
// @ts-ignore
|
||||
import { Line } from 'rc-progress';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { getProgressColor, GaugePropsGetColor } from './Gauge';
|
||||
|
||||
@@ -96,12 +96,11 @@ const MobileSidebarGroup = (props: SidebarGroupProps) => {
|
||||
|
||||
return (
|
||||
// Material UI issue: https://github.com/mui-org/material-ui/issues/27820
|
||||
// @ts-ignore
|
||||
<BottomNavigationAction
|
||||
label={label}
|
||||
icon={icon}
|
||||
component={Link}
|
||||
to={to ? to : location.pathname}
|
||||
component={Link as any}
|
||||
to={(to ? to : location.pathname) as any}
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
selected={selected}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import chalk from 'chalk';
|
||||
import { Command } from 'commander';
|
||||
import inquirer, { Answers, Question } from 'inquirer';
|
||||
import inquirer, { Answers } from 'inquirer';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { findPaths } from '@backstage/cli-common';
|
||||
import os from 'os';
|
||||
@@ -34,7 +34,7 @@ export default async (cmd: Command, version: string): Promise<void> => {
|
||||
/* eslint-disable-next-line no-restricted-syntax */
|
||||
const paths = findPaths(__dirname);
|
||||
|
||||
const questions: Question[] = [
|
||||
const answers: Answers = await inquirer.prompt([
|
||||
{
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
@@ -54,11 +54,9 @@ export default async (cmd: Command, version: string): Promise<void> => {
|
||||
type: 'list',
|
||||
name: 'dbType',
|
||||
message: chalk.blue('Select database for the backend [required]'),
|
||||
// @ts-ignore
|
||||
choices: ['SQLite', 'PostgreSQL'],
|
||||
},
|
||||
];
|
||||
const answers: Answers = await inquirer.prompt(questions);
|
||||
]);
|
||||
answers.dbTypePG = answers.dbType === 'PostgreSQL';
|
||||
answers.dbTypeSqlite = answers.dbType === 'SQLite';
|
||||
|
||||
|
||||
@@ -62,8 +62,7 @@ describe('logCollector', () => {
|
||||
|
||||
expect(logs.log).toEqual(['a', '1']);
|
||||
expect(logs.warn).toEqual(['b', '2']);
|
||||
// @ts-ignore
|
||||
expect(logs.error).toEqual([]);
|
||||
expect((logs as any).error).toEqual([]);
|
||||
});
|
||||
|
||||
expect(missedLogs.log).toEqual([]);
|
||||
@@ -82,10 +81,8 @@ describe('logCollector', () => {
|
||||
console.log('1');
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
expect(logs.log).toEqual([]);
|
||||
// @ts-ignore
|
||||
expect(logs.warn).toEqual([]);
|
||||
expect((logs as any).log).toEqual([]);
|
||||
expect((logs as any).warn).toEqual([]);
|
||||
expect(logs.error).toEqual(['c', '3']);
|
||||
});
|
||||
|
||||
|
||||
@@ -36,6 +36,5 @@ export async function renderWithEffects(
|
||||
await act(async () => {
|
||||
value = render(nodes);
|
||||
});
|
||||
// @ts-ignore
|
||||
return value;
|
||||
return value!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user