ESLint: Remove ts-ignore comments (#10933)

* Upgrade json-bigint, add @types/json-bigint to deps

* Upgrade react-bootstrap-dialog

* Fix ts-ignore

* Fix ts-ignore

* Fix ts-ignore

* Upgrade react-syntax-highlighter, fix ts-ignore

* Fix ts-ignore

* Fix ts-ignore in styles.tsx

* Wrap Input in div to pass onPaste

* Change esm to cjs imports for highlighter to fix tests

* Add null checks
This commit is contained in:
Kamil Gabryjelski
2020-09-22 00:47:33 +02:00
committed by GitHub
parent e4e78b66fa
commit a8f5029cb1
19 changed files with 217 additions and 132 deletions

View File

@@ -19,7 +19,7 @@
import React, { FunctionComponent, useState, useRef } from 'react';
// @ts-ignore
import { Table } from 'reactable-arc';
import { Alert, FormControl, Modal } from 'react-bootstrap';
import { Alert, FormControl, FormControlProps, Modal } from 'react-bootstrap';
import { SupersetClient, t } from '@superset-ui/core';
import getClientErrorObject from '../utils/getClientErrorObject';
@@ -114,8 +114,10 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
searchRef = ref;
};
const changeSearch = (event: React.ChangeEvent<HTMLInputElement>) => {
setFilter(event.target.value);
const changeSearch = (
event: React.FormEvent<FormControl & FormControlProps>,
) => {
setFilter((event.currentTarget?.value as string) ?? '');
};
return (
@@ -136,7 +138,6 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
bsSize="sm"
value={filter}
placeholder={t('Search / Filter')}
// @ts-ignore
onChange={changeSearch}
/>
</div>