diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 6b28a21bb..b40dabed8 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -34,7 +34,7 @@ module.exports = {
rules: {
'import/no-unresolved': 0,
'global-require': 0,
- }
+ },
},
{
files: ['*.ts', '*.tsx'],
@@ -88,10 +88,8 @@ module.exports = {
'no-prototype-builtins': 0,
'no-restricted-properties': 0,
'no-restricted-syntax': 0,
- 'no-unused-vars': 0,
'padded-blocks': 0,
'prefer-arrow-callback': 0,
- 'prefer-template': 0,
'react/forbid-prop-types': 0,
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'react/jsx-no-bind': 0,
@@ -150,11 +148,9 @@ module.exports = {
'no-prototype-builtins': 0,
'no-restricted-properties': 0,
'no-restricted-syntax': 0,
- 'no-unused-vars': 0,
'padded-blocks': 0,
'prefer-arrow-callback': 0,
'prefer-object-spread': 1,
- 'prefer-template': 0,
'react/forbid-prop-types': 0,
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'react/jsx-no-bind': 0,
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index b6fa1dbbc..747c94b76 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -129,7 +129,6 @@
"d3-scale": "^2.1.2",
"dnd-core": "^2.6.0",
"dom-to-image": "^2.6.0",
- "dompurify": "^2.0.7",
"geolib": "^2.0.24",
"immutable": "^3.8.2",
"interweave": "^11.2.0",
diff --git a/superset-frontend/spec/__mocks__/svgrMock.js b/superset-frontend/spec/__mocks__/svgrMock.js
index 20b43380a..46bda7832 100644
--- a/superset-frontend/spec/__mocks__/svgrMock.js
+++ b/superset-frontend/spec/__mocks__/svgrMock.js
@@ -16,7 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
-import * as React from 'react';
-
export default 'SvgrURL';
export const ReactComponent = 'svg';
diff --git a/superset-frontend/spec/javascripts/components/AnchorLink_spec.jsx b/superset-frontend/spec/javascripts/components/AnchorLink_spec.jsx
index 6b9dc4b5b..7cdb1d85e 100644
--- a/superset-frontend/spec/javascripts/components/AnchorLink_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/AnchorLink_spec.jsx
@@ -31,7 +31,7 @@ describe('AnchorLink', () => {
global.window = Object.create(window);
Object.defineProperty(window, 'location', {
value: {
- hash: '#' + props.anchorLinkId,
+ hash: `#${props.anchorLinkId}`,
},
});
});
diff --git a/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.jsx b/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.jsx
index d78577be9..d85a165b4 100644
--- a/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.jsx
@@ -19,7 +19,7 @@
import React from 'react';
import { shallow } from 'enzyme';
-import { ColumnOption, ColumnTypeLabel } from '@superset-ui/chart-controls';
+import { ColumnTypeLabel } from '@superset-ui/chart-controls';
describe('ColumnOption', () => {
const defaultProps = {
diff --git a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
index 6f62e4ef0..de0d179df 100644
--- a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
@@ -20,7 +20,6 @@ import React from 'react';
import { mount, shallow } from 'enzyme';
import { act } from 'react-dom/test-utils';
import { MenuItem } from 'react-bootstrap';
-import Select from 'src/components/Select';
import { QueryParamProvider } from 'use-query-params';
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
@@ -29,7 +28,6 @@ import ListViewFilters from 'src/components/ListView/Filters';
import ListViewPagination from 'src/components/ListView/Pagination';
import Pagination from 'src/components/Pagination';
import Button from 'src/components/Button';
-import { areArraysShallowEqual } from 'src/reduxUtils';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox';
diff --git a/superset-frontend/spec/javascripts/components/OnPasteSelect_spec.jsx b/superset-frontend/spec/javascripts/components/OnPasteSelect_spec.jsx
index ec9cb953c..9c6af28d7 100644
--- a/superset-frontend/spec/javascripts/components/OnPasteSelect_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/OnPasteSelect_spec.jsx
@@ -20,12 +20,7 @@
import React from 'react';
import sinon from 'sinon';
import { shallow } from 'enzyme';
-import {
- Select,
- AsyncSelect,
- OnPasteSelect,
- CreatableSelect,
-} from 'src/components/Select';
+import { Select, OnPasteSelect, CreatableSelect } from 'src/components/Select';
const defaultProps = {
onChange: sinon.spy(),
diff --git a/superset-frontend/spec/javascripts/dashboard/components/RefreshIntervalModal_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/RefreshIntervalModal_spec.jsx
index 92f34ba9d..33a2bdca0 100644
--- a/superset-frontend/spec/javascripts/dashboard/components/RefreshIntervalModal_spec.jsx
+++ b/superset-frontend/spec/javascripts/dashboard/components/RefreshIntervalModal_spec.jsx
@@ -21,7 +21,7 @@ import { mount, shallow } from 'enzyme';
import ModalTrigger from 'src/components/ModalTrigger';
import RefreshIntervalModal from 'src/dashboard/components/RefreshIntervalModal';
-import { Modal, Alert } from 'react-bootstrap';
+import { Alert } from 'react-bootstrap';
describe('RefreshIntervalModal', () => {
const mockedProps = {
diff --git a/superset-frontend/spec/javascripts/explore/components/ExploreChartHeader_spec.jsx b/superset-frontend/spec/javascripts/explore/components/ExploreChartHeader_spec.jsx
index 5cd51f42b..f819bdf74 100644
--- a/superset-frontend/spec/javascripts/explore/components/ExploreChartHeader_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/components/ExploreChartHeader_spec.jsx
@@ -66,7 +66,6 @@ describe('ExploreChartHeader', () => {
});
it('should update title but not save', () => {
- const newTitle = 'New Chart Title';
const editableTitle = wrapper.find(EditableTitle);
expect(editableTitle.props().onSaveTitle).toBe(updateChartTitleStub);
});
diff --git a/superset-frontend/spec/javascripts/explore/components/MetricsControl_spec.jsx b/superset-frontend/spec/javascripts/explore/components/MetricsControl_spec.jsx
index 6876230d6..741179584 100644
--- a/superset-frontend/spec/javascripts/explore/components/MetricsControl_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/components/MetricsControl_spec.jsx
@@ -85,7 +85,7 @@ describe('MetricsControl', () => {
{ optionName: '_col_value', type: 'DOUBLE', column_name: 'value' },
...Object.keys(AGGREGATES).map(aggregate => ({
aggregate_name: aggregate,
- optionName: '_aggregate_' + aggregate,
+ optionName: `_aggregate_${aggregate}`,
})),
{
optionName: 'sum__value',
diff --git a/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx b/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx
index d4110933b..bc8afdeca 100644
--- a/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx
+++ b/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx
@@ -19,7 +19,6 @@
import { Alert } from 'react-bootstrap';
import React from 'react';
import { mount } from 'enzyme';
-import { act } from 'react-dom/test-utils';
import Toast from 'src/messageToasts/components/Toast';
import mockMessageToasts from '../mockMessageToasts';
diff --git a/superset-frontend/spec/javascripts/sqllab/SqlEditor_spec.jsx b/superset-frontend/spec/javascripts/sqllab/SqlEditor_spec.jsx
index 2ee46897f..ca43a785a 100644
--- a/superset-frontend/spec/javascripts/sqllab/SqlEditor_spec.jsx
+++ b/superset-frontend/spec/javascripts/sqllab/SqlEditor_spec.jsx
@@ -18,7 +18,6 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
-import { Checkbox } from 'react-bootstrap';
import {
SQL_EDITOR_GUTTER_HEIGHT,
SQL_EDITOR_GUTTER_MARGIN,
diff --git a/superset-frontend/spec/javascripts/sqllab/actions/sqlLab_spec.js b/superset-frontend/spec/javascripts/sqllab/actions/sqlLab_spec.js
index 5701d490b..c0ebbc219 100644
--- a/superset-frontend/spec/javascripts/sqllab/actions/sqlLab_spec.js
+++ b/superset-frontend/spec/javascripts/sqllab/actions/sqlLab_spec.js
@@ -58,7 +58,7 @@ describe('async actions', () => {
);
const runQueryEndpoint = 'glob:*/superset/sql_json/*';
- fetchMock.post(runQueryEndpoint, '{ "data": ' + mockBigNumber + ' }');
+ fetchMock.post(runQueryEndpoint, `{ "data": ${mockBigNumber} }`);
describe('saveQuery', () => {
const saveQueryEndpoint = 'glob:*/savedqueryviewapi/api/create';
diff --git a/superset-frontend/src/CRUD/CollectionTable.jsx b/superset-frontend/src/CRUD/CollectionTable.jsx
index 2612646ba..74c62277c 100644
--- a/superset-frontend/src/CRUD/CollectionTable.jsx
+++ b/superset-frontend/src/CRUD/CollectionTable.jsx
@@ -213,7 +213,7 @@ export default class CRUDCollection extends React.PureComponent {
];
if (isExpanded) {
trs.push(
-
+
dispatch(addSuccessToast(t('Query was stopped.'))))
.catch(() =>
dispatch(
- addDangerToast(t('Failed at stopping query. ') + `'${query.id}'`),
+ addDangerToast(`${t('Failed at stopping query. ')}'${query.id}'`),
),
);
};
@@ -1230,7 +1230,7 @@ export function popDatasourceQuery(datasourceKey, sql) {
.then(({ json }) =>
dispatch(
addQueryEditor({
- title: 'Query ' + json.name,
+ title: `Query ${json.name}`,
dbId: json.database.id,
schema: json.schema,
autorun: sql !== undefined,
diff --git a/superset-frontend/src/SqlLab/components/HighlightedSql.jsx b/superset-frontend/src/SqlLab/components/HighlightedSql.jsx
index 8d75be726..0c343cae0 100644
--- a/superset-frontend/src/SqlLab/components/HighlightedSql.jsx
+++ b/superset-frontend/src/SqlLab/components/HighlightedSql.jsx
@@ -60,7 +60,7 @@ class HighlightedSql extends React.Component {
return lines
.map(line => {
if (line.length > this.props.maxWidth) {
- return line.slice(0, this.props.maxWidth) + '{...}';
+ return `${line.slice(0, this.props.maxWidth)}{...}`;
}
return line;
})
diff --git a/superset-frontend/src/SqlLab/components/QuerySearch.jsx b/superset-frontend/src/SqlLab/components/QuerySearch.jsx
index ee5660bdb..d7f0e9084 100644
--- a/superset-frontend/src/SqlLab/components/QuerySearch.jsx
+++ b/superset-frontend/src/SqlLab/components/QuerySearch.jsx
@@ -136,7 +136,7 @@ class QuerySearch extends React.PureComponent {
const validParams = params.filter(function (p) {
return p !== '';
});
- return baseUrl + '?' + validParams.join('&');
+ return `${baseUrl}?${validParams.join('&')}`;
}
changeStatus(status) {
@@ -150,7 +150,7 @@ class QuerySearch extends React.PureComponent {
userLabel(user) {
if (user.first_name && user.last_name) {
- return user.first_name + ' ' + user.last_name;
+ return `${user.first_name} ${user.last_name}`;
}
return user.username;
}
diff --git a/superset-frontend/src/SqlLab/components/ResultSet.tsx b/superset-frontend/src/SqlLab/components/ResultSet.tsx
index 7de117568..dd2dd6f00 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet.tsx
@@ -167,7 +167,7 @@ export default class ResultSet extends React.PureComponent<
{this.props.csv && (
diff --git a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery.jsx b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery.jsx
index f80ececbe..cb7d1331a 100644
--- a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery.jsx
+++ b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery.jsx
@@ -77,10 +77,9 @@ class ShareSqlLabQuery extends React.Component {
let savedQueryToastContent;
if (this.props.queryEditor.remoteId) {
- savedQueryToastContent =
- window.location.origin +
- window.location.pathname +
- `?savedQueryId=${this.props.queryEditor.remoteId}`;
+ savedQueryToastContent = `${
+ window.location.origin + window.location.pathname
+ }?savedQueryId=${this.props.queryEditor.remoteId}`;
this.setState({ shortUrl: savedQueryToastContent });
} else {
savedQueryToastContent = t('Please save the query to enable sharing');
diff --git a/superset-frontend/src/SqlLab/components/TabStatusIcon.jsx b/superset-frontend/src/SqlLab/components/TabStatusIcon.jsx
index 1eeedd1e1..c36861c73 100644
--- a/superset-frontend/src/SqlLab/components/TabStatusIcon.jsx
+++ b/superset-frontend/src/SqlLab/components/TabStatusIcon.jsx
@@ -20,7 +20,7 @@ import React from 'react';
import PropTypes from 'prop-types';
export default function TabStatusIcon(props) {
- return ;
+ return ;
}
TabStatusIcon.propTypes = {
diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
index e1f465f2f..13a57b09d 100644
--- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
+++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
@@ -304,7 +304,7 @@ class TabbedSqlEditors extends React.PureComponent {
{isSelected && (
diff --git a/superset-frontend/src/chart/ChartRenderer.jsx b/superset-frontend/src/chart/ChartRenderer.jsx
index e45130a08..7d51761b5 100644
--- a/superset-frontend/src/chart/ChartRenderer.jsx
+++ b/superset-frontend/src/chart/ChartRenderer.jsx
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-import dompurify from 'dompurify';
import { snakeCase } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
diff --git a/superset-frontend/src/chart/chartAction.js b/superset-frontend/src/chart/chartAction.js
index b4328bafa..67f83b59c 100644
--- a/superset-frontend/src/chart/chartAction.js
+++ b/superset-frontend/src/chart/chartAction.js
@@ -18,7 +18,6 @@
*/
/* eslint no-undef: 'error' */
/* eslint no-param-reassign: ["error", { "props": false }] */
-import URI from 'urijs';
import moment from 'moment';
import { t } from '@superset-ui/translation';
import { SupersetClient } from '@superset-ui/connection';
@@ -26,7 +25,6 @@ import { isFeatureEnabled, FeatureFlag } from '../featureFlags';
import {
getAnnotationJsonUrl,
getExploreUrl,
- getHostName,
getLegacyEndpointType,
buildV1ChartDataPayload,
postForm,
diff --git a/superset-frontend/src/chart/chartReducer.js b/superset-frontend/src/chart/chartReducer.js
index 1409623da..d3e22365c 100644
--- a/superset-frontend/src/chart/chartReducer.js
+++ b/superset-frontend/src/chart/chartReducer.js
@@ -89,17 +89,14 @@ export default function chartReducer(charts = {}, action) {
return {
...state,
chartStatus: 'failed',
- chartAlert:
- `${t('Query timeout')} - ` +
- t(
- `visualization queries are set to timeout at ${action.timeout} seconds. `,
- ) +
- t(
- 'Perhaps your data has grown, your database is under unusual load, ' +
- 'or you are simply querying a data source that is too large ' +
- 'to be processed within the timeout range. ' +
- 'If that is the case, we recommend that you summarize your data further.',
- ),
+ chartAlert: `${t('Query timeout')} - ${t(
+ `visualization queries are set to timeout at ${action.timeout} seconds. `,
+ )}${t(
+ 'Perhaps your data has grown, your database is under unusual load, ' +
+ 'or you are simply querying a data source that is too large ' +
+ 'to be processed within the timeout range. ' +
+ 'If that is the case, we recommend that you summarize your data further.',
+ )}`,
chartUpdateEndTime: now(),
};
},
diff --git a/superset-frontend/src/components/AlteredSliceTag.jsx b/superset-frontend/src/components/AlteredSliceTag.jsx
index dbba032e0..d1584614a 100644
--- a/superset-frontend/src/components/AlteredSliceTag.jsx
+++ b/superset-frontend/src/components/AlteredSliceTag.jsx
@@ -20,7 +20,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Table, Tr, Td, Thead, Th } from 'reactable-arc';
import { isEqual, isEmpty } from 'lodash';
-import { getChartControlPanelRegistry } from '@superset-ui/chart';
import getControlsForVizType from 'src/utils/getControlsForVizType';
import { t } from '@superset-ui/translation';
import TooltipWrapper from './TooltipWrapper';
diff --git a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
index 236f25d87..1ecd6180f 100644
--- a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
+++ b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
@@ -143,7 +143,7 @@ export default class FilterableTable extends PureComponent<
this.complexColumns = props.orderedColumnKeys.reduce(
(obj, key) => ({
...obj,
- [key]: props.expandedColumns.some(name => name.startsWith(key + '.')),
+ [key]: props.expandedColumns.some(name => name.startsWith(`${key}.`)),
}),
{},
);
diff --git a/superset-frontend/src/components/Link.tsx b/superset-frontend/src/components/Link.tsx
index 913429f75..f35bdf725 100644
--- a/superset-frontend/src/components/Link.tsx
+++ b/superset-frontend/src/components/Link.tsx
@@ -44,7 +44,7 @@ const Link = ({
href={href}
onClick={onClick}
style={style}
- className={'Link ' + className}
+ className={`Link ${className}`}
>
{children}
diff --git a/superset-frontend/src/components/PopoverSection.jsx b/superset-frontend/src/components/PopoverSection.jsx
index 9fbc8f0ff..8c19f4b2b 100644
--- a/superset-frontend/src/components/PopoverSection.jsx
+++ b/superset-frontend/src/components/PopoverSection.jsx
@@ -36,7 +36,7 @@ export default function PopoverSection({
info,
}) {
return (
-
+
{title}
{info && (
diff --git a/superset-frontend/src/components/TableLoader.jsx b/superset-frontend/src/components/TableLoader.jsx
index 0a83a7211..785109670 100644
--- a/superset-frontend/src/components/TableLoader.jsx
+++ b/superset-frontend/src/components/TableLoader.jsx
@@ -90,9 +90,9 @@ class TableLoader extends React.PureComponent {
{this.state.data.map((row, i) => (
{columns.map(col => {
- if (row.hasOwnProperty('_' + col)) {
+ if (row.hasOwnProperty(`_${col}`)) {
return (
- |
+ |
{row[col]}
|
);
diff --git a/superset-frontend/src/components/TableSelector.jsx b/superset-frontend/src/components/TableSelector.jsx
index a477c85a5..0acff8025 100644
--- a/superset-frontend/src/components/TableSelector.jsx
+++ b/superset-frontend/src/components/TableSelector.jsx
@@ -103,11 +103,11 @@ export default class TableSelector extends React.PureComponent {
});
}
- onDatabaseChange(db, selectChangeMeta) {
- return this.changeDataBase(db);
+ onDatabaseChange(db, force) {
+ return this.changeDataBase(db, force);
}
- onSchemaChange(schemaOpt, selectActionMeta) {
+ onSchemaChange(schemaOpt) {
return this.changeSchema(schemaOpt);
}
diff --git a/superset-frontend/src/components/VictoryTheme.js b/superset-frontend/src/components/VictoryTheme.js
index b673119eb..ad2469c69 100644
--- a/superset-frontend/src/components/VictoryTheme.js
+++ b/superset-frontend/src/components/VictoryTheme.js
@@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-const { assign } = Object;
-
const A11Y_BABU = '#00A699';
const AXIS_LINE_GRAY = '#484848';
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Markdown.jsx b/superset-frontend/src/dashboard/components/gridComponents/Markdown.jsx
index 31415dc27..e46472065 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Markdown.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Markdown.jsx
@@ -167,7 +167,7 @@ class Markdown extends React.PureComponent {
}
}
- componentDidCatch(error, info) {
+ componentDidCatch() {
if (this.state.editor && this.state.editorMode === 'preview') {
this.props.addDangerToast(
t(
diff --git a/superset-frontend/src/explore/AdhocFilter.js b/superset-frontend/src/explore/AdhocFilter.js
index e023b9662..ef9bcbc2b 100644
--- a/superset-frontend/src/explore/AdhocFilter.js
+++ b/superset-frontend/src/explore/AdhocFilter.js
@@ -144,7 +144,7 @@ export default class AdhocFilter {
getDefaultLabel() {
const label = this.translateToSql();
- return label.length < 43 ? label : label.substring(0, 40) + '...';
+ return label.length < 43 ? label : `${label.substring(0, 40)}...`;
}
translateToSql() {
diff --git a/superset-frontend/src/explore/AdhocMetric.js b/superset-frontend/src/explore/AdhocMetric.js
index 82d4923ac..1e29bf129 100644
--- a/superset-frontend/src/explore/AdhocMetric.js
+++ b/superset-frontend/src/explore/AdhocMetric.js
@@ -87,7 +87,7 @@ export default class AdhocMetric {
getDefaultLabel() {
const label = this.translateToSql();
- return label.length < 43 ? label : label.substring(0, 40) + '...';
+ return label.length < 43 ? label : `${label.substring(0, 40)}...`;
}
translateToSql() {
diff --git a/superset-frontend/src/explore/App.jsx b/superset-frontend/src/explore/App.jsx
index 0d3d55a35..58f391abd 100644
--- a/superset-frontend/src/explore/App.jsx
+++ b/superset-frontend/src/explore/App.jsx
@@ -19,7 +19,7 @@
import React from 'react';
import { hot } from 'react-hot-loader/root';
import { Provider } from 'react-redux';
-import { styled, supersetTheme, ThemeProvider } from '@superset-ui/style';
+import { supersetTheme, ThemeProvider } from '@superset-ui/style';
import ToastPresenter from '../messageToasts/containers/ToastPresenter';
import ExploreViewContainer from './components/ExploreViewContainer';
import setupApp from '../setup/setupApp';
diff --git a/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx b/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx
index 0b5a02df3..cc3ed2f3b 100644
--- a/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx
+++ b/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx
@@ -19,7 +19,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormGroup } from 'react-bootstrap';
-import { Select, Creatable } from 'src/components/Select';
+import { Select } from 'src/components/Select';
import { t } from '@superset-ui/translation';
import { SupersetClient } from '@superset-ui/connection';
@@ -236,7 +236,7 @@ export default class AdhocFilterEditPopoverSimpleTabContent extends React.Compon
loading: false,
}));
})
- .catch(error => {
+ .catch(() => {
this.setState(() => ({
suggestions: [],
abortActiveRequest: null,
diff --git a/superset-frontend/src/explore/components/AdhocFilterEditPopoverSqlTabContent.jsx b/superset-frontend/src/explore/components/AdhocFilterEditPopoverSqlTabContent.jsx
index 39b094953..2d7083253 100644
--- a/superset-frontend/src/explore/components/AdhocFilterEditPopoverSqlTabContent.jsx
+++ b/superset-frontend/src/explore/components/AdhocFilterEditPopoverSqlTabContent.jsx
@@ -144,7 +144,7 @@ export default class AdhocFilterEditPopoverSqlTabContent extends React.Component
ref={this.handleAceEditorRef}
mode="sql"
theme="github"
- height={height - 100 + 'px'}
+ height={`${height - 100}px`}
onChange={this.onSqlExpressionChange}
width="100%"
showGutter={false}
diff --git a/superset-frontend/src/explore/components/AdhocMetricEditPopover.jsx b/superset-frontend/src/explore/components/AdhocMetricEditPopover.jsx
index 064385ef6..ad0c8338d 100644
--- a/superset-frontend/src/explore/components/AdhocMetricEditPopover.jsx
+++ b/superset-frontend/src/explore/components/AdhocMetricEditPopover.jsx
@@ -35,7 +35,7 @@ import 'brace/ext/language_tools';
import { t } from '@superset-ui/translation';
import { ColumnOption } from '@superset-ui/chart-controls';
-import { AGGREGATES, AGGREGATES_OPTIONS } from '../constants';
+import { AGGREGATES_OPTIONS } from '../constants';
import AdhocMetricEditPopoverTitle from './AdhocMetricEditPopoverTitle';
import columnType from '../propTypes/columnType';
import AdhocMetric, { EXPRESSION_TYPES } from '../AdhocMetric';
@@ -283,7 +283,7 @@ export default class AdhocMetricEditPopover extends React.Component {
ref={this.handleAceEditorRef}
mode="sql"
theme="github"
- height={this.state.height - 43 + 'px'}
+ height={`${this.state.height - 43}px`}
onChange={this.onSqlExpressionChange}
width="100%"
showGutter={false}
diff --git a/superset-frontend/src/explore/components/AdhocMetricOption.jsx b/superset-frontend/src/explore/components/AdhocMetricOption.jsx
index 9bdca1f3a..60e0a9ce7 100644
--- a/superset-frontend/src/explore/components/AdhocMetricOption.jsx
+++ b/superset-frontend/src/explore/components/AdhocMetricOption.jsx
@@ -19,7 +19,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Label, OverlayTrigger } from 'react-bootstrap';
-import { thresholdScott } from 'd3-array';
import AdhocMetricEditPopover from './AdhocMetricEditPopover';
import AdhocMetric from '../AdhocMetric';
diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.jsx b/superset-frontend/src/explore/components/ControlPanelsContainer.jsx
index 861d30199..67c9857f1 100644
--- a/superset-frontend/src/explore/components/ControlPanelsContainer.jsx
+++ b/superset-frontend/src/explore/components/ControlPanelsContainer.jsx
@@ -22,10 +22,7 @@ import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Alert, Tab, Tabs } from 'react-bootstrap';
-import { isPlainObject } from 'lodash';
import { t } from '@superset-ui/translation';
-import { getChartControlPanelRegistry } from '@superset-ui/chart';
-import { sharedControls } from '@superset-ui/chart-controls';
import ControlPanelSection from './ControlPanelSection';
import ControlRow from './ControlRow';
@@ -64,7 +61,7 @@ class ControlPanelsContainer extends React.Component {
}
renderControl({ name, config }) {
- const { actions, controls, exploreState, form_data: formData } = this.props;
+ const { actions, controls, form_data: formData } = this.props;
const { visibility } = config;
// If the control item is not an object, we have to look up the control data from
diff --git a/superset-frontend/src/explore/components/EmbedCodeButton.jsx b/superset-frontend/src/explore/components/EmbedCodeButton.jsx
index 7f3217c08..5a6618fd2 100644
--- a/superset-frontend/src/explore/components/EmbedCodeButton.jsx
+++ b/superset-frontend/src/explore/components/EmbedCodeButton.jsx
@@ -47,10 +47,10 @@ export default class EmbedCodeButton extends React.Component {
}
generateEmbedHTML() {
- const srcLink =
+ const srcLink = `${
window.location.origin +
- getExploreLongUrl(this.props.latestQueryFormData, 'standalone') +
- `&height=${this.state.height}`;
+ getExploreLongUrl(this.props.latestQueryFormData, 'standalone')
+ }&height=${this.state.height}`;
return (
' |