Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)

* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
This commit is contained in:
Mikhail Shustov 2020-08-05 18:32:19 +03:00 committed by GitHub
parent 3fb77fb546
commit 88c0631344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
583 changed files with 669 additions and 779 deletions

View file

@ -8,7 +8,7 @@
<b>Signature:</b>
```typescript
export interface ISyncStateRef<stateStorage extends IStateStorage = IStateStorage>
export interface ISyncStateRef<StateStorage extends IStateStorage = IStateStorage>
```
## Properties

View file

@ -30,6 +30,7 @@ import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants';
export const CreateAlert = ({
http,
// eslint-disable-next-line @typescript-eslint/naming-convention
triggers_actions_ui,
charts,
uiSettings,

View file

@ -46,6 +46,7 @@ export interface AlertingExamplePublicStartDeps {
export class AlertingExamplePlugin implements Plugin<Setup, Start, AlertingExamplePublicSetupDeps> {
public setup(
core: CoreSetup<AlertingExamplePublicStartDeps, Start>,
// eslint-disable-next-line @typescript-eslint/naming-convention
{ alerts, triggers_actions_ui, developerExamples }: AlertingExamplePublicSetupDeps
) {
core.application.register({

1
kibana.d.ts vendored
View file

@ -35,7 +35,6 @@ import * as LegacyKibanaServer from './src/legacy/server/kbn_server';
/**
* Re-export legacy types under a namespace.
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace Legacy {
export type KibanaConfig = LegacyKibanaServer.KibanaConfig;
export type Request = LegacyKibanaServer.Request;

View file

@ -400,8 +400,8 @@
"@types/vinyl": "^2.0.4",
"@types/vinyl-fs": "^2.4.11",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@typescript-eslint/eslint-plugin": "^3.7.1",
"@typescript-eslint/parser": "^3.7.1",
"angular-mocks": "^1.7.9",
"archiver": "^3.1.1",
"axe-core": "^3.4.1",
@ -425,6 +425,7 @@
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-cypress": "^2.8.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-jsx-a11y": "^6.2.3",

View file

@ -11,17 +11,18 @@
"author": "Spencer Alger <email@spalger.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/elastic/eslint-config-kibana/issues"
"url": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana"
},
"homepage": "https://github.com/elastic/eslint-config-kibana#readme",
"homepage": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@typescript-eslint/eslint-plugin": "^3.7.1",
"@typescript-eslint/parser": "^3.7.1",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-mocha": "^6.2.2",

View file

@ -8,6 +8,11 @@ const PKG = require('../../package.json');
const eslintConfigPrettierTypescriptEslintRules = require('eslint-config-prettier/@typescript-eslint').rules;
// The current implementation excluded all the variables matching the regexp.
// We should remove it as soon as multiple underscores are supported by the linter.
// https://github.com/typescript-eslint/typescript-eslint/issues/1712
// Due to the same reason we have to duplicate the "filter" option for "default" and other "selectors".
const allowedNameRegexp = '^(UNSAFE_|_{1,3})|_{1,3}$';
module.exports = {
overrides: [
{
@ -19,6 +24,7 @@ module.exports = {
'ban',
'import',
'prefer-object-spread',
'eslint-comments'
],
settings: {
@ -87,16 +93,82 @@ module.exports = {
'React.StatelessComponent': {
message: 'Use FunctionComponent instead.',
fixWith: 'React.FunctionComponent'
}
},
// used in the codebase in the wild
'{}': false,
'object': false,
'Function': false,
}
}],
'camelcase': 'off',
'@typescript-eslint/camelcase': ['error', {
'properties': 'never',
'ignoreDestructuring': true,
'allow': ['^[A-Z0-9_]+$', '^UNSAFE_']
}],
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'variable',
format: [
'camelCase',
'UPPER_CASE', // const SOMETHING = ...
'PascalCase', // React.FunctionComponent =
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'parameter',
format: [
'camelCase',
'PascalCase',
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'memberLike',
format: [
'camelCase',
'PascalCase',
'snake_case', // keys in elasticsearch requests / responses
'UPPER_CASE'
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'function',
format: [
'camelCase',
'PascalCase' // React.FunctionComponent =
],
filter: {
regex: allowedNameRegexp,
match: false
}
},
{
selector: 'typeLike',
format: ['PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'enum',
format: ['PascalCase', 'UPPER_CASE', 'camelCase'],
},
],
'@typescript-eslint/explicit-member-accessibility': ['error',
{
accessibility: 'off',
@ -145,10 +217,12 @@ module.exports = {
'no-extend-native': 'error',
'no-eval': 'error',
'no-new-wrappers': 'error',
'no-script-url': 'error',
'no-shadow': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-unsafe-finally': 'error',
'no-unsanitized/property': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-var': 'error',
@ -171,6 +245,9 @@ module.exports = {
],
'import/no-default-export': 'error',
'eslint-comments/no-unused-disable': 'error',
'eslint-comments/no-unused-enable': 'error'
},
eslintConfigPrettierTypescriptEslintRules
)

View file

@ -26,10 +26,10 @@ export function babelRegister() {
try {
// add support for moved @babel/register source: https://github.com/elastic/kibana/pull/13973
require(resolve(plugin.kibanaRoot, 'src/setup_node_env/babel_register')); // eslint-disable-line import/no-dynamic-require
require(resolve(plugin.kibanaRoot, 'src/setup_node_env/babel_register'));
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND') {
require(resolve(plugin.kibanaRoot, 'src/optimize/babel/register')); // eslint-disable-line import/no-dynamic-require
require(resolve(plugin.kibanaRoot, 'src/optimize/babel/register'));
} else {
throw error;
}

View file

@ -354,6 +354,6 @@ export class ClusterManager {
onWatcherError = (err: any) => {
this.log.bad('failed to watch files!\n', err.stack);
process.exit(1); // eslint-disable-line no-process-exit
process.exit(1);
};
}

View file

@ -17,8 +17,6 @@
* under the License.
*/
/* eslint-disable max-classes-per-file */
import { BehaviorSubject, Observable } from 'rxjs';
import { first, take } from 'rxjs/operators';

View file

@ -17,10 +17,10 @@
* under the License.
*/
import { resolve } from 'path';
import supertest from 'supertest';
import { BehaviorSubject } from 'rxjs';
import { ByteSizeValue } from '@kbn/config-schema';
import pkg from '../../../../../package.json';
import { createHttpServer } from '../test_utils';
import { HttpService } from '../http_service';
@ -30,8 +30,7 @@ import { IRouter, RouteRegistrar } from '../router';
import { configServiceMock } from '../../config/config_service.mock';
import { contextServiceMock } from '../../context/context_service.mock';
const pkgPath = resolve(__dirname, '../../../../../package.json');
const actualVersion = require(pkgPath).version;
const actualVersion = pkg.version;
const versionHeader = 'kbn-version';
const xsrfHeader = 'kbn-xsrf';
const nameHeader = 'kbn-name';

View file

@ -375,6 +375,7 @@ export class LegacyService implements CoreService {
// from being started multiple times in different processes.
// We only want one REPL.
if (this.coreContext.env.cliArgs.repl && process.env.kbnWorkerType === 'server') {
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('../../../cli/repl').startRepl(kbnServer);
}

View file

@ -25,7 +25,6 @@
import { IndexMapping } from '../../mappings';
/* eslint-disable @typescript-eslint/unified-signatures */
export interface CallCluster {
(path: 'bulk', opts: { body: object[] }): Promise<BulkResult>;
(path: 'count', opts: CountOpts): Promise<{ count: number; _shards: ShardsInfo }>;
@ -49,7 +48,6 @@ export interface CallCluster {
error?: ErrorResponse;
}>;
}
/* eslint-enable @typescript-eslint/unified-signatures */
///////////////////////////////////////////////////////////////////
// callCluster argument type definitions

View file

@ -23,12 +23,12 @@ import { registerBulkCreateRoute } from '../bulk_create';
import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('POST /api/saved_objects/_bulk_create', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
beforeEach(async () => {

View file

@ -23,12 +23,12 @@ import { registerBulkGetRoute } from '../bulk_get';
import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('POST /api/saved_objects/_bulk_get', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
beforeEach(async () => {

View file

@ -23,12 +23,12 @@ import { registerBulkUpdateRoute } from '../bulk_update';
import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('PUT /api/saved_objects/_bulk_update', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
beforeEach(async () => {

View file

@ -23,12 +23,12 @@ import { registerCreateRoute } from '../create';
import { savedObjectsClientMock } from '../../service/saved_objects_client.mock';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('POST /api/saved_objects/{type}', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
const clientResponse = {

View file

@ -23,12 +23,12 @@ import { registerDeleteRoute } from '../delete';
import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('DELETE /api/saved_objects/{type}/{id}', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
beforeEach(async () => {

View file

@ -29,7 +29,7 @@ import { SavedObjectConfig } from '../../saved_objects_config';
import { registerExportRoute } from '../export';
import { setupServer, createExportableType } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
const exportSavedObjectsToStream = exportMock.exportSavedObjectsToStream as jest.Mock;
const allowedTypes = ['index-pattern', 'search'];
const config = {
@ -38,9 +38,9 @@ const config = {
} as SavedObjectConfig;
describe('POST /api/saved_objects/_export', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
beforeEach(async () => {
({ server, httpSetup, handlerContext } = await setupServer());

View file

@ -25,12 +25,12 @@ import { registerFindRoute } from '../find';
import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('GET /api/saved_objects/_find', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
const clientResponse = {

View file

@ -24,7 +24,7 @@ import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { SavedObjectConfig } from '../../saved_objects_config';
import { setupServer, createExportableType } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
const allowedTypes = ['index-pattern', 'visualization', 'dashboard'];
const config = {
@ -33,9 +33,9 @@ const config = {
} as SavedObjectConfig;
describe('POST /internal/saved_objects/_import', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
const emptyResponse = {

View file

@ -23,11 +23,11 @@ import { registerLogLegacyImportRoute } from '../log_legacy_import';
import { loggingSystemMock } from '../../../logging/logging_system.mock';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('POST /api/saved_objects/_log_legacy_import', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let logger: ReturnType<typeof loggingSystemMock.createLogger>;
beforeEach(async () => {

View file

@ -24,7 +24,7 @@ import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer, createExportableType } from '../test_utils';
import { SavedObjectConfig } from '../../saved_objects_config';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
const allowedTypes = ['index-pattern', 'visualization', 'dashboard'];
const config = {
@ -33,9 +33,9 @@ const config = {
} as SavedObjectConfig;
describe('POST /api/saved_objects/_resolve_import_errors', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
beforeEach(async () => {

View file

@ -23,12 +23,12 @@ import { registerUpdateRoute } from '../update';
import { savedObjectsClientMock } from '../../../../../core/server/mocks';
import { setupServer } from '../test_utils';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
type SetupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;
describe('PUT /api/saved_objects/{type}/{id?}', () => {
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let handlerContext: setupServerReturn['handlerContext'];
let server: SetupServerReturn['server'];
let httpSetup: SetupServerReturn['httpSetup'];
let handlerContext: SetupServerReturn['handlerContext'];
let savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>;
beforeEach(async () => {

View file

@ -17,8 +17,6 @@
* under the License.
*/
/* eslint-disable @typescript-eslint/camelcase */
import uuid from 'uuid';
import { decodeVersion, encodeVersion } from '../version';
import { ISavedObjectTypeRegistry } from '../saved_objects_type_registry';
@ -97,6 +95,7 @@ export class SavedObjectsSerializer {
namespaces,
attributes,
migrationVersion,
// eslint-disable-next-line @typescript-eslint/naming-convention
updated_at,
version,
references,

View file

@ -1242,6 +1242,7 @@ export class SavedObjectsRepository {
response
)[0] as any;
// eslint-disable-next-line @typescript-eslint/naming-convention
const { [type]: attributes, references, updated_at } = documentToSave;
if (error) {
return {

View file

@ -17,8 +17,6 @@
* under the License.
*/
/* eslint-disable max-classes-per-file */
import { Observable, combineLatest } from 'rxjs';
import { map, distinctUntilChanged, shareReplay, take } from 'rxjs/operators';
import { isDeepStrictEqual } from 'util';

View file

@ -22,6 +22,5 @@ import { dirname } from 'path';
export const pkg = {
__filename: require.resolve('../../../../package.json'),
__dirname: dirname(require.resolve('../../../../package.json')),
// eslint-disable no-var-requires
...require('../../../../package.json'),
};

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint-disable */
import {
Client as ESClient,
GenericParams,
@ -145,7 +144,6 @@ import {
TasksGetParams,
TasksListParams,
} from 'elasticsearch';
/* eslint-enable */
export class Cluster {
public callWithRequest: CallClusterWithRequest;

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint-disable @kbn/eslint/no-restricted-paths */
import { coreMock } from '../../../../../core/public/mocks';
import { dataPluginMock } from '../../../../../plugins/data/public/mocks';
import { embeddablePluginMock } from '../../../../../plugins/embeddable/public/mocks';
@ -33,7 +32,6 @@ import { advancedSettingsMock } from '../../../../../plugins/advanced_settings/p
import { savedObjectsManagementPluginMock } from '../../../../../plugins/saved_objects_management/public/mocks';
import { visualizationsPluginMock } from '../../../../../plugins/visualizations/public/mocks';
import { discoverPluginMock } from '../../../../../plugins/discover/public/mocks';
/* eslint-enable @kbn/eslint/no-restricted-paths */
export const pluginsMock = {
createSetup: () => ({

View file

@ -174,6 +174,7 @@ export const legacyAppRegister = (app: App<any>) => {
}
legacyAppRegistered = true;
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('ui/chrome').setRootController(app.id, ($scope: IScope, $element: JQLite) => {
const element = document.createElement('div');
$element[0].appendChild(element);

View file

@ -18,9 +18,7 @@
*/
import { __reset__, __setup__, __start__, PluginsSetup, PluginsStart } from './new_platform';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import * as dataServices from '../../../../plugins/data/public/services';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import * as visualizationsServices from '../../../../plugins/visualizations/public/services';
import { LegacyCoreSetup, LegacyCoreStart } from '../../../../core/public';
import { coreMock } from '../../../../core/public/mocks';

View file

@ -664,7 +664,9 @@ export class Field extends PureComponent<FieldProps> {
const isInvalid = unsavedChanges?.isInvalid;
const className = classNames('mgtAdvancedSettings__field', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'mgtAdvancedSettings__field--unsaved': unsavedChanges,
// eslint-disable-next-line @typescript-eslint/naming-convention
'mgtAdvancedSettings__field--invalid': isInvalid,
});
const id = setting.name;

View file

@ -336,6 +336,7 @@ export class Form extends PureComponent<FormProps> {
if (pageNav?.value === 'legacy') {
bottomBarClasses = classNames('mgtAdvancedSettingsForm__bottomBar', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'mgtAdvancedSettingsForm__bottomBar--pushForNav':
localStorage.getItem(NAV_IS_LOCKED_KEY) === 'true',
});

View file

@ -160,7 +160,6 @@ export function ConsoleHistory({ close }: Props) {
const isSelected = viewingReq === req;
return (
// Ignore a11y issues on li's
// eslint-disable-next-line
<li
key={idx}
id={`${CHILD_ELEMENT_PREFIX}${idx}`}

View file

@ -74,7 +74,6 @@ export function createReadOnlyAceEditor(element: HTMLElement): CustomAceEditor {
}
};
// eslint-disable-next-line
(function setupSession(session) {
session.setMode('ace/mode/text');
(session as any).setFoldStyle('markbeginend');

View file

@ -251,7 +251,7 @@ export class LegacyCoreEditor implements CoreEditor {
});
}
// eslint-disable-next-line @typescript-eslint/camelcase
// eslint-disable-next-line @typescript-eslint/naming-convention
private DO_NOT_USE_onPaste(text: string) {
if (text && curl.detectCURL(text)) {
const curlInput = curl.parseCURL(text);
@ -391,7 +391,9 @@ export class LegacyCoreEditor implements CoreEditor {
/[a-zA-Z_0-9\.\$\-\u00A2-\uFFFF]/, // adds support for dot character
],
getCompletions: (
// eslint-disable-next-line @typescript-eslint/naming-convention
DO_NOT_USE_1: IAceEditor,
// eslint-disable-next-line @typescript-eslint/naming-convention
DO_NOT_USE_2: IAceEditSession,
pos: { row: number; column: number },
prefix: string,

View file

@ -548,7 +548,6 @@ export default function ({ coreEditor: editor, parser }: { coreEditor: CoreEdito
if (editor.getLineValue(pos.lineNumber).trim() === '') {
// check if the previous line is a single line beginning of a new request
rowMode = parser.getRowParseMode(pos.lineNumber - 1);
// eslint-disable-next-line no-bitwise
if (
// eslint-disable-next-line no-bitwise
rowMode & parser.MODE.REQUEST_START &&

View file

@ -32,7 +32,7 @@ export function getContentType(body: any) {
}
export function send(method: string, path: string, data: any) {
const wrappedDfd = $.Deferred(); // eslint-disable-line new-cap
const wrappedDfd = $.Deferred();
const options: JQuery.AjaxSettings = {
url: '../api/console/proxy?' + stringify({ path, method }, { sort: false }),

View file

@ -18,7 +18,7 @@
*/
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
/* eslint-disable @typescript-eslint/naming-convention */
const significantTermsArgs = {
__template: {
field: '',

View file

@ -18,7 +18,6 @@
*/
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
export const aliases = (specService: SpecDefinitionsService) => {
const aliasRules = {
filter: {},

View file

@ -18,7 +18,6 @@
*/
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
export const document = (specService: SpecDefinitionsService) => {
specService.addEndpointDescription('update', {
data_autocomplete_rules: {

View file

@ -18,7 +18,6 @@
*/
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
const filters: Record<string, any> = {};
filters.and = {

View file

@ -18,7 +18,6 @@
*/
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
const highlightOptions = {
boundary_chars: {},
boundary_max_scan: 20,

View file

@ -19,7 +19,6 @@
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
const commonPipelineParams = {
on_failure: [],
ignore_failure: {

View file

@ -23,7 +23,6 @@ import { SpecDefinitionsService } from '../../../services';
import { BOOLEAN } from './shared';
/* eslint-disable @typescript-eslint/camelcase */
export const mappings = (specService: SpecDefinitionsService) => {
specService.addEndpointDescription('put_mapping', {
priority: 10, // collides with put doc by id

View file

@ -36,7 +36,6 @@ import {
regexpTemplate,
} from './templates';
/* eslint-disable @typescript-eslint/camelcase */
const matchOptions = {
cutoff_frequency: 0.001,
query: '',

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint-disable @typescript-eslint/camelcase */
export const regexpTemplate = {
FIELD: 'REGEXP',
};

View file

@ -19,7 +19,6 @@
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
export const reindex = (specService: SpecDefinitionsService) => {
specService.addEndpointDescription('reindex', {
methods: ['POST'],

View file

@ -18,7 +18,6 @@
*/
import { SpecDefinitionsService } from '../../../services';
/* eslint-disable @typescript-eslint/camelcase */
export const search = (specService: SpecDefinitionsService) => {
specService.addEndpointDescription('search', {
priority: 10, // collides with get doc by id

View file

@ -19,7 +19,6 @@
import { SpecDefinitionsService } from '../../../services';
import { BOOLEAN } from './shared';
/* eslint-disable @typescript-eslint/camelcase */
export const settings = (specService: SpecDefinitionsService) => {
specService.addEndpointDescription('put_settings', {
data_autocomplete_rules: {

View file

@ -17,7 +17,6 @@
* under the License.
*/
/* eslint-disable @typescript-eslint/camelcase */
export const BOOLEAN = Object.freeze({
__one_of: [true, false],
});

View file

@ -29,8 +29,6 @@ import {
import { coreMock } from '../../../../../core/public/mocks';
import { CoreStart } from 'kibana/public';
import { ClonePanelAction } from '.';
// eslint-disable-next-line
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
const { setup, doStart } = embeddablePluginMock.createInstance();

View file

@ -28,8 +28,6 @@ import {
ContactCardEmbeddableInput,
ContactCardEmbeddableOutput,
} from '../../embeddable_plugin_test_samples';
// eslint-disable-next-line
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
const { setup, doStart } = embeddablePluginMock.createInstance();

View file

@ -29,8 +29,6 @@ import {
} from '../../embeddable_plugin_test_samples';
import { coreMock } from '../../../../../core/public/mocks';
import { CoreStart } from 'kibana/public';
// eslint-disable-next-line
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
const { setup, doStart } = embeddablePluginMock.createInstance();

View file

@ -110,7 +110,7 @@ const thirdPartyAngularDependencies = ['ngSanitize', 'ngRoute', 'react'];
function mountDashboardApp(appBasePath: string, element: HTMLElement) {
const mountpoint = document.createElement('div');
mountpoint.setAttribute('class', 'dshAppContainer');
// eslint-disable-next-line
// eslint-disable-next-line no-unsanitized/property
mountpoint.innerHTML = mainTemplate(appBasePath);
// bootstrap angular into detached element and attach it later to
// make angular-within-angular possible

View file

@ -17,8 +17,6 @@
* under the License.
*/
// @ts-ignore
import { findTestSubject } from '@elastic/eui/lib/test';
import { nextTick } from 'test_utils/enzyme_helpers';
import { isErrorEmbeddable, ViewMode } from '../../embeddable_plugin';
import { DashboardContainer, DashboardContainerOptions } from './dashboard_container';
@ -30,7 +28,6 @@ import {
ContactCardEmbeddable,
ContactCardEmbeddableOutput,
} from '../../embeddable_plugin_test_samples';
// eslint-disable-next-line
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
const options: DashboardContainerOptions = {

View file

@ -31,7 +31,6 @@ import {
ContactCardEmbeddableFactory,
} from '../../../embeddable_plugin_test_samples';
import { KibanaContextProvider } from '../../../../../kibana_react/public';
// eslint-disable-next-line
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
let dashboardContainer: DashboardContainer | undefined;

View file

@ -256,7 +256,9 @@ class DashboardGridUi extends React.Component<DashboardGridProps, State> {
expandedPanelId !== undefined && expandedPanelId === panel.explicitInput.id;
const hidePanel = expandedPanelId !== undefined && expandedPanelId !== panel.explicitInput.id;
const classes = classNames({
// eslint-disable-next-line @typescript-eslint/naming-convention
'dshDashboardGrid__item--expanded': expandPanel,
// eslint-disable-next-line @typescript-eslint/naming-convention
'dshDashboardGrid__item--hidden': hidePanel,
});
return (

View file

@ -32,7 +32,6 @@ import {
ContactCardEmbeddableFactory,
} from '../../../embeddable_plugin_test_samples';
import { KibanaContextProvider } from '../../../../../kibana_react/public';
// eslint-disable-next-line
import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
import { applicationServiceMock } from '../../../../../../core/public/mocks';

View file

@ -17,5 +17,4 @@
* under the License.
*/
// eslint-disable-next-line
export * from '../../../plugins/embeddable/public/lib/test_samples';

View file

@ -19,7 +19,6 @@
import { createDashboardUrlGenerator } from './url_generator';
import { hashedItemStore } from '../../kibana_utils/public';
// eslint-disable-next-line
import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock';
import { esFilters, Filter } from '../../data/public';
import { SavedObjectLoader } from '../../saved_objects/public';

View file

@ -17,7 +17,6 @@
* under the License.
*/
// eslint-disable-next-line max-classes-per-file
import { IndexPatternsService } from './index_patterns';
import { fieldFormatsMock } from '../../field_formats/mocks';
import {

View file

@ -23,7 +23,7 @@ import { leastCommonInterval } from './least_common_interval';
// When base interval is set, check for least common interval and allow
// input the value is the same. This means that the input interval is a
// multiple of the base interval.
function _parseWithBase(value: string, baseInterval: string) {
function parseWithBase(value: string, baseInterval: string) {
try {
const interval = leastCommonInterval(baseInterval, value);
return interval === value.replace(/\s/g, '');
@ -34,7 +34,7 @@ function _parseWithBase(value: string, baseInterval: string) {
export function isValidInterval(value: string, baseInterval?: string) {
if (baseInterval) {
return _parseWithBase(value, baseInterval);
return parseWithBase(value, baseInterval);
} else {
return isValidEsInterval(value);
}

View file

@ -17,7 +17,6 @@
* under the License.
*/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { coreMock } from '../../../../../../src/core/public/mocks';
import {
AggConfigs,

View file

@ -61,6 +61,7 @@ function normalize(
}
// Don't include unmapped_type for _score field
// eslint-disable-next-line @typescript-eslint/naming-convention
const { unmapped_type, ...otherSortOptions } = defaultSortOptions;
return {
[sortField]: { ...order, ...(sortField === '_score' ? otherSortOptions : defaultSortOptions) },

View file

@ -189,12 +189,12 @@ export class IndexPatternSelect extends Component<IndexPatternSelectProps> {
render() {
const {
fieldTypes, // eslint-disable-line no-unused-vars
onChange, // eslint-disable-line no-unused-vars
indexPatternId, // eslint-disable-line no-unused-vars
fieldTypes,
onChange,
indexPatternId,
placeholder,
onNoIndexPatterns, // eslint-disable-line no-unused-vars
savedObjectsClient, // eslint-disable-line no-unused-vars
onNoIndexPatterns,
savedObjectsClient,
...rest
} = this.props;

View file

@ -275,6 +275,7 @@ export function QueryBarTopRow(props: Props) {
});
const wrapperClasses = classNames('kbnQueryBar__datePickerWrapper', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'kbnQueryBar__datePickerWrapper-isHidden': isQueryInputFocused,
});

View file

@ -224,9 +224,7 @@ class SearchBarUI extends Component<SearchBarProps, State> {
};
// member-ordering rules conflict with use-before-declaration rules
/* eslint-disable */
public ro = new ResizeObserver(this.setFilterBarHeight);
/* eslint-enable */
public onSave = async (savedQueryMeta: SavedQueryMeta, saveAsNew = false) => {
if (!this.state.query) return;
@ -411,6 +409,7 @@ class SearchBarUI extends Component<SearchBarProps, State> {
let filterBar;
if (this.shouldRenderFilterBar()) {
const filterGroupClasses = classNames('globalFilterGroup__wrapper', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'globalFilterGroup__wrapper-isVisible': this.state.isFiltersVisible,
});
filterBar = (

View file

@ -53,6 +53,7 @@ export function SuggestionComponent(props: Props) {
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus
<div
className={classNames({
// eslint-disable-next-line @typescript-eslint/naming-convention
kbnTypeahead__item: true,
active: props.selected,
})}

View file

@ -84,6 +84,7 @@ export function registerValueSuggestionsRoute(
}
async function getBody(
// eslint-disable-next-line @typescript-eslint/naming-convention
{ timeout, terminate_after }: Record<string, any>,
field: IFieldType | string,
query: string,

View file

@ -60,6 +60,7 @@ export function DocViewTableRow({
valueRaw,
}: Props) {
const valueClassName = classNames({
// eslint-disable-next-line @typescript-eslint/naming-convention
kbnDocViewer__value: true,
'truncate-by-height': isCollapsible && isCollapsed,
});

View file

@ -19,7 +19,6 @@
import { DiscoverUrlGenerator } from './url_generator';
import { hashedItemStore, getStatesFromKbnUrl } from '../../kibana_utils/public';
// eslint-disable-next-line
import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock';
import { FilterStateStore } from '../../data/common';

View file

@ -28,7 +28,6 @@ import {
ContactCardEmbeddableOutput,
ContactCardEmbeddable,
} from '../test_samples/embeddables/contact_card/contact_card_embeddable';
// eslint-disable-next-line
import { inspectorPluginMock } from '../../../../inspector/public/mocks';
import { mount } from 'enzyme';
import { embeddablePluginMock, createEmbeddablePanelMock } from '../../mocks';

View file

@ -40,7 +40,6 @@ import {
ContactCardEmbeddableInput,
ContactCardEmbeddableOutput,
} from '../test_samples/embeddables/contact_card/contact_card_embeddable';
// eslint-disable-next-line
import { inspectorPluginMock } from '../../../../inspector/public/mocks';
import { EuiBadge } from '@elastic/eui';
import { embeddablePluginMock } from '../../mocks';

View file

@ -26,7 +26,6 @@ import {
} from '../../../../test_samples/embeddables/filterable_embeddable';
import { FilterableEmbeddableFactory } from '../../../../test_samples/embeddables/filterable_embeddable_factory';
import { FilterableContainer } from '../../../../test_samples/embeddables/filterable_container';
// eslint-disable-next-line
import { coreMock } from '../../../../../../../../core/public/mocks';
import { ContactCardEmbeddable } from '../../../../test_samples';
import { esFilters, Filter } from '../../../../../../../../plugins/data/public';

View file

@ -26,7 +26,6 @@ import {
FilterableEmbeddable,
ContactCardEmbeddable,
} from '../../../test_samples';
// eslint-disable-next-line
import { inspectorPluginMock } from '../../../../../../../plugins/inspector/public/mocks';
import { EmbeddableOutput, isErrorEmbeddable, ErrorEmbeddable } from '../../../embeddables';
import { of } from '../../../../tests/helpers';

View file

@ -132,6 +132,7 @@ export function PanelHeader({
const showTitle = !isViewMode || (title && !hidePanelTitles) || viewDescription !== '';
const showPanelBar = badges.length > 0 || showTitle;
const classes = classNames('embPanel__header', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'embPanel__header--floater': !showPanelBar,
});

View file

@ -33,9 +33,7 @@ import { CoreStart } from '../../../core/public';
import { Start as InspectorStart } from '../../inspector/public';
import { dataPluginMock } from '../../data/public/mocks';
// eslint-disable-next-line
import { inspectorPluginMock } from '../../inspector/public/mocks';
// eslint-disable-next-line
import { uiActionsPluginMock } from '../../ui_actions/public/mocks';
export type Setup = jest.Mocked<EmbeddableSetup>;

View file

@ -30,7 +30,6 @@ import {
FilterableContainerFactory,
FilterableEmbeddableInput,
} from '../lib/test_samples';
// eslint-disable-next-line
import { esFilters } from '../../../data/public';
test('ApplyFilterAction applies the filter to the root of the container tree', async () => {

View file

@ -43,7 +43,6 @@ import {
FilterableContainer,
FilterableContainerInput,
} from '../lib/test_samples/embeddables/filterable_container';
// eslint-disable-next-line
import { coreMock } from '../../../../core/public/mocks';
import { testPlugin } from './test_plugin';
import { of } from './helpers';

View file

@ -31,7 +31,6 @@ import {
ContactCardEmbeddableFactory,
} from '../lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory';
import { HelloWorldContainer } from '../lib/test_samples/embeddables/hello_world_container';
// eslint-disable-next-line
import { coreMock } from '../../../../core/public/mocks';
import { testPlugin } from './test_plugin';
import { CustomizePanelModal } from '../lib/panel/panel_header/panel_actions/customize_title/customize_panel_modal';

View file

@ -33,7 +33,6 @@ import {
import { FilterableContainer } from '../lib/test_samples/embeddables/filterable_container';
import { isErrorEmbeddable } from '../lib';
import { HelloWorldContainer } from '../lib/test_samples/embeddables/hello_world_container';
// eslint-disable-next-line
import { coreMock } from '../../../../core/public/mocks';
import { esFilters, Filter } from '../../../../plugins/data/public';
import { createEmbeddablePanelMock } from '../mocks';

View file

@ -19,9 +19,7 @@
import { CoreSetup, CoreStart } from 'src/core/public';
import { UiActionsStart } from '../../../ui_actions/public';
// eslint-disable-next-line
import { uiActionsPluginMock } from '../../../ui_actions/public/mocks';
// eslint-disable-next-line
import { inspectorPluginMock } from '../../../inspector/public/mocks';
import { dataPluginMock } from '../../../data/public/mocks';
import { coreMock } from '../../../../core/public/mocks';

View file

@ -27,7 +27,6 @@ const OverlayText = () => (
// The point of this element is for accessibility purposes, so ignore eslint error
// in this case
//
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
<>
<EuiText size="s">Press Enter to start editing.</EuiText>
<EuiText size="s">When you&rsquo;re done, press Escape to stop editing.</EuiText>

View file

@ -41,6 +41,7 @@ export const useField = <T>(
serializer,
deserializer,
} = config;
const { getFormData, __removeField, __updateFormDataAt, __validateFields } = form;
const initialValue = useMemo(() => {

View file

@ -58,7 +58,6 @@ const executionDefaultState: ExecutionState = {
},
};
// eslint-disable-next-line
export interface ExecutionPureTransitions<Output = ExpressionValue> {
start: (state: ExecutionState<Output>) => () => ExecutionState<Output>;
setResult: (state: ExecutionState<Output>) => (result: Output) => ExecutionState<Output>;

View file

@ -20,10 +20,8 @@
import React from 'react';
import { ExpressionsSetup, ExpressionsStart, plugin as pluginInitializer } from '.';
/* eslint-disable */
import { coreMock } from '../../../core/public/mocks';
import { bfetchPluginMock } from '../../bfetch/public/mocks';
/* eslint-enable */
export type Setup = jest.Mocked<ExpressionsSetup>;
export type Start = jest.Mocked<ExpressionsStart>;

View file

@ -20,10 +20,7 @@
import { ExpressionsServerSetup, ExpressionsServerStart } from '.';
import { plugin as pluginInitializer } from '.';
import { coreMock } from '../../../core/server/mocks';
/* eslint-disable */
import { bfetchPluginMock } from '../../bfetch/server/mocks';
/* eslint-enable */
export type Setup = jest.Mocked<ExpressionsServerSetup>;
export type Start = jest.Mocked<ExpressionsServerStart>;

View file

@ -18,7 +18,6 @@
*/
/* eslint max-len: 0 */
/* eslint-disable */
import { i18n } from '@kbn/i18n';
import { SavedObject } from 'kibana/server';

View file

@ -18,7 +18,6 @@
*/
/* eslint max-len: 0 */
/* eslint-disable */
import { i18n } from '@kbn/i18n';
import { SavedObject } from 'kibana/server';

View file

@ -106,6 +106,7 @@ export class StepIndexPattern extends Component<StepIndexPatternProps, StepIndex
indexPatternName: '',
isIncludingSystemIndices: false,
};
ILLEGAL_CHARACTERS = [...indexPatterns.ILLEGAL_CHARACTERS];
constructor(props: StepIndexPatternProps, context: IndexPatternManagmentContextValue) {

View file

@ -68,7 +68,7 @@ test('renders RangeControlEditor', async () => {
await updateComponent(component);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('handleOptionsChange - step', async () => {

View file

@ -28,7 +28,7 @@ test('renders enabled control', () => {
<div>My Control</div>
</FormRow>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('renders control with warning', () => {
@ -37,7 +37,7 @@ test('renders control with warning', () => {
<div>My Control</div>
</FormRow>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('renders disabled control with tooltip', () => {
@ -51,5 +51,5 @@ test('renders disabled control with tooltip', () => {
<div>My Control</div>
</FormRow>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});

View file

@ -93,7 +93,7 @@ test('Renders list control', () => {
refreshControl={refreshControlMock}
/>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('Renders range control', () => {
@ -114,7 +114,7 @@ test('Renders range control', () => {
refreshControl={refreshControlMock}
/>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('Apply and Cancel change btns enabled when there are changes', () => {
@ -135,7 +135,7 @@ test('Apply and Cancel change btns enabled when there are changes', () => {
refreshControl={refreshControlMock}
/>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('Clear btns enabled when there are values', () => {
@ -156,7 +156,7 @@ test('Clear btns enabled when there are values', () => {
refreshControl={refreshControlMock}
/>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('clearControls', () => {

View file

@ -49,7 +49,7 @@ test('renders ListControl', () => {
intl={{} as any}
/>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('disableMsg', () => {
@ -66,5 +66,5 @@ test('disableMsg', () => {
intl={{} as any}
/>
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});

View file

@ -46,7 +46,7 @@ test('renders RangeControl', () => {
const component = shallowWithIntl(
<RangeControl control={control} controlIndex={0} stageFilter={() => {}} />
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('disabled', () => {
@ -69,7 +69,7 @@ test('disabled', () => {
const component = shallowWithIntl(
<RangeControl control={disabledRangeControl} controlIndex={0} stageFilter={() => {}} />
);
expect(component).toMatchSnapshot(); // eslint-disable-line
expect(component).toMatchSnapshot();
});
test('ceilWithPrecision', () => {

View file

@ -17,8 +17,6 @@
* under the License.
*/
/* eslint-disable no-multi-str*/
import _ from 'lodash';
import { i18n } from '@kbn/i18n';

View file

@ -20,7 +20,6 @@
import { Setup as PluginSetup, Start as PluginStart } from '.';
import { InspectorViewRegistry } from './view_registry';
import { plugin as pluginInitializer } from '.';
// eslint-disable-next-line
import { coreMock } from '../../../core/public/mocks';
export type Setup = jest.Mocked<PluginSetup>;

View file

@ -36,6 +36,7 @@ export function injectHeaderStyle(uiSettings: IUiSettingsClient) {
document.getElementsByTagName('head')[0].appendChild(style);
uiSettings.get$('truncate:maxHeight').subscribe((value: number) => {
// eslint-disable-next-line no-unsanitized/property
style.innerHTML = buildCSS(value);
});
}

Some files were not shown because too many files have changed in this diff Show more