diff --git a/x-pack/plugins/ml/public/explorer/explorer_swimlane.js b/x-pack/plugins/ml/public/explorer/explorer_swimlane.js index 11de1417b5782..7bc3f928b131f 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_swimlane.js +++ b/x-pack/plugins/ml/public/explorer/explorer_swimlane.js @@ -293,7 +293,7 @@ export const ExplorerSwimlane = injectI18n(class ExplorerSwimlane extends React. }; } - function cellMouseover(target, laneLabel, bucketScore, index, time) { // eslint-disable-line no-unused-vars + function cellMouseover(target, laneLabel, bucketScore, index, time) { if (bucketScore === undefined || cellMouseoverActive === false) { return; } @@ -368,7 +368,7 @@ export const ExplorerSwimlane = injectI18n(class ExplorerSwimlane extends React. // TODO - mark if zoomed in to bucket width? let time = startTime; - Array(numBuckets || 0).fill(null).forEach((v, i) => { // eslint-disable-line no-unused-vars + Array(numBuckets || 0).fill(null).forEach((v, i) => { const cell = cellsContainer.append('div') .classed('sl-cell', true) .style('width', `${cellWidth}px`) diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/import_view/importer/ndjson_importer.js b/x-pack/plugins/ml/public/file_datavisualizer/components/import_view/importer/ndjson_importer.js index e7fd4bf0a799f..5f1c834b03af7 100644 --- a/x-pack/plugins/ml/public/file_datavisualizer/components/import_view/importer/ndjson_importer.js +++ b/x-pack/plugins/ml/public/file_datavisualizer/components/import_view/importer/ndjson_importer.js @@ -8,7 +8,7 @@ import { Importer } from './importer'; export class NdjsonImporter extends Importer { - constructor(results, settings) { // eslint-disable-line no-unused-vars + constructor(results, settings) { super(settings); } diff --git a/x-pack/plugins/ml/public/jobs/components/custom_url_editor/utils.js b/x-pack/plugins/ml/public/jobs/components/custom_url_editor/utils.js index 17cb13595f7c4..83317b505d599 100644 --- a/x-pack/plugins/ml/public/jobs/components/custom_url_editor/utils.js +++ b/x-pack/plugins/ml/public/jobs/components/custom_url_editor/utils.js @@ -83,7 +83,7 @@ export function getQueryEntityFieldNames(job) { entityFieldNames.push(...influencers); } - detectors.forEach((detector, detectorIndex) => { // eslint-disable-line no-unused-vars + detectors.forEach((detector, detectorIndex) => { const partitioningFields = getPartitioningFieldNames(job, detectorIndex); partitioningFields.forEach((fieldName) => { @@ -341,7 +341,7 @@ export function getTestUrl(job, customUrl) { }; // Look for bucket aggregations which match the tokens in the URL. - urlValue.replace((/\$([^?&$\'"]{1,40})\$/g), (match, name) => { // eslint-disable-line no-unused-vars + urlValue.replace((/\$([^?&$\'"]{1,40})\$/g), (match, name) => { if (name !== 'earliest' && name !== 'latest' && firstBucket[name] !== undefined) { const tokenBuckets = firstBucket[name]; if (tokenBuckets.buckets) { diff --git a/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js b/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js index eaeb25cd596e3..9a608f965bd22 100644 --- a/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js +++ b/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js @@ -153,7 +153,7 @@ class JobsListUI extends Component { }), sortable: true, field: 'description', - render: (description, item) => ( // eslint-disable-line no-unused-vars + render: (description, item) => ( ), textOnly: true, @@ -199,7 +199,7 @@ class JobsListUI extends Component { truncateText: false, field: 'latestTimestampSortValue', sortable: true, - render: (time, item) => ( // eslint-disable-line no-unused-vars + render: (time, item) => ( { (item.latestTimestampMs === undefined) ? '' : moment(item.latestTimestampMs).format(TIME_FORMAT) diff --git a/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js b/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js index bb800d91d1b04..a5ce75a46fec8 100644 --- a/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js +++ b/x-pack/plugins/ml/public/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js @@ -76,7 +76,7 @@ export class JobsListView extends Component { this.props.angularWrapperScope.$on('jobsUpdated', () => { this.refreshJobSummaryList(true); }); - this.props.angularWrapperScope.$on('openCreateWatchWindow', (e, job) => { // eslint-disable-line no-unused-vars + this.props.angularWrapperScope.$on('openCreateWatchWindow', (e, job) => { this.showCreateWatchFlyout(job.job_id); }); diff --git a/x-pack/plugins/ml/public/jobs/new_job/advanced/field_select.js b/x-pack/plugins/ml/public/jobs/new_job/advanced/field_select.js index 56e6de40acbff..965f68b55b3b8 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/advanced/field_select.js +++ b/x-pack/plugins/ml/public/jobs/new_job/advanced/field_select.js @@ -28,7 +28,7 @@ export class FieldSelect extends Component { function getOptions() { const ops = []; - _.each(options, (op, key) => { // eslint-disable-line no-unused-vars + _.each(options, (op, key) => { ops.push({ label: key, value: key }); }); return ops; diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/components/utils/chart_data_utils.js b/x-pack/plugins/ml/public/jobs/new_job/simple/components/utils/chart_data_utils.js index 640399d78eddf..ee73c87783ecd 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/components/utils/chart_data_utils.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/components/utils/chart_data_utils.js @@ -131,7 +131,7 @@ export function ChartDataUtilsProvider(Private) { ) .then((data) => { let dtrIndex = 0; - _.each(formConfig.fields, (field, key) => { // eslint-disable-line no-unused-vars + _.each(formConfig.fields, (field, key) => { const dtr = chartData.detectors[key]; const times = data.results[dtrIndex]; diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/create_watch_view.js b/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/create_watch_view.js index 9cdd758c18d7c..1237feed46da5 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/create_watch_view.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/components/watcher/create_watch_view.js @@ -120,7 +120,7 @@ export const CreateWatch = injectI18n(class CreateWatch extends Component { const { intl } = this.props; const mlSelectSeverityService = { state: { - set: (name, threshold) => { // eslint-disable-line no-unused-vars + set: (name, threshold) => { this.onThresholdChange(threshold); return { changed: () => {} diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js b/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js index 0150d41a191bc..b1cbc794a4e92 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js @@ -351,7 +351,7 @@ module }) .catch((resp) => { msgs.error(resp.message); - _.each($scope.formConfig.fields, (field, id) => { // eslint-disable-line no-unused-vars + _.each($scope.formConfig.fields, (field, id) => { $scope.chartStates.fields[id] = CHART_STATE.NO_RESULTS; }); $scope.$applyAsync(); @@ -365,7 +365,7 @@ module chartDataUtils.loadDocCountData($scope.formConfig, $scope.chartData) .then((resp) => { if (thisLoadTimestamp === $scope.chartData.lastLoadTimestamp) { - _.each(dtrs, (dtr, id) => { // eslint-disable-line no-unused-vars + _.each(dtrs, (dtr, id) => { const state = (resp.totalResults) ? CHART_STATE.LOADED : CHART_STATE.NO_RESULTS; $scope.chartStates.fields[id] = state; }); @@ -387,7 +387,7 @@ module }; function setFieldsChartStates(state) { - _.each($scope.chartStates.fields, (chart, key) => { // eslint-disable-line no-unused-vars + _.each($scope.chartStates.fields, (chart, key) => { $scope.chartStates.fields[key] = state; }); $scope.$applyAsync(); diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_controller.js b/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_controller.js index 11b0406b218b3..bdcf1f1071b58 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_controller.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_controller.js @@ -374,7 +374,7 @@ module chartDataUtils.loadDocCountData($scope.formConfig, $scope.chartData) .then((resp) => { if (thisLoadTimestamp === $scope.chartData.lastLoadTimestamp) { - _.each(dtrs, (dtr, id) => { // eslint-disable-line no-unused-vars + _.each(dtrs, (dtr, id) => { const state = (resp.totalResults) ? CHART_STATE.LOADED : CHART_STATE.NO_RESULTS; $scope.chartStates.fields[id] = state; }); @@ -396,7 +396,7 @@ module }; function setFieldsChartStates(state) { - _.each($scope.chartStates.fields, (chart, key) => { // eslint-disable-line no-unused-vars + _.each($scope.chartStates.fields, (chart, key) => { $scope.chartStates.fields[key] = state; }); $scope.$applyAsync(); diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_service.js b/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_service.js index 192cadc02b04f..9ffc5ea8da65f 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_service.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/population/create_job/create_job_service.js @@ -69,7 +69,7 @@ export function PopulationJobServiceProvider(Private) { fieldIds.splice(0, 0, EVENT_RATE_COUNT_FIELD); } - fieldIds.forEach((fieldId, i) => { // eslint-disable-line no-unused-vars + fieldIds.forEach((fieldId, i) => { this.chartData.detectors[i] = { line: [], swimlane: [], diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/single_metric/create_job/create_job_controller.js b/x-pack/plugins/ml/public/jobs/new_job/simple/single_metric/create_job/create_job_controller.js index 58485dc7674d1..05e5797fea82f 100644 --- a/x-pack/plugins/ml/public/jobs/new_job/simple/single_metric/create_job/create_job_controller.js +++ b/x-pack/plugins/ml/public/jobs/new_job/simple/single_metric/create_job/create_job_controller.js @@ -515,7 +515,7 @@ module // check to see if the percentage is past a threshold for reloading the full model let fullModelRefresh = false; - _.each(jobProgressChecks, (c, i) => { // eslint-disable-line no-unused-vars + _.each(jobProgressChecks, (c, i) => { if (jobProgressChecks[i] === false && $scope.chartData.percentComplete >= i) { jobProgressChecks[i] = true; fullModelRefresh = true; @@ -600,7 +600,7 @@ module $scope.jobState = JOB_STATE.NOT_STARTED; angular.element('.model-chart, .swimlane').css('opacity', 0); - _.each(jobProgressChecks, (c, i) => { // eslint-disable-line no-unused-vars + _.each(jobProgressChecks, (c, i) => { jobProgressChecks[i] = false; }); diff --git a/x-pack/plugins/ml/public/timeseriesexplorer/timeseriesexplorer_controller.js b/x-pack/plugins/ml/public/timeseriesexplorer/timeseriesexplorer_controller.js index 818831d5ac11f..d98ef54c71257 100644 --- a/x-pack/plugins/ml/public/timeseriesexplorer/timeseriesexplorer_controller.js +++ b/x-pack/plugins/ml/public/timeseriesexplorer/timeseriesexplorer_controller.js @@ -713,7 +713,7 @@ module.controller('MlTimeSeriesExplorerController', function ( jobSelectServiceSub.unsubscribe(); }); - $scope.$on('contextChartSelected', function (event, selection) { // eslint-disable-line no-unused-vars + $scope.$on('contextChartSelected', function (event, selection) { // Save state of zoom (adds to URL) if it is different to the default. if (($scope.contextChartData === undefined || $scope.contextChartData.length === 0) && ($scope.contextForecastData === undefined || $scope.contextForecastData.length === 0)) { diff --git a/x-pack/plugins/ml/public/util/ml_calc_auto_interval.js b/x-pack/plugins/ml/public/util/ml_calc_auto_interval.js index e6afe5ecab67d..871be1ea367ac 100644 --- a/x-pack/plugins/ml/public/util/ml_calc_auto_interval.js +++ b/x-pack/plugins/ml/public/util/ml_calc_auto_interval.js @@ -119,7 +119,7 @@ export function TimeBucketsCalcAutoIntervalProvider() { }), - atLeast: find(revRoundingRules, function atLeast(upperBound, lowerBound, target) { // eslint-disable-line no-unused-vars + atLeast: find(revRoundingRules, function atLeast(upperBound, lowerBound, target) { // Unmodified from Kibana ui/time_buckets/calc_auto_interval.js. if (lowerBound <= target) { return lowerBound; diff --git a/x-pack/plugins/ml/server/client/elasticsearch_ml.js b/x-pack/plugins/ml/server/client/elasticsearch_ml.js index 93febae80eb2e..4a25036e0ad0f 100644 --- a/x-pack/plugins/ml/server/client/elasticsearch_ml.js +++ b/x-pack/plugins/ml/server/client/elasticsearch_ml.js @@ -6,7 +6,7 @@ -export const elasticsearchJsPlugin = (Client, config, components) => { // eslint-disable-line no-unused-vars +export const elasticsearchJsPlugin = (Client, config, components) => { const ca = components.clientAction.factory; Client.prototype.ml = components.clientAction.namespaceFactory(); diff --git a/x-pack/plugins/ml/server/models/job_validation/validate_influencers.js b/x-pack/plugins/ml/server/models/job_validation/validate_influencers.js index c31740d29be6f..663fd2b98934d 100644 --- a/x-pack/plugins/ml/server/models/job_validation/validate_influencers.js +++ b/x-pack/plugins/ml/server/models/job_validation/validate_influencers.js @@ -12,7 +12,7 @@ const INFLUENCER_LOW_THRESHOLD = 0; const INFLUENCER_HIGH_THRESHOLD = 4; const DETECTOR_FIELD_NAMES_THRESHOLD = 1; -export async function validateInfluencers(callWithRequest, job) { // eslint-disable-line no-unused-vars +export async function validateInfluencers(callWithRequest, job) { validateJobObject(job); const messages = []; diff --git a/x-pack/plugins/reporting/export_types/png/server/lib/generate_png.js b/x-pack/plugins/reporting/export_types/png/server/lib/generate_png.js index 5accfe3d1c7e2..c80f8db442e43 100644 --- a/x-pack/plugins/reporting/export_types/png/server/lib/generate_png.js +++ b/x-pack/plugins/reporting/export_types/png/server/lib/generate_png.js @@ -17,7 +17,7 @@ function generatePngObservableFn(server) { const urlScreenshotsObservable = (url, conditionalHeaders, layout, browserTimezone) => { return Rx.of(url).pipe( mergeMap(url => screenshotsObservable(url, conditionalHeaders, layout, browserTimezone), - (outer, inner) => inner, // eslint-disable-line no-unused-vars + (outer, inner) => inner, captureConcurrency ) ); diff --git a/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js b/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js index d971bf813f9eb..677acadaac2a1 100644 --- a/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js +++ b/x-pack/plugins/reporting/export_types/printable_pdf/server/lib/generate_pdf.js @@ -34,7 +34,7 @@ function generatePdfObservableFn(server) { const urlScreenshotsObservable = (urls, conditionalHeaders, layout, browserTimezone) => { return Rx.from(urls).pipe( - mergeMap(url => screenshotsObservable(url, conditionalHeaders, layout, browserTimezone), // eslint-disable-line no-unused-vars + mergeMap(url => screenshotsObservable(url, conditionalHeaders, layout, browserTimezone), (outer, inner) => inner, captureConcurrency ) diff --git a/x-pack/plugins/reporting/server/lib/esqueue/__tests__/worker.js b/x-pack/plugins/reporting/server/lib/esqueue/__tests__/worker.js index 1b71aa6ee0f8c..1b604ebe50aa0 100644 --- a/x-pack/plugins/reporting/server/lib/esqueue/__tests__/worker.js +++ b/x-pack/plugins/reporting/server/lib/esqueue/__tests__/worker.js @@ -706,7 +706,7 @@ describe('Worker class', function () { }); it('should update the job with the workerFn output', function () { - const workerFn = function (job, jobPayload) { // eslint-disable-line no-unused-vars + const workerFn = function (job, jobPayload) { expect(jobPayload).to.eql(payload); return payload; }; @@ -729,7 +729,7 @@ describe('Worker class', function () { it('should update the job status and completed time', function () { const startTime = moment().valueOf(); - const workerFn = function (job, jobPayload) { // eslint-disable-line no-unused-vars + const workerFn = function (job, jobPayload) { expect(jobPayload).to.eql(payload); return new Promise(function (resolve) { setTimeout(() => resolve(payload), 10); @@ -790,7 +790,7 @@ describe('Worker class', function () { it('should handle async errors', function () { const workerFn = function () { - return new Promise((resolve, reject) => { // eslint-disable-line no-unused-vars + return new Promise((resolve, reject) => { reject(new Error('test error')); }); }; @@ -807,7 +807,7 @@ describe('Worker class', function () { it('should handle rejecting with strings', function () { const errorMessage = 'this is a string error'; const workerFn = function () { - return new Promise((resolve, reject) => { // eslint-disable-line no-unused-vars + return new Promise((resolve, reject) => { reject(errorMessage); }); }; @@ -823,7 +823,7 @@ describe('Worker class', function () { it('should handle empty rejection', function (done) { const workerFn = function () { - return new Promise((resolve, reject) => { // eslint-disable-line no-unused-vars + return new Promise((resolve, reject) => { reject(); }); }; @@ -904,7 +904,7 @@ describe('Worker class', function () { const timeout = 20; cancellationCallback = function () {}; - const workerFn = function (job, payload, cancellationToken) { // eslint-disable-line no-unused-vars + const workerFn = function (job, payload, cancellationToken) { cancellationToken.on(cancellationCallback); return new Promise(function (resolve) { setTimeout(() => { @@ -991,7 +991,7 @@ describe('Worker class', function () { describe('workerFn rejects promise', function () { beforeEach(function () { const workerFn = function () { - return new Promise(function (resolve, reject) { // eslint-disable-line no-unused-vars + return new Promise(function (resolve, reject) { setTimeout(() => { reject(); }, timeout / 2); diff --git a/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js b/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js index 4f07a135f0637..078fe1349c3a3 100644 --- a/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js +++ b/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js @@ -8,7 +8,7 @@ import { getReportingUsageCollector } from './get_reporting_usage_collector'; function getServerMock(customization) { class MockUsageCollector { - constructor(_server, { fetch }) { // eslint-disable-line no-unused-vars + constructor(_server, { fetch }) { this.fetch = fetch; } } diff --git a/x-pack/plugins/rollup/__jest__/client_integration/job_create_logistics.test.js b/x-pack/plugins/rollup/__jest__/client_integration/job_create_logistics.test.js index f8e189c6069a2..20030e0c2187b 100644 --- a/x-pack/plugins/rollup/__jest__/client_integration/job_create_logistics.test.js +++ b/x-pack/plugins/rollup/__jest__/client_integration/job_create_logistics.test.js @@ -174,7 +174,7 @@ describe('Create Rollup Job, step 1: Logistics', () => { }; const generateStringSequenceOfNumbers = (total) => ( - new Array(total).fill('').map((_, i) => i < 10 ? `0${i}` : i.toString()) // eslint-disable-line no-unused-vars + new Array(total).fill('').map((_, i) => i < 10 ? `0${i}` : i.toString()) ); describe('frequency', () => { diff --git a/x-pack/plugins/rollup/public/crud_app/sections/job_create/job_create.js b/x-pack/plugins/rollup/public/crud_app/sections/job_create/job_create.js index 466080e2f7198..9788b2fdfc36a 100644 --- a/x-pack/plugins/rollup/public/crud_app/sections/job_create/job_create.js +++ b/x-pack/plugins/rollup/public/crud_app/sections/job_create/job_create.js @@ -114,7 +114,7 @@ export class JobCreateUi extends Component { this._isMounted = true; } - componentDidUpdate(prevProps, prevState) { // eslint-disable-line no-unused-vars + componentDidUpdate(prevProps, prevState) { const indexPattern = this.getIndexPattern(); if (indexPattern !== this.getIndexPattern(prevState)) { // If the user hasn't entered anything, then skip validation. diff --git a/x-pack/plugins/rollup/public/visualize/agg_type_field_filter.js b/x-pack/plugins/rollup/public/visualize/agg_type_field_filter.js index 11604eac93dd0..f8de89cfc478f 100644 --- a/x-pack/plugins/rollup/public/visualize/agg_type_field_filter.js +++ b/x-pack/plugins/rollup/public/visualize/agg_type_field_filter.js @@ -12,7 +12,7 @@ export function initAggTypeFieldFilter() { * and limit available fields for a given aggType based on that. */ aggTypeFieldFilters.addFilter( - (field, fieldParamType, aggConfig) => { // eslint-disable-line no-unused-vars + (field, fieldParamType, aggConfig) => { const indexPattern = aggConfig.getIndexPattern(); if(!indexPattern || indexPattern.type !== 'rollup') { return true; diff --git a/x-pack/plugins/rollup/public/visualize/editor_config.js b/x-pack/plugins/rollup/public/visualize/editor_config.js index 125c80bc28a47..4eb8e2b70b129 100644 --- a/x-pack/plugins/rollup/public/visualize/editor_config.js +++ b/x-pack/plugins/rollup/public/visualize/editor_config.js @@ -9,7 +9,7 @@ import { editorConfigProviders } from 'ui/vis/editors/config/editor_config_provi export function initEditorConfig() { // Limit agg params based on rollup capabilities - editorConfigProviders.register((aggType, indexPattern, aggConfig) => { // eslint-disable-line no-unused-vars + editorConfigProviders.register((aggType, indexPattern, aggConfig) => { if(indexPattern.type !== 'rollup') { return {}; } diff --git a/x-pack/plugins/rollup/server/client/elasticsearch_rollup.js b/x-pack/plugins/rollup/server/client/elasticsearch_rollup.js index 444b9adb0314a..b6387502abe2f 100644 --- a/x-pack/plugins/rollup/server/client/elasticsearch_rollup.js +++ b/x-pack/plugins/rollup/server/client/elasticsearch_rollup.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -export const elasticsearchJsPlugin = (Client, config, components) => { // eslint-disable-line no-unused-vars +export const elasticsearchJsPlugin = (Client, config, components) => { const ca = components.clientAction.factory; Client.prototype.rollup = components.clientAction.namespaceFactory(); diff --git a/x-pack/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.test.js b/x-pack/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.test.js index cede6eb514632..8bd1694dab855 100644 --- a/x-pack/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.test.js +++ b/x-pack/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.test.js @@ -6,7 +6,7 @@ import { getRollupSearchCapabilities } from './rollup_search_capabilities'; class DefaultSearchCapabilities { - constructor(request, fieldsCapabilities = {}) { // eslint-disable-line no-unused-vars + constructor(request, fieldsCapabilities = {}) { this.fieldsCapabilities = fieldsCapabilities; this.parseInterval = jest.fn((interval) => interval); } diff --git a/x-pack/plugins/security/server/routes/views/logout.js b/x-pack/plugins/security/server/routes/views/logout.js index 098653c4e9f7c..aa407f0cf3c85 100644 --- a/x-pack/plugins/security/server/routes/views/logout.js +++ b/x-pack/plugins/security/server/routes/views/logout.js @@ -10,7 +10,7 @@ export function initLogoutView(server) { server.route({ method: 'GET', path: '/logout', - handler(request, h) { // eslint-disable-line no-unused-vars + handler(request, h) { return h.renderAppWithDefaultConfig(logout); }, config: { diff --git a/x-pack/plugins/watcher/public/components/threshold_preview_chart/threshold_preview_chart.js b/x-pack/plugins/watcher/public/components/threshold_preview_chart/threshold_preview_chart.js index 5d31a198a2946..5823fab842730 100644 --- a/x-pack/plugins/watcher/public/components/threshold_preview_chart/threshold_preview_chart.js +++ b/x-pack/plugins/watcher/public/components/threshold_preview_chart/threshold_preview_chart.js @@ -151,7 +151,7 @@ app.directive('thresholdPreviewChart', function ($injector) { return options; } - onPlotHover = (event, pos, item, plot) => { // eslint-disable-line no-unused-vars + onPlotHover = (event, pos, item, plot) => { if (!Boolean(item)) { this.dataPointTooltip = undefined; return; diff --git a/x-pack/plugins/watcher/public/sections/watch_list/components/watch_table/watch_table.js b/x-pack/plugins/watcher/public/sections/watch_list/components/watch_table/watch_table.js index 9118f51af8782..df0461080686c 100644 --- a/x-pack/plugins/watcher/public/sections/watch_list/components/watch_table/watch_table.js +++ b/x-pack/plugins/watcher/public/sections/watch_list/components/watch_table/watch_table.js @@ -56,7 +56,7 @@ app.directive('watchTable', function () { }); } - onAllSelectedChange = (itemId, allSelected) => { // eslint-disable-line no-unused-vars + onAllSelectedChange = (itemId, allSelected) => { _.forEach(this.editableItems, item => { item.selected = allSelected; }); diff --git a/x-pack/plugins/watcher/server/lib/elasticsearch_js_plugin/elasticsearch_js_plugin.js b/x-pack/plugins/watcher/server/lib/elasticsearch_js_plugin/elasticsearch_js_plugin.js index 4e5353f311249..ad42388beea1e 100644 --- a/x-pack/plugins/watcher/server/lib/elasticsearch_js_plugin/elasticsearch_js_plugin.js +++ b/x-pack/plugins/watcher/server/lib/elasticsearch_js_plugin/elasticsearch_js_plugin.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -export const elasticsearchJsPlugin = (Client, config, components) => { // eslint-disable-line no-unused-vars +export const elasticsearchJsPlugin = (Client, config, components) => { const ca = components.clientAction.factory; Client.prototype.watcher = components.clientAction.namespaceFactory(); diff --git a/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js index d891f14d33057..e3de2a5744e35 100644 --- a/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js +++ b/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js @@ -32,7 +32,7 @@ function buildDateAgg({ field, interval, timeZone }) { }; } -function buildAggsCount(body, dateAgg) { // eslint-disable-line no-unused-vars +function buildAggsCount(body, dateAgg) { return { dateAgg }; diff --git a/x-pack/server/lib/esjs_shield_plugin.js b/x-pack/server/lib/esjs_shield_plugin.js index 50b365d6cfd50..e6e9a6f58fe1f 100644 --- a/x-pack/server/lib/esjs_shield_plugin.js +++ b/x-pack/server/lib/esjs_shield_plugin.js @@ -13,7 +13,7 @@ root.ElasticsearchShield = factory(); } }(this, function () { - return function addShieldApi(Client, config, components) { // eslint-disable-line no-unused-vars + return function addShieldApi(Client, config, components) { const ca = components.clientAction.factory; Client.prototype.shield = components.clientAction.namespaceFactory(); diff --git a/x-pack/server/lib/key_case_converter.js b/x-pack/server/lib/key_case_converter.js index c39a57a64f7ed..18cfd5f09b1c3 100644 --- a/x-pack/server/lib/key_case_converter.js +++ b/x-pack/server/lib/key_case_converter.js @@ -24,7 +24,7 @@ function convertKeysToSpecifiedCaseDeep(object, caseConversionFunction) { newObject = _.clone(object); // Convert top-level keys - newObject = _.mapKeys(newObject, (value, key) => caseConversionFunction(key)); // eslint-disable-line no-unused-vars + newObject = _.mapKeys(newObject, (value, key) => caseConversionFunction(key)); } // Recursively convert nested object keys diff --git a/x-pack/server/lib/mirror_plugin_status.js b/x-pack/server/lib/mirror_plugin_status.js index d09fd8acf3751..7f04172c6cb77 100644 --- a/x-pack/server/lib/mirror_plugin_status.js +++ b/x-pack/server/lib/mirror_plugin_status.js @@ -7,7 +7,7 @@ export function mirrorPluginStatus(upstreamPlugin, downstreamPlugin, ...statesToMirror) { upstreamPlugin.status.setMaxListeners(20); // We need more than the default, which is 10 - function mirror(previousState, previousMsg, newState, newMsg) { // eslint-disable-line no-unused-vars + function mirror(previousState, previousMsg, newState, newMsg) { if (newState) { downstreamPlugin.status[newState](newMsg); } diff --git a/x-pack/server/lib/watch_status_and_license_to_initialize.js b/x-pack/server/lib/watch_status_and_license_to_initialize.js index 60a7cbad5bdca..28cbbbb04c93d 100644 --- a/x-pack/server/lib/watch_status_and_license_to_initialize.js +++ b/x-pack/server/lib/watch_status_and_license_to_initialize.js @@ -42,7 +42,7 @@ export function watchStatusAndLicenseToInitialize(xpackMainPlugin, downstreamPlu message: upstreamStatus.message, }); const newStatus$ = Rx - .fromEvent(upstreamStatus, 'change', null, (previousState, previousMsg, state, message) => { // eslint-disable-line no-unused-vars + .fromEvent(upstreamStatus, 'change', null, (previousState, previousMsg, state, message) => { return { state, message, diff --git a/x-pack/test/functional/apps/monitoring/cluster/alerts.js b/x-pack/test/functional/apps/monitoring/cluster/alerts.js index a55f2282a9196..0a2ffb90c536d 100644 --- a/x-pack/test/functional/apps/monitoring/cluster/alerts.js +++ b/x-pack/test/functional/apps/monitoring/cluster/alerts.js @@ -87,7 +87,7 @@ export default function ({ getService, getPageObjects }) { const alertsAll = await alerts.getOverviewAlertsAll(); - alertsAll.forEach((obj, index) => { // eslint-disable-line no-unused-vars + alertsAll.forEach((obj, index) => { expect(alertsAll[index].alertIcon).to.be(panelData[index].alertIcon); expect(alertsAll[index].alertText).to.be(panelData[index].alertText); }); @@ -152,7 +152,7 @@ export default function ({ getService, getPageObjects }) { )); expect(alertsAll.length).to.be(tableData.length); - alertsAll.forEach((obj, index) => { // eslint-disable-line no-unused-vars + alertsAll.forEach((obj, index) => { expect(`${alertsAll[index].alertIcon} ${alertsAll[index].alertText}`) .to.be(`${tableData[index].alertIcon} ${tableData[index].alertText}`); }); diff --git a/x-pack/test/functional/apps/monitoring/elasticsearch/indices.js b/x-pack/test/functional/apps/monitoring/elasticsearch/indices.js index c75d3e277ea25..fc3669079dbce 100644 --- a/x-pack/test/functional/apps/monitoring/elasticsearch/indices.js +++ b/x-pack/test/functional/apps/monitoring/elasticsearch/indices.js @@ -77,7 +77,7 @@ export default function ({ getService, getPageObjects }) { ]; /*eslint-enable*/ // check the all data in the table - indicesAll.forEach((obj, index) => { // eslint-disable-line no-unused-vars + indicesAll.forEach((obj, index) => { expect(indicesAll[index].name).to.be(tableData[index].name); expect(indicesAll[index].status).to.be(tableData[index].status); expect(indicesAll[index].documentCount).to.be(tableData[index].documentCount); diff --git a/x-pack/test/functional/apps/monitoring/elasticsearch/nodes.js b/x-pack/test/functional/apps/monitoring/elasticsearch/nodes.js index 29573c5baa195..3dc997f1a81ea 100644 --- a/x-pack/test/functional/apps/monitoring/elasticsearch/nodes.js +++ b/x-pack/test/functional/apps/monitoring/elasticsearch/nodes.js @@ -77,7 +77,7 @@ export default function ({ getService, getPageObjects }) { }, { name: 'whatever-03', status: 'Status: Offline' }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].name).to.be(tableData[node].name); expect(nodesAll[node].status).to.be(tableData[node].status); expect(nodesAll[node].cpu).to.be(tableData[node].cpu); @@ -94,7 +94,7 @@ export default function ({ getService, getPageObjects }) { const nodesAll = await nodesList.getNodesAll(); const tableData = [{ cpu: '2% \n3% max\n0% min' }, { cpu: '0% \n3% max\n0% min' }, { cpu: undefined }]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].cpu).to.be(tableData[node].cpu); }); }); @@ -109,7 +109,7 @@ export default function ({ getService, getPageObjects }) { { load: '3.28 \n3.73 max\n2.29 min' }, { load: undefined }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].load).to.be(tableData[node].load); }); }); @@ -125,7 +125,7 @@ export default function ({ getService, getPageObjects }) { { name: 'whatever-02' }, { name: 'whatever-03' }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].name).to.be(tableData[node].name); }); }); @@ -140,7 +140,7 @@ export default function ({ getService, getPageObjects }) { { status: 'Status: Online' }, { status: 'Status: Offline' }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].status).to.be(tableData[node].status); }); }); @@ -155,7 +155,7 @@ export default function ({ getService, getPageObjects }) { { memory: '25% \n49% max\n25% min' }, { memory: undefined }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].memory).to.be(tableData[node].memory); }); }); @@ -170,7 +170,7 @@ export default function ({ getService, getPageObjects }) { { disk: '173.9 GB \n173.9 GB max\n173.9 GB min' }, { disk: undefined }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].disk).to.be(tableData[node].disk); }); }); @@ -185,7 +185,7 @@ export default function ({ getService, getPageObjects }) { { shards: '38' }, { shards: undefined }, ]; - nodesAll.forEach((obj, node) => { // eslint-disable-line no-unused-vars + nodesAll.forEach((obj, node) => { expect(nodesAll[node].shards).to.be(tableData[node].shards); }); }); diff --git a/x-pack/test/functional/apps/monitoring/logstash/pipelines.js b/x-pack/test/functional/apps/monitoring/logstash/pipelines.js index cf6593aaf301b..4d2a7dbc68887 100644 --- a/x-pack/test/functional/apps/monitoring/logstash/pipelines.js +++ b/x-pack/test/functional/apps/monitoring/logstash/pipelines.js @@ -53,7 +53,7 @@ export default function ({ getService, getPageObjects }) { ]; // check the all data in the table - pipelinesAll.forEach((obj, index) => { // eslint-disable-line no-unused-vars + pipelinesAll.forEach((obj, index) => { expect(pipelinesAll[index].id).to.be(tableData[index].id); expect(pipelinesAll[index].eventsEmittedRate).to.be(tableData[index].eventsEmittedRate); expect(pipelinesAll[index].nodeCount).to.be(tableData[index].nodeCount); @@ -76,7 +76,7 @@ export default function ({ getService, getPageObjects }) { ]; // check the all data in the table - pipelinesAll.forEach((obj, index) => { // eslint-disable-line no-unused-vars + pipelinesAll.forEach((obj, index) => { expect(pipelinesAll[index].id).to.be(tableData[index].id); expect(pipelinesAll[index].eventsEmittedRate).to.be(tableData[index].eventsEmittedRate); expect(pipelinesAll[index].nodeCount).to.be(tableData[index].nodeCount);