Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions x-pack/plugins/ml/public/explorer/explorer_swimlane.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class JobsListUI extends Component {
}),
sortable: true,
field: 'description',
render: (description, item) => ( // eslint-disable-line no-unused-vars
render: (description, item) => (
<JobDescription job={item} />
),
textOnly: true,
Expand Down Expand Up @@ -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) => (
<span className="euiTableCellContent__text">
{
(item.latestTimestampMs === undefined) ? '' : moment(item.latestTimestampMs).format(TIME_FORMAT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
});
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/ml/public/util/ml_calc_auto_interval.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/ml/server/client/elasticsearch_ml.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
14 changes: 7 additions & 7 deletions x-pack/plugins/reporting/server/lib/esqueue/__tests__/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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);
Expand Down Expand Up @@ -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'));
});
};
Expand All @@ -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);
});
};
Expand All @@ -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();
});
};
Expand Down Expand Up @@ -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(() => {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/rollup/public/visualize/editor_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security/server/routes/views/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
Loading