Skip to content

Commit

Permalink
move eslint rule override comments for code that moved around
Browse files Browse the repository at this point in the history
(cherry picked from commit 14bf108)

# Conflicts:
#	x-pack/legacy/plugins/rollup/public/crud_app/app.js
  • Loading branch information
spalger authored and spalger committed Dec 14, 2019
1 parent 956aeb1 commit 724b7e8
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/server/http/integration_tests/xsrf.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/server/logging/log_with_metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/rollup/public/crud_app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/server/lib/esjs_shield_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 724b7e8

Please sign in to comment.