Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix js warnings #2693

Merged
merged 7 commits into from
Apr 29, 2017
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DisplayQueryButton from './DisplayQueryButton';
const propTypes = {
canDownload: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).isRequired,
slice: PropTypes.object,
queryEndpoint: PropTypes.string,
queryEndpoint: PropTypes.string.isRequired,
queryResponse: PropTypes.object,
chartStatus: PropTypes.string,
};
Expand Down
2 changes: 0 additions & 2 deletions superset/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"lodash.throttle": "^4.1.1",
"mapbox-gl": "^0.26.0",
"moment": "^2.14.1",
"moments": "0.0.2",
"mustache": "^2.2.1",
"nvd3": "1.8.5",
"prop-types": "^15.5.8",
Expand Down Expand Up @@ -97,7 +96,6 @@
"viewport-mercator-project": "^2.1.0"
},
"devDependencies": {
"babel": "^6.3.26",
"babel-cli": "^6.14.0",
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('SliceCell', () => {
const mockedProps = {
slice,
removeSlice: () => {},
expandedSlices: () => {},
expandedSlices: {},
};
it('is valid', () => {
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('ExploreActionButtons', () => {
json_endpoint: '',
},
},
queryEndpoint: 'localhost',
};

it('renders', () => {
Expand Down
3 changes: 3 additions & 0 deletions superset/assets/spec/javascripts/sqllab/SqlEditor_spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ describe('SqlEditor', () => {
latestQuery: queries[0],
tables: [table],
queries,
height: '',
editorQueries: [],
dataPreviewQueries: [],
};
it('is valid', () => {
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('TabbedSqlEditors', () => {
queries: {},
queryEditors: initialState.queryEditors,
tabHistory: initialState.tabHistory,
editorHeight: '',
};
it('is valid', () => {
expect(
Expand Down
11 changes: 6 additions & 5 deletions superset/assets/visualizations/filter_box.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// JS
import d3 from 'd3';
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import Select from 'react-select';
import { Button } from 'react-bootstrap';
Expand All @@ -10,11 +11,11 @@ import { TIME_CHOICES } from './constants';
import './filter_box.css';

const propTypes = {
origSelectedValues: React.PropTypes.object,
instantFiltering: React.PropTypes.bool,
filtersChoices: React.PropTypes.object,
onChange: React.PropTypes.func,
showDateFilter: React.PropTypes.bool,
origSelectedValues: PropTypes.object,
instantFiltering: PropTypes.bool,
filtersChoices: PropTypes.object,
onChange: PropTypes.func,
showDateFilter: PropTypes.bool,
};

const defaultProps = {
Expand Down
29 changes: 15 additions & 14 deletions superset/assets/visualizations/mapbox.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-param-reassign */
import d3 from 'd3';
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import MapGL from 'react-map-gl';
import ScatterPlotOverlay from 'react-map-gl/dist/overlays/scatterplot.react';
Expand Down Expand Up @@ -256,20 +257,20 @@ class MapboxViz extends React.Component {
}
}
MapboxViz.propTypes = {
aggregatorName: React.PropTypes.string,
clusterer: React.PropTypes.object,
globalOpacity: React.PropTypes.number,
mapStyle: React.PropTypes.string,
mapboxApiKey: React.PropTypes.string,
pointRadius: React.PropTypes.number,
pointRadiusUnit: React.PropTypes.string,
renderWhileDragging: React.PropTypes.bool,
rgb: React.PropTypes.array,
sliceHeight: React.PropTypes.number,
sliceWidth: React.PropTypes.number,
viewportLatitude: React.PropTypes.number,
viewportLongitude: React.PropTypes.number,
viewportZoom: React.PropTypes.number,
aggregatorName: PropTypes.string,
clusterer: PropTypes.object,
globalOpacity: PropTypes.number,
mapStyle: PropTypes.string,
mapboxApiKey: PropTypes.string,
pointRadius: PropTypes.number,
pointRadiusUnit: PropTypes.string,
renderWhileDragging: PropTypes.bool,
rgb: PropTypes.array,
sliceHeight: PropTypes.number,
sliceWidth: PropTypes.number,
viewportLatitude: PropTypes.number,
viewportLongitude: PropTypes.number,
viewportZoom: PropTypes.number,
};

function mapbox(slice, json) {
Expand Down