Fix linting issues (#54068)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
c02531a494
commit
28b6efa260
21
.eslintrc.js
21
.eslintrc.js
|
@ -177,12 +177,6 @@ module.exports = {
|
|||
'react-hooks/exhaustive-deps': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['x-pack/legacy/plugins/monitoring/**/*.{js,ts,tsx}'],
|
||||
rules: {
|
||||
'jsx-a11y/click-events-have-key-events': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,ts,tsx}'],
|
||||
rules: {
|
||||
|
@ -814,21 +808,6 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Monitoring overrides
|
||||
*/
|
||||
{
|
||||
files: ['x-pack/legacy/plugins/monitoring/**/*.js'],
|
||||
rules: {
|
||||
'no-unused-vars': ['error', { args: 'all', argsIgnorePattern: '^_' }],
|
||||
'no-else-return': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['x-pack/legacy/plugins/monitoring/public/**/*.js'],
|
||||
env: { browser: true },
|
||||
},
|
||||
|
||||
/**
|
||||
* Canvas overrides
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ export const monitoring = kibana =>
|
|||
id: 'monitoring',
|
||||
configPrefix: 'xpack.monitoring',
|
||||
publicDir: resolve(__dirname, 'public'),
|
||||
init(server, _options) {
|
||||
init(server) {
|
||||
const configs = [
|
||||
'xpack.monitoring.ui.enabled',
|
||||
'xpack.monitoring.kibana.collection.enabled',
|
||||
|
|
|
@ -46,7 +46,7 @@ export class ChartTarget extends React.Component {
|
|||
return seriesToShow.some(id => id.toLowerCase() === metric.id.toLowerCase());
|
||||
};
|
||||
}
|
||||
return _metric => true;
|
||||
return () => true;
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(newProps) {
|
||||
|
|
|
@ -38,8 +38,8 @@ const props = {
|
|||
max: 1562962539851,
|
||||
},
|
||||
hasLegend: true,
|
||||
onBrush: _ => void 0,
|
||||
tickFormatter: _ => void 0,
|
||||
onBrush: () => void 0,
|
||||
tickFormatter: () => void 0,
|
||||
updateLegend: () => void 0,
|
||||
};
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ export class Assigned extends React.Component {
|
|||
|
||||
// TODO: redesign for shard allocation, possibly giving shard display the
|
||||
// ability to use the euiLink CSS class (blue link text instead of white link text)
|
||||
// Disabling eslint because EuiKeyboardAccessible does it for us
|
||||
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
||||
const name = (
|
||||
<EuiKeyboardAccessible>
|
||||
<a onClick={changeUrl}>
|
||||
|
@ -53,6 +55,7 @@ export class Assigned extends React.Component {
|
|||
</a>
|
||||
</EuiKeyboardAccessible>
|
||||
);
|
||||
/* eslint-enable jsx-a11y/click-events-have-key-events */
|
||||
const master =
|
||||
data.node_type === 'master' ? <EuiIcon type="starFilledSpace" color="primary" /> : null;
|
||||
const shards = sortBy(data.children, 'shard').map(this.createShard);
|
||||
|
|
|
@ -164,7 +164,7 @@ function renderPluginBasicStats(vertex, timeseriesTooltipXValueFormatter) {
|
|||
);
|
||||
}
|
||||
|
||||
function renderIfBasicStats(_vertex) {
|
||||
function renderIfBasicStats() {
|
||||
return (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
|
@ -175,7 +175,7 @@ function renderIfBasicStats(_vertex) {
|
|||
);
|
||||
}
|
||||
|
||||
function renderQueueBasicStats(_vertex) {
|
||||
function renderQueueBasicStats() {
|
||||
return (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
|
@ -253,7 +253,7 @@ function renderIfBasicInfo(vertex) {
|
|||
);
|
||||
}
|
||||
|
||||
function renderQueueBasicInfo(_vertex) {
|
||||
function renderQueueBasicInfo() {
|
||||
return (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
|
|
|
@ -72,7 +72,7 @@ export function executorProvider(Promise, $timeout) {
|
|||
).finally(reset);
|
||||
}
|
||||
|
||||
function reFetch(_changes) {
|
||||
function reFetch() {
|
||||
cancel();
|
||||
run();
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ uiRoutes.when('/elasticsearch/nodes', {
|
|||
}) || {};
|
||||
|
||||
const getPageData = ($injector, _api = undefined, routeOptions = {}) => {
|
||||
_api; // to fix eslint
|
||||
const $http = $injector.get('$http');
|
||||
const globalState = $injector.get('globalState');
|
||||
const timeBounds = timefilter.getBounds();
|
||||
|
|
|
@ -23,6 +23,7 @@ import { DetailStatus } from '../../../../components/logstash/detail_status';
|
|||
import { CODE_PATH_LOGSTASH } from '../../../../../common/constants';
|
||||
|
||||
const getPageData = ($injector, _api = undefined, routeOptions = {}) => {
|
||||
_api; // fixing eslint
|
||||
const $route = $injector.get('$route');
|
||||
const $http = $injector.get('$http');
|
||||
const globalState = $injector.get('globalState');
|
||||
|
|
|
@ -23,6 +23,7 @@ import { CODE_PATH_LOGSTASH } from '../../../../common/constants';
|
|||
*/
|
||||
|
||||
const getPageData = ($injector, _api = undefined, routeOptions = {}) => {
|
||||
_api; // to fix eslint
|
||||
const $http = $injector.get('$http');
|
||||
const globalState = $injector.get('globalState');
|
||||
const Private = $injector.get('Private');
|
||||
|
|
|
@ -48,7 +48,7 @@ export class CloudService {
|
|||
* @param {Object} _request 'request' HTTP handler.
|
||||
* @return {Promise} Never {@code null} {@code CloudServiceResponse}.
|
||||
*/
|
||||
_checkIfService(_request) {
|
||||
_checkIfService() {
|
||||
return Promise.reject(new Error('not implemented'));
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ export class LatencyMetric extends ElasticsearchMetric {
|
|||
},
|
||||
};
|
||||
|
||||
this.calculation = (bucket, _key, _metric, _bucketSizeInSeconds) => {
|
||||
this.calculation = bucket => {
|
||||
const timeInMillisDeriv = _.get(bucket, 'event_time_in_millis_deriv.normalized_value', null);
|
||||
const totalEventsDeriv = _.get(bucket, 'event_total_deriv.normalized_value', null);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ export class LogstashEventsLatencyClusterMetric extends LogstashClusterMetric {
|
|||
},
|
||||
};
|
||||
|
||||
this.calculation = (bucket, _key, _metric, _bucketSizeInSeconds) => {
|
||||
this.calculation = bucket => {
|
||||
const timeInMillisDeriv = _.get(bucket, 'events_time_in_millis_deriv.normalized_value', null);
|
||||
const totalEventsDeriv = _.get(bucket, 'events_total_deriv.normalized_value', null);
|
||||
|
||||
|
@ -189,7 +189,7 @@ export class LogstashEventsLatencyMetric extends LogstashMetric {
|
|||
},
|
||||
};
|
||||
|
||||
this.calculation = (bucket, _key, _metric, _bucketSizeInSeconds) => {
|
||||
this.calculation = bucket => {
|
||||
const timeInMillisDeriv = _.get(bucket, 'events_time_in_millis_deriv.normalized_value', null);
|
||||
const totalEventsDeriv = _.get(bucket, 'events_total_deriv.normalized_value', null);
|
||||
|
||||
|
|
Loading…
Reference in a new issue