move eslint rule override comments for code that moved around

(cherry picked from commit 14bf10863a)

# Conflicts:
#	x-pack/legacy/plugins/rollup/public/crud_app/app.js
This commit is contained in:
spalger 2019-12-12 10:07:00 -07:00 committed by spalger
parent 956aeb1cee
commit 724b7e83a4
14 changed files with 37 additions and 21 deletions

View file

@ -31,10 +31,11 @@ export class GuidePage extends Component {
onClickLink(id) {
// Scroll to element.
// eslint-disable-next-line no-undef
$('html, body').animate(
{
// eslint-disable-line no-undef
scrollTop: $(`#${id}`).offset().top - 100, // eslint-disable-line no-undef
// eslint-disable-next-line no-undef
scrollTop: $(`#${id}`).offset().top - 100,
},
250
);

View file

@ -27,11 +27,12 @@ describe('Timelion expression suggestions directive', function() {
beforeEach(ngMock.module('kibana'));
beforeEach(inject(function($injector) {
// eslint-disable-line no-undef
$compile = $injector.get('$compile');
scope = $injector.get('$rootScope').$new();
}));
beforeEach(
ngMock.inject(function($injector) {
$compile = $injector.get('$compile');
scope = $injector.get('$rootScope').$new();
})
);
describe('attributes', function() {
describe('suggestions', function() {

View file

@ -108,8 +108,8 @@ describe('xsrf request filter', () => {
});
for (const method of destructiveMethods) {
// eslint-disable-next-line no-loop-func
describe(`destructiveMethod: ${method}`, function() {
// eslint-disable-line no-loop-func
it('accepts requests with the xsrf header', async function() {
await kbnTestServer.request[method.toLowerCase()](root, testPath)
.set(xsrfHeader, 'anything')

View file

@ -18,10 +18,10 @@
*/
import { isPlainObject } from 'lodash';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import {
metadataSymbol,
attachMetaData,
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
} from '../../../../src/core/server/legacy/logging/legacy_logging_server';
export const logWithMetadata = {

View file

@ -5,9 +5,19 @@
*/
export const deserializeAutoFollowPattern = (
{ name, pattern: { remote_cluster, leader_index_patterns, follow_index_pattern } } = {
{
name,
pattern: {
// eslint-disable-next-line camelcase
remote_cluster,
// eslint-disable-next-line camelcase
leader_index_patterns,
// eslint-disable-next-line camelcase
follow_index_pattern,
},
} = {
pattern: {},
} // eslint-disable-line camelcase
}
) => ({
name,
remoteCluster: remote_cluster,

View file

@ -117,8 +117,10 @@ export class FollowerIndexForm extends PureComponent {
...getEmptyFollowerIndex(),
...this.props.followerIndex,
};
// eslint-disable-next-line no-nested-ternary
const areAdvancedSettingsVisible = isNew
? false // eslint-disable-line no-nested-ternary
? false
: areAdvancedSettingsEdited(followerIndex)
? true
: false;

View file

@ -13,8 +13,8 @@ function extractCausedByChain(causedBy = {}, accumulator = []) {
accumulator.push(reason);
}
// eslint-disable-next-line camelcase
if (caused_by) {
// eslint-disable-line camelcase
return extractCausedByChain(caused_by, accumulator);
}

View file

@ -48,9 +48,8 @@ class IndexLabel extends React.Component {
}
}
// eslint-disable-next-line react/no-multi-comp
export class TableHead extends React.Component {
// eslint-disable-line react/no-multi-comp
constructor(props) {
super(props);
}

View file

@ -55,11 +55,14 @@ export function uncovertMetricNames(byDateBucketResponse) {
unconverted[metricName] = {
buckets: byDateBucketResponse.buckets.map(bucket => {
const {
// eslint-disable-next-line camelcase
key_as_string,
// eslint-disable-next-line camelcase
key,
// eslint-disable-next-line camelcase
doc_count,
...rest
} = bucket; /* eslint-disable-line camelcase */
} = bucket;
const metrics = Object.entries(rest).reduce((accum, [key, value]) => {
if (key.startsWith(`${CONVERTED_TOKEN}${metricName}`)) {
const name = key.split('__')[1];

View file

@ -39,8 +39,8 @@ class ShareRouter extends Component {
}
}
// eslint-disable-next-line react/no-multi-comp
export class App extends Component {
// eslint-disable-line react/no-multi-comp
componentDidMount() {
trackUiMetric(METRIC_TYPE.LOADED, UIM_APP_LOAD);
}

View file

@ -13,8 +13,8 @@ function extractCausedByChain(causedBy = {}, accumulator = []) {
accumulator.push(reason);
}
// eslint-disable-next-line camelcase
if (caused_by) {
// eslint-disable-line camelcase
return extractCausedByChain(caused_by, accumulator);
}

View file

@ -13,8 +13,8 @@ function extractCausedByChain(causedBy = {}, accumulator = []) {
accumulator.push(reason);
}
// eslint-disable-next-line camelcase
if (caused_by) {
// eslint-disable-line camelcase
return extractCausedByChain(caused_by, accumulator);
}

View file

@ -5,8 +5,8 @@
*/
(function(root, factory) {
// eslint-disable-next-line no-undef
if (typeof define === 'function' && define.amd) {
// eslint-disable-line no-undef
define([], factory); // eslint-disable-line no-undef
} else if (typeof exports === 'object') {
module.exports = factory();

View file

@ -56,8 +56,8 @@ export default function({ getService }) {
// eslint-disable-line no-loop-func
for (const metric of Object.values(metrics)) {
for (const field of metric.getFields()) {
// eslint-disable-next-line no-loop-func
it(`${field} should exist in the mappings`, () => {
// eslint-disable-line no-loop-func
const propertyGetter = field
.split('.')
.reduce((list, field) => {