Skip to content

Commit

Permalink
Revert "ESLint: Remove ts-ignore comments (#10933)"
Browse files Browse the repository at this point in the history
This reverts commit a8f5029.
  • Loading branch information
rusackas authored Sep 22, 2020
1 parent dc893fe commit dbbe1b5
Show file tree
Hide file tree
Showing 19 changed files with 132 additions and 217 deletions.
138 changes: 35 additions & 103 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
"dom-to-image": "^2.6.0",
"geolib": "^2.0.24",
"global-box": "^1.2.0",
"immutable": "^4.0.0-rc.12",
"immutable": "^3.8.2",
"interweave": "^11.2.0",
"jquery": "^3.5.1",
"json-bigint": "^1.0.0",
"json-bigint": "^0.3.0",
"lodash": "^4.17.20",
"lodash-es": "^4.17.14",
"mathjs": "^3.20.2",
Expand All @@ -127,7 +127,7 @@
"react-ace": "^5.10.0",
"react-avatar": "^3.9.7",
"react-bootstrap": "^0.33.1",
"react-bootstrap-dialog": "^0.13.0",
"react-bootstrap-dialog": "^0.10.0",
"react-bootstrap-slider": "2.1.5",
"react-checkbox-tree": "^1.5.1",
"react-color": "^2.13.8",
Expand All @@ -150,7 +150,7 @@
"react-sortable-hoc": "^1.11.0",
"react-split": "^2.0.4",
"react-sticky": "^6.0.2",
"react-syntax-highlighter": "^13.5.3",
"react-syntax-highlighter": "^7.0.4",
"react-table": "^7.2.1",
"react-transition-group": "^2.5.3",
"react-ultimate-pagination": "^1.2.0",
Expand Down Expand Up @@ -200,7 +200,6 @@
"@types/fetch-mock": "^7.3.2",
"@types/jest": "^26.0.3",
"@types/jquery": "^3.3.32",
"@types/json-bigint": "^1.0.0",
"@types/react": "^16.9.43",
"@types/react-bootstrap": "^0.32.22",
"@types/react-dom": "^16.9.8",
Expand Down
10 changes: 6 additions & 4 deletions superset-frontend/src/SqlLab/components/HighlightedSql.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql';
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
import SyntaxHighlighter, {
registerLanguage,
} from 'react-syntax-highlighter/dist/light';
import sql from 'react-syntax-highlighter/dist/languages/hljs/sql';
import github from 'react-syntax-highlighter/dist/styles/hljs/github';
import { t } from '@superset-ui/core';

import ModalTrigger from '../../components/ModalTrigger';

SyntaxHighlighter.registerLanguage('sql', sql);
registerLanguage('sql', sql);

const defaultProps = {
maxWidth: 50,
Expand Down
17 changes: 4 additions & 13 deletions superset-frontend/src/SqlLab/components/LimitControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@
* under the License.
*/
import React from 'react';
import {
FormGroup,
FormControl,
Overlay,
Popover,
FormControlProps,
} from 'react-bootstrap';
import { FormGroup, FormControl, Overlay, Popover } from 'react-bootstrap';
import Button from 'src/components/Button';
import { t, styled } from '@superset-ui/core';

Expand Down Expand Up @@ -111,12 +105,9 @@ export default class LimitControl extends React.PureComponent<
value={textValue}
placeholder={t(`Max: ${this.props.maxRow}`)}
bsSize="small"
onChange={(
event: React.FormEvent<FormControl & FormControlProps>,
) =>
this.setState({
textValue: (event.currentTarget?.value as string) ?? '',
})
// @ts-ignore
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
this.setState({ textValue: event.target.value })
}
/>
</FormGroup>
Expand Down
13 changes: 9 additions & 4 deletions superset-frontend/src/SqlLab/components/ShowSQL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@
* under the License.
*/
import React from 'react';
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql';
import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
import SyntaxHighlighter, {
registerLanguage,
// @ts-ignore
} from 'react-syntax-highlighter/dist/light';
// @ts-ignore
import sql from 'react-syntax-highlighter/dist/languages/hljs/sql';
// @ts-ignore
import github from 'react-syntax-highlighter/dist/styles/hljs/github';

import Link from '../../components/Link';
import ModalTrigger from '../../components/ModalTrigger';

SyntaxHighlighter.registerLanguage('sql', sql);
registerLanguage('sql', sql);

interface ShowSQLProps {
sql: string;
Expand Down
12 changes: 5 additions & 7 deletions superset-frontend/src/components/DeleteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import { t, styled } from '@superset-ui/core';
import React, { useState } from 'react';
import { FormGroup, FormControl, FormControlProps } from 'react-bootstrap';
import { FormGroup, FormControl } from 'react-bootstrap';
import Modal from 'src/components/Modal';
import FormLabel from 'src/components/FormLabel';

Expand Down Expand Up @@ -70,12 +70,10 @@ export default function DeleteModal({
id="delete"
type="text"
bsSize="sm"
onChange={(
event: React.FormEvent<FormControl & FormControlProps>,
) => {
const targetValue = (event.currentTarget?.value as string) ?? '';
setDisableChange(targetValue.toUpperCase() !== 'DELETE');
}}
// @ts-ignore
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setDisableChange(event.target.value.toUpperCase() !== 'DELETE')
}
/>
</StyleFormGroup>
</Modal>
Expand Down
Loading

0 comments on commit dbbe1b5

Please sign in to comment.