[eslint] enable no undef (#10825)

* [codeshift] add proper ignore comments

* [codeshift] apply require-to-import transform

* [codeshift/fixup] remove duplicate imports

* [eslint] upgrade config for react "unused" support

* [codeshift] apply remove-unused-imports transform

* [codeshift] apply remove-unused-basic-requires transform

* [codeshift] apply remove-unused-function-arguments transform

* [lintroller] fix argument list spacing

* [codeshift] apply remove-unused-basic-bars transform

* [codeshift/fixup] fixup unused basic var removals

* manually apply remove-unused-assignments transform

* [codeshift] reapply remove-unused-imports transform

* [codeshift] reapply remove-unused-function-arguments transform

* [eslint] autofix param spacing

* manually fix remaining no-undef errors

* use more descriptive file ignore pattern

* add eslint-plugin-react peerDependency

* replace values that looked unused in tests

* remove // kibana-jscodeshift-no-babel comment

* remove import statements from code required by api tests

* Remove '// kibana-jscodeshift-ignore' comments

* address review feedback

* remove remnant of removed if condition
This commit is contained in:
Spencer 2017-03-22 07:08:23 -07:00 committed by GitHub
parent 8f51ec6d84
commit d8d65526c6
789 changed files with 997 additions and 2240 deletions

View file

@ -2,10 +2,7 @@
import expect from 'expect.js';
import PageObjects from '../../../support/page_objects';
import {
bdd,
scenarioManager
} from '../../../support';
import { bdd } from '../../../support';
const DEFAULT_REQUEST = `

View file

@ -1,10 +1,5 @@
import {
bdd,
remote,
scenarioManager,
defaultTimeout,
} from '../../../support';
import { bdd, remote, defaultTimeout } from '../../../support';
bdd.describe('console app', function () {
this.timeout = defaultTimeout;

View file

@ -1,6 +1,6 @@
import expect from 'expect.js';
import { bdd, esClient } from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,11 +1,5 @@
import {
bdd,
defaultTimeout,
elasticDump,
remote,
scenarioManager,
} from '../../../support';
import { bdd, defaultTimeout, elasticDump, scenarioManager } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -4,12 +4,7 @@ import {
DEFAULT_PANEL_WIDTH, DEFAULT_PANEL_HEIGHT
} from '../../../../src/core_plugins/kibana/public/dashboard/panel/panel_state';
import {
bdd,
scenarioManager,
esClient,
elasticDump
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,10 +1,5 @@
import {
bdd,
remote,
scenarioManager,
defaultTimeout,
} from '../../../support';
import { bdd, remote, defaultTimeout } from '../../../support';
bdd.describe('dashboard app', function () {
this.timeout = defaultTimeout;

View file

@ -32,7 +32,6 @@ bdd.describe('discover app', function describeIndexTests() {
bdd.describe('query', function () {
const queryName1 = 'Query # 1';
const queryDescription1 = 'Query # 1 Description';
bdd.it('should show correct time range string by timepicker', async function () {
const actualTimeString = await PageObjects.discover.getTimespanText();
@ -192,7 +191,6 @@ bdd.describe('discover app', function describeIndexTests() {
}
});
}
});
bdd.describe('query #2, which has an empty time range', function () {

View file

@ -37,10 +37,6 @@ bdd.describe('discover app', function describeIndexTests() {
bdd.describe('field data', function () {
const queryName1 = 'New Saved Search';
const fromTimeString = 'September 19th 2015, 06:31:44.000';
const toTimeString = 'September 23rd 2015, 18:31:44.000';
bdd.it('search php should show the correct hit count', function () {
const expectedHitCount = '445';
return PageObjects.discover.query('php')
@ -230,7 +226,6 @@ bdd.describe('discover app', function describeIndexTests() {
bdd.it('a bad syntax query should show an error message', function () {
const expectedHitCount = '1011,156';
const expectedError = 'Discover: Failed to parse query [xxx(yyy]';
return PageObjects.discover.query('xxx(yyy')
.then(function () {

View file

@ -7,7 +7,7 @@ import {
import PageObjects from '../../../support/page_objects';
const expect = require('expect.js');
import expect from 'expect.js';
bdd.describe('source filters', function describeIndexTests() {
bdd.before(function () {

View file

@ -1,10 +1,5 @@
import {
bdd,
remote,
scenarioManager,
defaultTimeout
} from '../../../support';
import { bdd, scenarioManager, defaultTimeout } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,11 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
esClient
} from '../../../support';
import { bdd, esClient } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,12 +1,7 @@
import expect from 'expect.js';
import {
bdd,
remote,
scenarioManager,
esClient
} from '../../../support';
import { bdd, remote, esClient } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,11 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
esClient
} from '../../../support';
import { bdd, esClient } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,12 +1,7 @@
import expect from 'expect.js';
import {
bdd,
defaultTimeout,
scenarioManager,
esClient
} from '../../../support';
import { bdd, esClient } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,11 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
esClient
} from '../../../support';
import { bdd, esClient } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,11 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
esClient
} from '../../../support';
import { bdd, esClient } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -15,7 +15,6 @@ import expect from 'expect.js';
import {
bdd,
scenarioManager,
esClient
} from '../../../support';

View file

@ -1,4 +1,4 @@
import { bdd, defaultTimeout, scenarioManager, esClient, common } from '../../../support';
import { bdd, defaultTimeout, scenarioManager, esClient } from '../../../support';
bdd.describe('settings app', function () {
this.timeout = defaultTimeout;

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';
@ -109,7 +106,6 @@ bdd.describe('visualize app', function describeIndexTests() {
});
bdd.it('should show correct chart, take screenshot', function () {
const chartHeight = 0;
const xAxisLabels = [ '2015-09-20 00:00', '2015-09-21 00:00',
'2015-09-22 00:00', '2015-09-23 00:00'
];

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';
@ -72,7 +69,6 @@ bdd.describe('visualize app', function describeIndexTests() {
});
bdd.it('should show correct data, take screenshot', function () {
const chartHeight = 0;
const expectedChartData = [
'0 2,088', '2,000 2,748', '4,000 2,707', '6,000 2,876',
'8,000 2,863', '10,000 147', '12,000 148', '14,000 129', '16,000 161', '18,000 137'

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';
@ -110,7 +107,7 @@ bdd.describe('visualize app', function describeIndexTests() {
];
return PageObjects.visualize.collapseChart()
.then(function showData(data) {
.then(function showData() {
return PageObjects.visualize.getDataTableData();
})
.then(function showData(data) {

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';
@ -87,7 +84,6 @@ bdd.describe('visualize app', function describeIndexTests() {
return PageObjects.visualize.getPieChartData()
.then(function (pieData) {
const barHeightTolerance = 1;
PageObjects.common.debug('pieData.length = ' + pieData.length);
PageObjects.common.saveScreenshot('Visualize-pie-chart');
expect(pieData.length).to.be(expectedPieChartSliceCount);

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';
@ -228,7 +225,7 @@ bdd.describe('visualize app', function describeIndexTests() {
.then(function () {
return PageObjects.visualize.clickMapZoomIn();
})
.then(function (message) {
.then(function () {
return PageObjects.visualize.saveVisualization(vizName1);
})
.then(function (message) {

View file

@ -1,10 +1,7 @@
import expect from 'expect.js';
import {
bdd,
scenarioManager,
} from '../../../support';
import { bdd } from '../../../support';
import PageObjects from '../../../support/page_objects';
@ -109,7 +106,7 @@ bdd.describe('visualize app', function describeIndexTests() {
];
return PageObjects.visualize.collapseChart()
.then(function showData(data) {
.then(function showData() {
return PageObjects.visualize.getDataTableData();
})
.then(function showData(data) {

View file

@ -1,6 +1,4 @@
import expect from 'expect.js';
import {
bdd,
remote,

View file

@ -1,8 +1,4 @@
import {
bdd,
remote,
defaultTimeout
} from '../../../support';
import { bdd, defaultTimeout } from '../../../support';
import PageObjects from '../../../support/page_objects';