ESLint: Enable rule no-named-as-default (#10879)

* Enable rule no-named-as-default

* Fix wrong import
This commit is contained in:
Kamil Gabryjelski
2020-09-18 22:41:01 +02:00
committed by GitHub
parent 91fd06e093
commit 557a303cc5
19 changed files with 21 additions and 33 deletions

View File

@@ -23,7 +23,7 @@ import { t } from '@superset-ui/core';
import URLShortLinkButton from '../../components/URLShortLinkButton';
import EmbedCodeButton from './EmbedCodeButton';
import DisplayQueryButton from './DisplayQueryButton';
import ConnectedDisplayQueryButton from './DisplayQueryButton';
import { exportChart, getExploreLongUrl } from '../exploreUtils';
const propTypes = {
@@ -100,7 +100,7 @@ export default function ExploreActionButtons({
<i className="fa fa-file-text-o" /> .csv
</a>
)}
<DisplayQueryButton
<ConnectedDisplayQueryButton
chartHeight={chartHeight}
queryResponse={queryResponse}
latestQueryFormData={latestQueryFormData}

View File

@@ -22,7 +22,7 @@ import { ParentSize } from '@vx/responsive';
import { styled } from '@superset-ui/core';
import { chartPropShape } from '../../dashboard/util/propShapes';
import ChartContainer from '../../chart/ChartContainer';
import ExploreChartHeader from './ExploreChartHeader';
import ConnectedExploreChartHeader from './ExploreChartHeader';
const propTypes = {
actions: PropTypes.object.isRequired,
@@ -110,7 +110,7 @@ class ExploreChartPanel extends React.PureComponent {
}
const header = (
<ExploreChartHeader
<ConnectedExploreChartHeader
actions={this.props.actions}
addHistory={this.props.addHistory}
can_overwrite={this.props.can_overwrite}

View File

@@ -24,7 +24,7 @@ import { connect } from 'react-redux';
import { styled, logging, t } from '@superset-ui/core';
import ExploreChartPanel from './ExploreChartPanel';
import ControlPanelsContainer from './ControlPanelsContainer';
import ConnectedControlPanelsContainer from './ControlPanelsContainer';
import SaveModal from './SaveModal';
import QueryAndSaveBtns from './QueryAndSaveBtns';
import { getExploreLongUrl } from '../exploreUtils';
@@ -352,7 +352,7 @@ class ExploreViewContainer extends React.Component {
errorMessage={this.renderErrorMessage()}
datasourceType={this.props.datasource_type}
/>
<ControlPanelsContainer
<ConnectedControlPanelsContainer
actions={this.props.actions}
form_data={this.props.form_data}
controls={this.props.controls}
@@ -416,8 +416,6 @@ function mapDispatchToProps(dispatch) {
};
}
export { ExploreViewContainer };
export default connect(
mapStateToProps,
mapDispatchToProps,

View File

@@ -250,5 +250,4 @@ function mapStateToProps({ explore, saveModal }) {
};
}
export { SaveModal };
export default connect(mapStateToProps, () => ({}))(SaveModal);

View File

@@ -34,8 +34,9 @@ import SelectControl from './SelectControl';
import TextControl from './TextControl';
import CheckboxControl from './CheckboxControl';
import ANNOTATION_TYPES, {
import {
ANNOTATION_SOURCE_TYPES,
ANNOTATION_TYPES,
ANNOTATION_TYPES_METADATA,
DEFAULT_ANNOTATION_TYPE,
requiresQuery,