mirror of
https://github.com/apache/superset.git
synced 2026-04-24 18:44:53 +00:00
chore: enable no-unused-vars and prefer-template eslint rules (#10350)
This commit is contained in:
@@ -31,7 +31,7 @@ describe('AnchorLink', () => {
|
||||
global.window = Object.create(window);
|
||||
Object.defineProperty(window, 'location', {
|
||||
value: {
|
||||
hash: '#' + props.anchorLinkId,
|
||||
hash: `#${props.anchorLinkId}`,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user