diff --git a/.eslintrc.js b/.eslintrc.js index 8b3ccafe37f6f..372ddb8533359 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -585,109 +585,6 @@ module.exports = { }, }, - /** - * Restricted paths - */ - { - files: ['**/*.{js,mjs,ts,tsx}'], - rules: { - '@kbn/eslint/no-restricted-paths': [ - 'error', - { - basePath: __dirname, - zones: [ - { - target: ['(src|x-pack)/**/*', '!src/core/**/*'], - from: ['src/core/utils/**/*'], - errorMessage: `Plugins may only import from src/core/server and src/core/public.`, - }, - { - target: ['(src|x-pack)/plugins/*/server/**/*'], - from: ['(src|x-pack)/plugins/*/public/**/*'], - errorMessage: `Server code can not import from public, use a common directory.`, - }, - { - target: ['(src|x-pack)/plugins/*/common/**/*'], - from: ['(src|x-pack)/plugins/*/(server|public)/**/*'], - errorMessage: `Common code can not import from server or public, use a common directory.`, - }, - { - target: ['(src|x-pack)/plugins/**/(public|server)/**/*', 'examples/**/*'], - from: [ - 'src/core/public/**/*', - '!src/core/public/index.ts', // relative import - '!src/core/public/mocks{,.ts}', - '!src/core/server/types{,.ts}', - '!src/core/public/utils/**/*', - '!src/core/public/*.test.mocks{,.ts}', - - 'src/core/server/**/*', - '!src/core/server/index.ts', // relative import - '!src/core/server/mocks{,.ts}', - '!src/core/server/types{,.ts}', - '!src/core/server/test_utils{,.ts}', - // for absolute imports until fixed in - // https://github.com/elastic/kibana/issues/36096 - '!src/core/server/*.test.mocks{,.ts}', - - 'target/types/**', - ], - allowSameFolder: true, - errorMessage: - 'Plugins may only import from top-level public and server modules in core.', - }, - { - target: [ - '(src|x-pack)/plugins/**/(public|server)/**/*', - 'examples/**/*', - '!(src|x-pack)/**/*.test.*', - '!(x-pack/)?test/**/*', - ], - from: [ - '(src|x-pack)/plugins/**/(public|server)/**/*', - '!(src|x-pack)/plugins/**/(public|server)/mocks/index.{js,mjs,ts}', - '!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,mjs,ts,tsx}', - '!(src|x-pack)/plugins/**/__stories__/index.{js,mjs,ts,tsx}', - '!(src|x-pack)/plugins/**/__fixtures__/index.{js,mjs,ts,tsx}', - ], - allowSameFolder: true, - errorMessage: 'Plugins may only import from top-level public and server modules.', - }, - { - target: [ - '(src|x-pack)/plugins/**/*', - '!(src|x-pack)/plugins/**/server/**/*', - - 'examples/**/*', - '!examples/**/server/**/*', - ], - from: [ - 'src/core/server', - 'src/core/server/**/*', - '(src|x-pack)/plugins/*/server/**/*', - 'examples/**/server/**/*', - // TODO: Remove the 'joi' eslint rule once IE11 support is dropped - 'joi', - ], - errorMessage: - 'Server modules cannot be imported into client modules or shared modules.', - }, - { - target: ['src/core/**/*'], - from: ['plugins/**/*', 'src/plugins/**/*'], - errorMessage: 'The core cannot depend on any plugins.', - }, - { - target: ['(src|x-pack)/plugins/*/public/**/*'], - from: ['ui/**/*'], - errorMessage: 'Plugins cannot import legacy UI code.', - }, - ], - }, - ], - }, - }, - /** * Allow default exports */ diff --git a/examples/embeddable_examples/common/book_saved_object_attributes.ts b/examples/embeddable_examples/common/book_saved_object_attributes.ts index 077f54a0a0d08..0ab84e42e3d9f 100644 --- a/examples/embeddable_examples/common/book_saved_object_attributes.ts +++ b/examples/embeddable_examples/common/book_saved_object_attributes.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { SavedObjectAttributes } from '@kbn/core/types'; +import type { SavedObjectAttributes } from '@kbn/core/types'; export const BOOK_SAVED_OBJECT = 'book'; diff --git a/examples/embeddable_examples/common/todo_saved_object_attributes.ts b/examples/embeddable_examples/common/todo_saved_object_attributes.ts index 3a05e02e523f9..21994add4ed42 100644 --- a/examples/embeddable_examples/common/todo_saved_object_attributes.ts +++ b/examples/embeddable_examples/common/todo_saved_object_attributes.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { SavedObjectAttributes } from '@kbn/core/types'; +import type { SavedObjectAttributes } from '@kbn/core/types'; export interface TodoSavedObjectAttributes extends SavedObjectAttributes { task: string; diff --git a/examples/field_formats_example/public/app.tsx b/examples/field_formats_example/public/app.tsx index 5eea418687928..4b9cffeec1862 100644 --- a/examples/field_formats_example/public/app.tsx +++ b/examples/field_formats_example/public/app.tsx @@ -32,10 +32,8 @@ import example1SampleCode from '!!raw-loader!./examples/1_using_existing_format' import example2SampleCodePart1 from '!!raw-loader!../common/example_currency_format'; // @ts-ignore import example2SampleCodePart2 from '!!raw-loader!./examples/2_creating_custom_formatter'; -/* eslint-disable @kbn/eslint/no-restricted-paths */ // @ts-ignore import example2SampleCodePart3 from '!!raw-loader!../server/examples/2_creating_custom_formatter'; -/* eslint-enable @kbn/eslint/no-restricted-paths */ // @ts-ignore import example3SampleCode from '!!raw-loader!./examples/3_creating_custom_format_editor'; diff --git a/packages/core/config/core-config-server-internal/src/index.ts b/packages/core/config/core-config-server-internal/src/index.ts index cefac583eb249..360b8998b6a97 100644 --- a/packages/core/config/core-config-server-internal/src/index.ts +++ b/packages/core/config/core-config-server-internal/src/index.ts @@ -8,4 +8,5 @@ export { coreDeprecationProvider } from './deprecation'; export { ensureValidConfiguration } from './ensure_valid_configuration'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { getDeprecationsFor, getDeprecationsForGlobalSettings } from './test_utils'; diff --git a/packages/elastic-apm-synthtrace/src/cli.ts b/packages/elastic-apm-synthtrace/src/cli.ts index efd8309c737e1..ff2689d1769e9 100644 --- a/packages/elastic-apm-synthtrace/src/cli.ts +++ b/packages/elastic-apm-synthtrace/src/cli.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { runSynthtrace } from './scripts/run_synthtrace'; +export { runSynthtrace } from './cli/run_synthtrace'; diff --git a/packages/elastic-apm-synthtrace/src/scripts/run_synthtrace.ts b/packages/elastic-apm-synthtrace/src/cli/run_synthtrace.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/run_synthtrace.ts rename to packages/elastic-apm-synthtrace/src/cli/run_synthtrace.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/scenario.ts b/packages/elastic-apm-synthtrace/src/cli/scenario.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/scenario.ts rename to packages/elastic-apm-synthtrace/src/cli/scenario.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/get_common_services.ts b/packages/elastic-apm-synthtrace/src/cli/utils/get_common_services.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/get_common_services.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/get_common_services.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/get_scenario.ts b/packages/elastic-apm-synthtrace/src/cli/utils/get_scenario.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/get_scenario.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/get_scenario.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/interval_to_ms.ts b/packages/elastic-apm-synthtrace/src/cli/utils/interval_to_ms.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/interval_to_ms.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/interval_to_ms.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/parse_run_cli_flags.ts b/packages/elastic-apm-synthtrace/src/cli/utils/parse_run_cli_flags.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/parse_run_cli_flags.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/parse_run_cli_flags.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/start_historical_data_upload.ts b/packages/elastic-apm-synthtrace/src/cli/utils/start_historical_data_upload.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/start_historical_data_upload.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/start_historical_data_upload.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/start_live_data_upload.ts b/packages/elastic-apm-synthtrace/src/cli/utils/start_live_data_upload.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/start_live_data_upload.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/start_live_data_upload.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/synthtrace_worker.ts b/packages/elastic-apm-synthtrace/src/cli/utils/synthtrace_worker.ts similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/synthtrace_worker.ts rename to packages/elastic-apm-synthtrace/src/cli/utils/synthtrace_worker.ts diff --git a/packages/elastic-apm-synthtrace/src/scripts/utils/worker.js b/packages/elastic-apm-synthtrace/src/cli/utils/worker.js similarity index 100% rename from packages/elastic-apm-synthtrace/src/scripts/utils/worker.js rename to packages/elastic-apm-synthtrace/src/cli/utils/worker.js diff --git a/packages/elastic-apm-synthtrace/src/scenarios/agent_config.ts b/packages/elastic-apm-synthtrace/src/scenarios/agent_config.ts index 767890ee493b0..79980dc0ab66b 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/agent_config.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/agent_config.ts @@ -7,9 +7,9 @@ */ import { observer, timerange } from '..'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; import { AgentConfigFields } from '../lib/agent_config/agent_config_fields'; const scenario: Scenario = async (runOptions: RunOptions) => { diff --git a/packages/elastic-apm-synthtrace/src/scenarios/aws_lambda.ts b/packages/elastic-apm-synthtrace/src/scenarios/aws_lambda.ts index daadce1c076e7..60d006b48340e 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/aws_lambda.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/aws_lambda.ts @@ -8,9 +8,9 @@ import { apm, timerange } from '..'; import { ApmFields } from '../lib/apm/apm_fields'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; const ENVIRONMENT = __filename; diff --git a/packages/elastic-apm-synthtrace/src/scenarios/kibana_stats.ts b/packages/elastic-apm-synthtrace/src/scenarios/kibana_stats.ts index d1ea567599391..2494fd57d94ed 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/kibana_stats.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/kibana_stats.ts @@ -7,9 +7,9 @@ */ import { stackMonitoring, timerange } from '..'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; import { ApmFields } from '../lib/apm/apm_fields'; const scenario: Scenario = async (runOptions: RunOptions) => { diff --git a/packages/elastic-apm-synthtrace/src/scenarios/low_throughput.ts b/packages/elastic-apm-synthtrace/src/scenarios/low_throughput.ts index d128ea755fd31..0c4ff32418f9a 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/low_throughput.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/low_throughput.ts @@ -10,9 +10,9 @@ import { random } from 'lodash'; import { apm, timerange } from '..'; import { ApmFields } from '../lib/apm/apm_fields'; import { Instance } from '../lib/apm/instance'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; const ENVIRONMENT = __filename; diff --git a/packages/elastic-apm-synthtrace/src/scenarios/many_services.ts b/packages/elastic-apm-synthtrace/src/scenarios/many_services.ts index fc671950902a9..fbc73f58303f1 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/many_services.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/many_services.ts @@ -9,9 +9,9 @@ import { random } from 'lodash'; import { apm, timerange } from '..'; import { Instance } from '../lib/apm/instance'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; import { ApmFields } from '../lib/apm/apm_fields'; const ENVIRONMENT = __filename; diff --git a/packages/elastic-apm-synthtrace/src/scenarios/monitoring.ts b/packages/elastic-apm-synthtrace/src/scenarios/monitoring.ts index 467be4143078d..acaadfa281bd1 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/monitoring.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/monitoring.ts @@ -9,9 +9,9 @@ // Run with: node ./src/scripts/run ./src/scripts/examples/03_monitoring.ts --target=http://elastic:changeme@localhost:9200 import { stackMonitoring, timerange } from '..'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; import { StackMonitoringFields } from '../lib/stack_monitoring/stack_monitoring_fields'; const scenario: Scenario = async (runOptions: RunOptions) => { diff --git a/packages/elastic-apm-synthtrace/src/scenarios/simple_trace.ts b/packages/elastic-apm-synthtrace/src/scenarios/simple_trace.ts index 5b5d6ea4bc634..61b3fdcdba6ca 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/simple_trace.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/simple_trace.ts @@ -9,9 +9,9 @@ import { apm, timerange } from '..'; import { ApmFields } from '../lib/apm/apm_fields'; import { Instance } from '../lib/apm/instance'; -import { Scenario } from '../scripts/scenario'; -import { getLogger } from '../scripts/utils/get_common_services'; -import { RunOptions } from '../scripts/utils/parse_run_cli_flags'; +import { Scenario } from '../cli/scenario'; +import { getLogger } from '../cli/utils/get_common_services'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; const ENVIRONMENT = __filename; diff --git a/packages/elastic-apm-synthtrace/src/scenarios/span_links.ts b/packages/elastic-apm-synthtrace/src/scenarios/span_links.ts index eed64c05f975d..af0cd17f73d42 100644 --- a/packages/elastic-apm-synthtrace/src/scenarios/span_links.ts +++ b/packages/elastic-apm-synthtrace/src/scenarios/span_links.ts @@ -9,7 +9,7 @@ import { compact, shuffle } from 'lodash'; import { apm, ApmFields, EntityArrayIterable, timerange } from '..'; import { generateLongId, generateShortId } from '../lib/utils/generate_id'; -import { Scenario } from '../scripts/scenario'; +import { Scenario } from '../cli/scenario'; const ENVIRONMENT = __filename; diff --git a/packages/home/sample_data_card/src/index.ts b/packages/home/sample_data_card/src/index.ts index 47bb9696ff87f..ea52b0fb6525e 100644 --- a/packages/home/sample_data_card/src/index.ts +++ b/packages/home/sample_data_card/src/index.ts @@ -20,5 +20,6 @@ export { getStoryArgTypes as getSampleDataCardStoryArgTypes, getStoryServices as getSampleDataCardStoryServices, getMockDataSet as getSampleDataCardMockDataSet, + // eslint-disable-next-line @kbn/imports/no_boundary_crossing } from './mocks'; export type { Params as SampleDataCardStorybookParams } from './mocks'; diff --git a/packages/kbn-eslint-config/.eslintrc.js b/packages/kbn-eslint-config/.eslintrc.js index 6ebaf807fcafb..97100635ac0ee 100644 --- a/packages/kbn-eslint-config/.eslintrc.js +++ b/packages/kbn-eslint-config/.eslintrc.js @@ -258,5 +258,6 @@ module.exports = { '@kbn/imports/no_unresolvable_imports': 'error', '@kbn/imports/uniform_imports': 'error', '@kbn/imports/no_unused_imports': 'error', + '@kbn/imports/no_boundary_crossing': 'error', }, }; diff --git a/packages/kbn-eslint-plugin-eslint/BUILD.bazel b/packages/kbn-eslint-plugin-eslint/BUILD.bazel index d9966e0a7068b..a86ec832e6870 100644 --- a/packages/kbn-eslint-plugin-eslint/BUILD.bazel +++ b/packages/kbn-eslint-plugin-eslint/BUILD.bazel @@ -34,7 +34,6 @@ RUNTIME_DEPS = [ "@npm//dedent", "@npm//eslint", "@npm//eslint-module-utils", - "@npm//micromatch", ] js_library( diff --git a/packages/kbn-eslint-plugin-eslint/README.mdx b/packages/kbn-eslint-plugin-eslint/README.mdx index 3c7eff4620b0a..0cbe16599f2c6 100644 --- a/packages/kbn-eslint-plugin-eslint/README.mdx +++ b/packages/kbn-eslint-plugin-eslint/README.mdx @@ -83,47 +83,6 @@ Disallows the usage of `this` into class property initializers and enforce to de Disables the usage of a trailing slash in a node module import. -## no-restricted-paths - -Defines a set of import paths valid to be imported for a given group of files. - -``` -module.exports = { - overrides: [ - { - files: ['**/*.{js,mjs,ts,tsx}'], - rules: { - '@kbn/eslint/no-restricted-paths': [ - 'error', - { - basePath: __dirname, - zones: [ - { - target: [ - '(src|x-pack)/plugins/**/(public|server)/**/*', - 'examples/**/*', - '!(src|x-pack)/**/*.test.*', - '!(x-pack/)?test/**/*', - ], - from: [ - '(src|x-pack)/plugins/**/(public|server)/**/*', - '!(src|x-pack)/plugins/**/(public|server)/mocks/index.{js,mjs,ts}', - '!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,mjs,ts,tsx}', - '!(src|x-pack)/plugins/**/__stories__/index.{js,mjs,ts,tsx}', - '!(src|x-pack)/plugins/**/__fixtures__/index.{js,mjs,ts,tsx}', - ], - allowSameFolder: true, - errorMessage: 'Plugins may only import from top-level public and server modules.', - }, - ], - }, - ], - }, - } - ] -} -``` - ## require-license-header Requires a given license header text on a group of files. diff --git a/packages/kbn-eslint-plugin-eslint/index.js b/packages/kbn-eslint-plugin-eslint/index.js index 44244f265cd23..f099adedabbbe 100644 --- a/packages/kbn-eslint-plugin-eslint/index.js +++ b/packages/kbn-eslint-plugin-eslint/index.js @@ -10,7 +10,6 @@ module.exports = { rules: { 'require-license-header': require('./rules/require_license_header'), 'disallow-license-headers': require('./rules/disallow_license_headers'), - 'no-restricted-paths': require('./rules/no_restricted_paths'), module_migration: require('./rules/module_migration'), no_export_all: require('./rules/no_export_all'), no_async_promise_body: require('./rules/no_async_promise_body'), diff --git a/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.js b/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.js deleted file mode 100644 index 97126995f3b52..0000000000000 --- a/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.js +++ /dev/null @@ -1,151 +0,0 @@ -/* eslint-disable-line @kbn/eslint/require-license-header */ -/* - * This product uses import/no-restricted-paths which is available under a - * "MIT" license. - * - * The MIT License (MIT) - * - * Copyright (c) 2015-present, Ben Mosher - * https://github.com/benmosher/eslint-plugin-import - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -const path = require('path'); -const mm = require('micromatch'); -const { getImportResolver } = require('@kbn/eslint-plugin-imports'); - -function isStaticRequire(node) { - return ( - node && - node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && - node.arguments.length === 1 && - node.arguments[0].type === 'Literal' && - typeof node.arguments[0].value === 'string' - ); -} - -function traverseToTopFolder(src, pattern) { - while (mm([src], pattern).length > 0) { - const srcIdx = src.lastIndexOf(path.sep); - src = src.slice(0, srcIdx); - } - return src; -} - -function isSameFolderOrDescendent(src, imported, pattern) { - // to allow to exclude file by name in pattern (e.g., !**/index*) we start with file dirname and then traverse - const srcFileFolderRoot = traverseToTopFolder(path.dirname(src), pattern); - const importedFileFolderRoot = traverseToTopFolder(path.dirname(imported), pattern); - - return srcFileFolderRoot === importedFileFolderRoot; -} - -module.exports = { - meta: { - schema: [ - { - type: 'object', - properties: { - zones: { - type: 'array', - minItems: 1, - items: { - type: 'object', - properties: { - target: { - anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], - }, - from: { - anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], - }, - allowSameFolder: { type: 'boolean' }, - errorMessage: { type: 'string' }, - }, - additionalProperties: false, - }, - }, - basePath: { type: 'string' }, - }, - additionalProperties: false, - }, - ], - }, - - create(context) { - const resolver = getImportResolver(context); - - const sourcePath = context.getPhysicalFilename - ? context.getPhysicalFilename() - : context.getFilename(); - const sourceDirname = path.dirname(sourcePath); - - const options = context.options[0] || {}; - const zones = options.zones || []; - const basePath = options.basePath; - if (!basePath || !path.isAbsolute(basePath)) { - throw new Error('basePath option must be specified and must be absolute'); - } - - function checkForRestrictedImportPath(importPath, node) { - const resolveReport = resolver.resolve(importPath, sourceDirname); - - if (resolveReport?.type !== 'file' || resolveReport.nodeModule) { - return; - } - - for (const { target, from, allowSameFolder, errorMessage = '' } of zones) { - const relativeSrcFile = path.relative(basePath, sourcePath); - const relativeImportFile = path.relative(basePath, resolveReport.absolute); - - if ( - !mm([relativeSrcFile], target).length || - !mm([relativeImportFile], from).length || - (allowSameFolder && isSameFolderOrDescendent(relativeSrcFile, relativeImportFile, from)) - ) - continue; - - context.report({ - node, - message: `Unexpected path "${importPath}" imported in restricted zone.${ - errorMessage ? ' ' + errorMessage : '' - }`, - }); - } - } - - return { - ExportNamedDeclaration(node) { - if (!node.source) return; - checkForRestrictedImportPath(node.source.value, node.source); - }, - ImportDeclaration(node) { - checkForRestrictedImportPath(node.source.value, node.source); - }, - CallExpression(node) { - if (isStaticRequire(node)) { - const [firstArgument] = node.arguments; - - checkForRestrictedImportPath(firstArgument.value, firstArgument); - } - }, - }; - }, -}; diff --git a/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.test.js b/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.test.js deleted file mode 100644 index 306e2c170cdbf..0000000000000 --- a/packages/kbn-eslint-plugin-eslint/rules/no_restricted_paths.test.js +++ /dev/null @@ -1,400 +0,0 @@ -/* eslint-disable-line @kbn/eslint/require-license-header */ -/* - * This product uses import/no-restricted-paths which is available under a - * "MIT" license. - * - * The MIT License (MIT) - * - * Copyright (c) 2015-present, Ben Mosher - * https://github.com/benmosher/eslint-plugin-import - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -const path = require('path'); -const { RuleTester } = require('eslint'); -const { REPO_ROOT } = require('@kbn/utils'); -const rule = require('./no_restricted_paths'); - -const ruleTester = new RuleTester({ - parser: require.resolve('@babel/eslint-parser'), - parserOptions: { - sourceType: 'module', - ecmaVersion: 2018, - requireConfigFile: false, - }, -}); - -ruleTester.run('@kbn/eslint/no-restricted-paths', rule, { - valid: [ - { - code: 'import a from "../client/a.js"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/server/**/*', - from: '__fixtures__/no_restricted_paths/other/**/*', - }, - ], - }, - ], - }, - { - code: 'const a = require("../client/a.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/server/**/*', - from: '__fixtures__/no_restricted_paths/other/**/*', - }, - ], - }, - ], - }, - { - code: 'import b from "../server/b.js"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '**/no_restricted_paths/client/**/*', - from: '**/no_restricted_paths/other/**/*', - }, - ], - }, - ], - }, - - // irrelevant function calls - { - code: 'notrequire("../server/b.js")', - options: [ - { - basePath: __dirname, - }, - ], - }, - { - code: 'notrequire("../server/b.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/client/**/*', - from: '__fixtures__/no_restricted_paths/server/**/*', - }, - ], - }, - ], - }, - - // no config - { - code: 'require("../server/b.js")', - options: [ - { - basePath: __dirname, - }, - ], - }, - { - code: 'import b from "../server/b.js"', - options: [ - { - basePath: __dirname, - }, - ], - }, - - // builtin (ignore) - { - code: 'require("os")', - options: [ - { - basePath: __dirname, - }, - ], - }, - - { - code: 'const d = require("./deep/d.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - allowSameFolder: true, - target: '__fixtures__/no_restricted_paths/**/*', - from: '__fixtures__/no_restricted_paths/**/*', - }, - ], - }, - ], - }, - { - code: 'const d = require("./deep/d.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - allowSameFolder: true, - target: '__fixtures__/no_restricted_paths/**/*', - from: [ - '__fixtures__/no_restricted_paths/**/*', - '!__fixtures__/no_restricted_paths/server/b*', - ], - }, - ], - }, - ], - }, - - { - // Check if dirs that start with 'index' work correctly. - code: 'import { X } from "./index_patterns"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: ['__fixtures__/no_restricted_paths/(public|server)/**/*'], - from: [ - '__fixtures__/no_restricted_paths/server/**/*', - '!__fixtures__/no_restricted_paths/server/index.{ts,tsx}', - ], - allowSameFolder: true, - }, - ], - }, - ], - }, - ], - - invalid: [ - { - code: 'export { b } from "../server/b.js"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/client/**/*', - from: '__fixtures__/no_restricted_paths/server/**/*', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "../server/b.js" imported in restricted zone.', - line: 1, - column: 19, - }, - ], - }, - { - code: 'import b from "../server/b.js"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/client/**/*', - from: '__fixtures__/no_restricted_paths/server/**/*', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "../server/b.js" imported in restricted zone.', - line: 1, - column: 15, - }, - ], - }, - { - code: 'import a from "../client/a"\nimport c from "./c"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/server/**/*', - from: '__fixtures__/no_restricted_paths/client/**/*', - }, - { - target: '__fixtures__/no_restricted_paths/server/**/*', - from: '__fixtures__/no_restricted_paths/server/c.js', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "../client/a" imported in restricted zone.', - line: 1, - column: 15, - }, - { - message: 'Unexpected path "./c" imported in restricted zone.', - line: 2, - column: 15, - }, - ], - }, - { - code: 'const b = require("../server/b.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '**/no_restricted_paths/client/**/*', - from: '**/no_restricted_paths/server/**/*', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "../server/b.js" imported in restricted zone.', - line: 1, - column: 19, - }, - ], - }, - { - code: 'const b = require("../server/b.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: path.join(__dirname, '__fixtures__', 'no_restricted_paths'), - zones: [ - { - target: 'client/**/*', - from: 'server/**/*', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "../server/b.js" imported in restricted zone.', - line: 1, - column: 19, - }, - ], - }, - - { - code: 'const d = require("./deep/d.js")', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: '__fixtures__/no_restricted_paths/**/*', - from: '__fixtures__/no_restricted_paths/**/*', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "./deep/d.js" imported in restricted zone.', - line: 1, - column: 19, - }, - ], - }, - - { - // Does not allow to import deeply within Core, using "src/core/..." Webpack alias. - code: 'const d = require("src/core/server/saved_objects")', - filename: path.join(REPO_ROOT, './__fixtures__/no_restricted_paths/client/a.js'), - options: [ - { - basePath: REPO_ROOT, - zones: [ - { - target: '__fixtures__/no_restricted_paths/**/*', - from: 'src/core/server/**/*', - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "src/core/server/saved_objects" imported in restricted zone.', - line: 1, - column: 19, - }, - ], - }, - - { - // Don't use index*. - // It won't work with dirs that start with 'index'. - code: 'import { X } from "./index_patterns"', - filename: path.join(__dirname, './__fixtures__/no_restricted_paths/server/b.js'), - options: [ - { - basePath: __dirname, - zones: [ - { - target: ['__fixtures__/no_restricted_paths/(public|server)/**/*'], - from: [ - '__fixtures__/no_restricted_paths/server/**/*', - '!__fixtures__/no_restricted_paths/server/index*', - ], - allowSameFolder: true, - }, - ], - }, - ], - errors: [ - { - message: 'Unexpected path "./index_patterns" imported in restricted zone.', - line: 1, - column: 19, - }, - ], - }, - ], -}); diff --git a/packages/kbn-repo-source-classifier/src/repo_source_classifier.ts b/packages/kbn-repo-source-classifier/src/repo_source_classifier.ts index 745ca52385166..f3aecbb49d246 100644 --- a/packages/kbn-repo-source-classifier/src/repo_source_classifier.ts +++ b/packages/kbn-repo-source-classifier/src/repo_source_classifier.ts @@ -97,7 +97,10 @@ export class RepoSourceClassifier { } const subRoot = dirs.slice(0, 2).join('/'); - if (subRoot === 'functions/external' || subRoot === 'functions/server') { + if (subRoot === 'functions/external') { + return 'common package'; + } + if (subRoot === 'functions/server') { return 'server package'; } diff --git a/packages/kbn-securitysolution-io-ts-utils/src/index.ts b/packages/kbn-securitysolution-io-ts-utils/src/index.ts index 8082574296e3f..8c487a9d85097 100644 --- a/packages/kbn-securitysolution-io-ts-utils/src/index.ts +++ b/packages/kbn-securitysolution-io-ts-utils/src/index.ts @@ -10,5 +10,6 @@ export * from './format_errors'; export * from './parse_schedule_dates'; export * from './exact_check'; export * from './format_errors'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export * from './test_utils'; export * from './validate'; diff --git a/packages/kbn-securitysolution-t-grid/src/index.ts b/packages/kbn-securitysolution-t-grid/src/index.ts index 0c2e9a7dbea8b..2e33981c0040c 100644 --- a/packages/kbn-securitysolution-t-grid/src/index.ts +++ b/packages/kbn-securitysolution-t-grid/src/index.ts @@ -8,4 +8,5 @@ export * from './constants'; export * from './utils'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export * from './mock'; diff --git a/packages/kbn-shared-ux-services/src/services/index.ts b/packages/kbn-shared-ux-services/src/services/index.ts index d6b9ec16cdc37..0e4e4e473028d 100644 --- a/packages/kbn-shared-ux-services/src/services/index.ts +++ b/packages/kbn-shared-ux-services/src/services/index.ts @@ -15,5 +15,7 @@ export type { SharedUxPlatformService } from './platform'; export type { SharedUxDataService } from './data'; export type { MockServicesFactoryParams } from './mock'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { mockServicesFactory, mockServiceFactories } from './mock'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { stubServicesFactory, stubServiceFactories } from './stub'; diff --git a/src/core/public/plugins/plugin.ts b/src/core/public/plugins/plugin.ts index 8e24573bd741c..8abab5081e55c 100644 --- a/src/core/public/plugins/plugin.ts +++ b/src/core/public/plugins/plugin.ts @@ -7,7 +7,7 @@ */ import { firstValueFrom, Subject } from 'rxjs'; -import { DiscoveredPlugin, PluginOpaqueId } from '../../server'; +import type { DiscoveredPlugin, PluginOpaqueId } from '../../server'; import { PluginInitializerContext } from './plugin_context'; import { read } from './plugin_reader'; import { CoreStart, CoreSetup } from '..'; diff --git a/src/core/public/plugins/plugin_context.ts b/src/core/public/plugins/plugin_context.ts index 13695b2310f50..e3516ce5da787 100644 --- a/src/core/public/plugins/plugin_context.ts +++ b/src/core/public/plugins/plugin_context.ts @@ -8,8 +8,8 @@ import { omit } from 'lodash'; import type { CoreContext } from '@kbn/core-base-browser-internal'; -import { DiscoveredPlugin } from '../../server'; -import { PluginOpaqueId, PackageInfo, EnvironmentMode } from '../../server/types'; +import type { DiscoveredPlugin } from '../../server'; +import type { PluginOpaqueId, PackageInfo, EnvironmentMode } from '../../server/types'; import { PluginWrapper } from './plugin'; import { PluginsServiceSetupDeps, PluginsServiceStartDeps } from './plugins_service'; import { CoreSetup, CoreStart } from '..'; diff --git a/src/dev/build/tasks/install_chromium.js b/src/dev/build/tasks/install_chromium.js index cb7a9e2075553..542b36086d3ff 100644 --- a/src/dev/build/tasks/install_chromium.js +++ b/src/dev/build/tasks/install_chromium.js @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { install, paths } from '@kbn/screenshotting-plugin/server/utils'; export const InstallChromium = { diff --git a/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts index 7d06b275f6b47..ed1098ea96ad8 100644 --- a/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_gauge/common/types/expression_functions.ts @@ -13,7 +13,7 @@ import { ExpressionFunctionDefinition, ExpressionValueRender, } from '@kbn/expressions-plugin/common'; -import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/public'; +import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; import { CustomPaletteState } from '@kbn/charts-plugin/common'; import { EXPRESSION_GAUGE_NAME, diff --git a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx index 5485fb873b902..bdaa7f878fd6e 100644 --- a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx +++ b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx @@ -16,6 +16,7 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { ExpressionGaugePluginStart } from '../plugin'; import { EXPRESSION_GAUGE_NAME, GaugeExpressionProps, GaugeShapes } from '../../common'; import { getFormatService, getPaletteService } from '../services'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; interface ExpressionGaugeRendererDependencies { diff --git a/src/plugins/chart_expressions/expression_gauge/server/plugin.ts b/src/plugins/chart_expressions/expression_gauge/server/plugin.ts index 7b6cd1abb4d39..f88de5e0c8c70 100644 --- a/src/plugins/chart_expressions/expression_gauge/server/plugin.ts +++ b/src/plugins/chart_expressions/expression_gauge/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { gaugeFunction } from '../common'; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts index c36f6f959c88e..50be8b847bd6b 100644 --- a/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts @@ -15,7 +15,7 @@ import { import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; import { CustomPaletteState } from '@kbn/charts-plugin/common'; -import { LegendSize } from '@kbn/visualizations-plugin/public'; +import type { LegendSize } from '@kbn/visualizations-plugin/public'; import { EXPRESSION_HEATMAP_NAME, EXPRESSION_HEATMAP_LEGEND_NAME, diff --git a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx index 1bd786409350a..b0801c89031e2 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx @@ -27,6 +27,7 @@ import { getUISettings, } from '../services'; import { getTimeZone } from '../utils/get_timezone'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; interface ExpressioHeatmapRendererDependencies { diff --git a/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts b/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts index 1f5597621341d..2b96275ff3cf2 100644 --- a/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts +++ b/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { heatmapFunction, heatmapLegendConfig, heatmapGridConfig } from '../common'; diff --git a/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx b/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx index 46e304a3dccca..798bc62938ca1 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_legacy_metric/public/expression_renderers/metric_vis_renderer.tsx @@ -23,6 +23,7 @@ import { Datatable } from '@kbn/expressions-plugin/common'; import { StartServicesGetter } from '@kbn/kibana-utils-plugin/public'; import { ExpressionLegacyMetricPluginStart } from '../plugin'; import { EXPRESSION_METRIC_NAME, MetricVisRenderConfig, VisParams } from '../../common'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; // @ts-ignore diff --git a/src/plugins/chart_expressions/expression_legacy_metric/server/plugin.ts b/src/plugins/chart_expressions/expression_legacy_metric/server/plugin.ts index 6c3b224d35078..c027ab506a875 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/server/plugin.ts +++ b/src/plugins/chart_expressions/expression_legacy_metric/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { metricVisFunction } from '../common'; diff --git a/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx b/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx index 19b47d57a06a4..3979f2f563af2 100644 --- a/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_metric/public/expression_renderers/metric_vis_renderer.tsx @@ -18,6 +18,7 @@ import type { IInterpreterRenderHandlers, Datatable } from '@kbn/expressions-plu import { getColumnByAccessor } from '@kbn/visualizations-plugin/common/utils'; import { ExpressionMetricPluginStart } from '../plugin'; import { EXPRESSION_METRIC_NAME, MetricVisRenderConfig, VisParams } from '../../common'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; async function metricFilterable( diff --git a/src/plugins/chart_expressions/expression_metric/server/plugin.ts b/src/plugins/chart_expressions/expression_metric/server/plugin.ts index aeead69b806f2..bfaa92643f351 100644 --- a/src/plugins/chart_expressions/expression_metric/server/plugin.ts +++ b/src/plugins/chart_expressions/expression_metric/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { metricVisFunction } from '../common'; diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts index 93f9365987553..2f436de90e138 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts @@ -11,7 +11,7 @@ import type { PaletteOutput } from '@kbn/coloring'; import { Datatable, DatatableColumn } from '@kbn/expressions-plugin/common'; import { SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; -import { LegendSize } from '@kbn/visualizations-plugin/public'; +import type { LegendSize } from '@kbn/visualizations-plugin/public'; import { ChartTypes, ExpressionValuePartitionLabels } from './expression_functions'; export enum EmptySizeRatios { diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts b/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts index 7cf5674b1b934..3424f4c95a7a1 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/__mocks__/theme.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ThemeService } from '@kbn/charts-plugin/public/services'; import { uiSettings } from './ui_settings'; diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx index 9a02bd9a3c373..546b70d98c6eb 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx +++ b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx @@ -19,6 +19,7 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { VisTypePieDependencies } from '../plugin'; import { PARTITION_VIS_RENDERER_NAME } from '../../common/constants'; import { ChartTypes, RenderValue } from '../../common/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; export const strings = { diff --git a/src/plugins/chart_expressions/expression_tagcloud/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_tagcloud/common/types/expression_renderers.ts index c7d6d773f001a..5cc53c3adca18 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/common/types/expression_renderers.ts +++ b/src/plugins/chart_expressions/expression_tagcloud/common/types/expression_renderers.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ChartsPluginSetup } from '@kbn/charts-plugin/public'; +import type { ChartsPluginSetup } from '@kbn/charts-plugin/public'; export interface TagCloudTypeProps { palettes: ChartsPluginSetup['palettes']; diff --git a/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx b/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx index 3fb5436d3fa53..6553fdfd3f63e 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx +++ b/src/plugins/chart_expressions/expression_tagcloud/public/expression_renderers/tagcloud_renderer.tsx @@ -18,6 +18,7 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { ExpressionTagcloudRendererDependencies } from '../plugin'; import { TagcloudRendererConfig } from '../../common/types'; import { EXPRESSION_NAME } from '../../common'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; export const strings = { diff --git a/src/plugins/chart_expressions/expression_tagcloud/server/plugin.ts b/src/plugins/chart_expressions/expression_tagcloud/server/plugin.ts index 78a581d135c61..40c0b7ea1d315 100644 --- a/src/plugins/chart_expressions/expression_tagcloud/server/plugin.ts +++ b/src/plugins/chart_expressions/expression_tagcloud/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { tagcloudFunction } from '../common/expression_functions'; diff --git a/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts index 068f49a7f1694..12727973ea4ed 100644 --- a/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts @@ -10,7 +10,7 @@ import { HorizontalAlignment, Position, VerticalAlignment } from '@elastic/chart import { $Values } from '@kbn/utility-types'; import type { PaletteOutput } from '@kbn/coloring'; import { Datatable, ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; -import { LegendSize } from '@kbn/visualizations-plugin/public'; +import { LegendSize } from '@kbn/visualizations-plugin/common'; import { EventAnnotationOutput } from '@kbn/event-annotation-plugin/common'; import { ExpressionValueVisDimension } from '@kbn/visualizations-plugin/common'; diff --git a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx index 619a63f9b02fc..e1b5512dbebff 100644 --- a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx @@ -24,6 +24,7 @@ import { isDataLayer } from '../../common/utils/layer_types_guards'; import { LayerTypes, SeriesTypes } from '../../common/constants'; import type { CommonXYLayerConfig, XYChartProps } from '../../common'; import type { BrushEvent, FilterEvent } from '../types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { extractContainerType, extractVisualizationType } from '../../../common'; export type GetStartDepsFn = () => Promise<{ diff --git a/src/plugins/controls/public/services/index.ts b/src/plugins/controls/public/services/index.ts index 96cc2869ad603..1334899b70591 100644 --- a/src/plugins/controls/public/services/index.ts +++ b/src/plugins/controls/public/services/index.ts @@ -9,6 +9,7 @@ import { PluginServices } from '@kbn/presentation-util-plugin/public'; import { ControlsDataViewsService } from './data_views'; import { ControlsOverlaysService } from './overlays'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { registry as stubRegistry } from './stub'; import { ControlsPluginStart } from '../types'; import { ControlsDataService } from './data'; diff --git a/src/plugins/dashboard/common/bwc/types.ts b/src/plugins/dashboard/common/bwc/types.ts index 111e2c52f74bf..5a7d30dd085df 100644 --- a/src/plugins/dashboard/common/bwc/types.ts +++ b/src/plugins/dashboard/common/bwc/types.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { SavedObjectReference } from '@kbn/core/public'; +import type { SavedObjectReference } from '@kbn/core/public'; import type { Serializable } from '@kbn/utility-types'; import { GridData } from '..'; diff --git a/src/plugins/dashboard/public/services/home.ts b/src/plugins/dashboard/public/services/home.ts index ee26c3cd9c4bc..07c1af0935658 100644 --- a/src/plugins/dashboard/public/services/home.ts +++ b/src/plugins/dashboard/public/services/home.ts @@ -7,4 +7,4 @@ */ export type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; -export { FeatureCatalogueCategory } from '@kbn/home-plugin/public'; +export type { FeatureCatalogueCategory } from '@kbn/home-plugin/public'; diff --git a/src/plugins/data/common/search/aggs/agg_config.ts b/src/plugins/data/common/search/aggs/agg_config.ts index 5c13747b238c7..a804a63ab2eb0 100644 --- a/src/plugins/data/common/search/aggs/agg_config.ts +++ b/src/plugins/data/common/search/aggs/agg_config.ts @@ -15,8 +15,7 @@ import { Assign, Ensure } from '@kbn/utility-types'; import { ExpressionAstExpression, ExpressionAstArgument } from '@kbn/expressions-plugin/common'; import type { SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; import { FieldFormatParams } from '@kbn/field-formats-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ISearchOptions, ISearchSource } from '../../../public'; +import type { ISearchOptions, ISearchSource } from '../../../public'; import { IAggType } from './agg_type'; import { writeParams } from './agg_params'; diff --git a/src/plugins/data/common/search/aggs/agg_configs.ts b/src/plugins/data/common/search/aggs/agg_configs.ts index 7d1b6e7b03cad..c61ca69e0c6df 100644 --- a/src/plugins/data/common/search/aggs/agg_configs.ts +++ b/src/plugins/data/common/search/aggs/agg_configs.ts @@ -16,12 +16,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IndexPatternLoadExpressionFunctionDefinition } from '@kbn/data-views-plugin/common'; import { buildExpression, buildExpressionFunction } from '@kbn/expressions-plugin/common'; -import type { - IEsSearchResponse, - ISearchOptions, - ISearchSource, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../public'; +import type { IEsSearchResponse, ISearchOptions, ISearchSource } from '../../../public'; import type { EsaggsExpressionFunctionDefinition } from '../expressions'; import { AggConfig, AggConfigSerialized, IAggConfig } from './agg_config'; import type { IAggType } from './agg_type'; diff --git a/src/plugins/data/common/search/aggs/agg_type.ts b/src/plugins/data/common/search/aggs/agg_type.ts index 22055587eb7e8..8d01377ddf808 100644 --- a/src/plugins/data/common/search/aggs/agg_type.ts +++ b/src/plugins/data/common/search/aggs/agg_type.ts @@ -15,8 +15,7 @@ import type { SerializedFieldFormat } from '@kbn/field-formats-plugin/common'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { FieldFormatParams } from '@kbn/field-formats-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ISearchSource } from '../../../public'; +import type { ISearchSource } from '../../../public'; import { initParams } from './agg_params'; import { AggConfig } from './agg_config'; import { IAggConfigs } from './agg_configs'; diff --git a/src/plugins/data/common/search/aggs/buckets/histogram.ts b/src/plugins/data/common/search/aggs/buckets/histogram.ts index 5231bbbb91b10..e2cef6b078320 100644 --- a/src/plugins/data/common/search/aggs/buckets/histogram.ts +++ b/src/plugins/data/common/search/aggs/buckets/histogram.ts @@ -8,7 +8,7 @@ import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { IUiSettingsClient } from '@kbn/core/public'; +import type { IUiSettingsClient } from '@kbn/core/public'; import { KBN_FIELD_TYPES, UI_SETTINGS } from '../../..'; diff --git a/src/plugins/data/common/search/aggs/param_types/base.ts b/src/plugins/data/common/search/aggs/param_types/base.ts index 8f5c660532df4..7f974de39bdb5 100644 --- a/src/plugins/data/common/search/aggs/param_types/base.ts +++ b/src/plugins/data/common/search/aggs/param_types/base.ts @@ -7,8 +7,7 @@ */ import { ExpressionAstExpression } from '@kbn/expressions-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ISearchOptions, ISearchSource } from '../../../../public'; +import type { ISearchOptions, ISearchSource } from '../../../../public'; import { IAggConfigs } from '../agg_configs'; import { IAggConfig } from '../agg_config'; diff --git a/src/plugins/data/common/search/expressions/essql.ts b/src/plugins/data/common/search/expressions/essql.ts index 398b92de490d8..6349b76d8d687 100644 --- a/src/plugins/data/common/search/expressions/essql.ts +++ b/src/plugins/data/common/search/expressions/essql.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { KibanaRequest } from '@kbn/core/server'; import { buildEsQuery } from '@kbn/es-query'; import { castEsToKbnFieldTypeName, ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; @@ -21,7 +20,6 @@ import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { zipObject } from 'lodash'; import { Observable, defer, throwError } from 'rxjs'; import { catchError, map, switchMap, tap } from 'rxjs/operators'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { NowProviderPublicContract } from '../../../public'; import { getEsQueryConfig } from '../../es_query'; import { getTime } from '../../query'; diff --git a/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts b/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts index 4d4f6d4b04f3b..359a0e9d32d6e 100644 --- a/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts +++ b/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts @@ -16,7 +16,6 @@ import { i18n } from '@kbn/i18n'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { RequestStatistics } from '@kbn/inspector-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ISearchSource } from '../../../../public'; /** @public */ diff --git a/src/plugins/data/common/search/search_source/types.ts b/src/plugins/data/common/search/search_source/types.ts index 3cee6355ccbfa..e1ed574cda435 100644 --- a/src/plugins/data/common/search/search_source/types.ts +++ b/src/plugins/data/common/search/search_source/types.ts @@ -12,8 +12,7 @@ import { SerializableRecord } from '@kbn/utility-types'; import { PersistableStateService } from '@kbn/kibana-utils-plugin/common'; import type { Filter } from '@kbn/es-query'; import type { DataView, DataViewSpec } from '@kbn/data-views-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { AggConfigSerialized, IAggConfigs } from '../../../public'; +import type { AggConfigSerialized, IAggConfigs } from '../../../public'; import type { SearchSource } from './search_source'; /** diff --git a/src/plugins/data/public/search/fetch/handle_response.test.ts b/src/plugins/data/public/search/fetch/handle_response.test.ts index cd71f572c27df..30fdd67394873 100644 --- a/src/plugins/data/public/search/fetch/handle_response.test.ts +++ b/src/plugins/data/public/search/fetch/handle_response.test.ts @@ -9,7 +9,6 @@ import { handleResponse } from './handle_response'; // Temporary disable eslint, will be removed after moving to new platform folder -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { notificationServiceMock } from '@kbn/core/public/notifications/notifications_service.mock'; import { setNotifications } from '../../services'; import { IKibanaSearchResponse } from '../../../common'; diff --git a/src/plugins/data/public/search/session/sessions_client.ts b/src/plugins/data/public/search/session/sessions_client.ts index f05f7b794763e..12fd424e57dd8 100644 --- a/src/plugins/data/public/search/session/sessions_client.ts +++ b/src/plugins/data/public/search/session/sessions_client.ts @@ -13,7 +13,6 @@ import type { SavedObjectsFindResponse, SavedObjectsUpdateResponse, SavedObjectsFindOptions, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/core/server'; import type { SearchSessionSavedObjectAttributes } from '../../../common'; export type SearchSessionSavedObject = SavedObject; diff --git a/src/plugins/data/public/search/session/sessions_mgmt/lib/api.test.ts b/src/plugins/data/public/search/session/sessions_mgmt/lib/api.test.ts index fdc67886f7c00..29a925d066905 100644 --- a/src/plugins/data/public/search/session/sessions_mgmt/lib/api.test.ts +++ b/src/plugins/data/public/search/session/sessions_mgmt/lib/api.test.ts @@ -10,7 +10,6 @@ import type { MockedKeys } from '@kbn/utility-types-jest'; import { CoreSetup, CoreStart } from '@kbn/core/public'; import moment from 'moment'; import { coreMock } from '@kbn/core/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { SavedObjectsFindResponse } from '@kbn/core/server'; import { SessionsClient } from '../../..'; import { SearchSessionStatus } from '../../../../../common'; diff --git a/src/plugins/data/public/search/types.ts b/src/plugins/data/public/search/types.ts index ecf3a0e453e89..2ad2262abe680 100644 --- a/src/plugins/data/public/search/types.ts +++ b/src/plugins/data/public/search/types.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { PackageInfo } from '@kbn/core/server'; +import type { PackageInfo } from '@kbn/core/server'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { DataViewsContract } from '@kbn/data-views-plugin/common'; import { SearchUsageCollector } from './collectors'; diff --git a/src/plugins/data/public/stubs.ts b/src/plugins/data/public/stubs.ts index e98f2ac08acbb..9076f9ae580f3 100644 --- a/src/plugins/data/public/stubs.ts +++ b/src/plugins/data/public/stubs.ts @@ -7,5 +7,4 @@ */ export * from '../common/stubs'; -// eslint-disable-next-line @kbn/imports/uniform_imports,@kbn/eslint/no-restricted-paths -export { createStubDataView } from '../../data_views/public/data_views/data_view.stub'; +export { createStubDataView } from '@kbn/data-views-plugin/public/data_views/data_view.stub'; diff --git a/src/plugins/data/server/search/search_service.test.ts b/src/plugins/data/server/search/search_service.test.ts index b0748c0aa9347..56733b6871ec8 100644 --- a/src/plugins/data/server/search/search_service.test.ts +++ b/src/plugins/data/server/search/search_service.test.ts @@ -26,7 +26,6 @@ import type { ISearchStrategy, } from '.'; import { NoSearchIdInSessionError } from '.'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { expressionsPluginMock } from '@kbn/expressions-plugin/public/mocks'; import { createSearchSessionsClientMock } from './mocks'; import { ENHANCED_ES_SEARCH_STRATEGY } from '../../common'; diff --git a/src/plugins/data_views/common/lib/get_title.ts b/src/plugins/data_views/common/lib/get_title.ts index b955fb815dfdf..0dfb274ef240f 100644 --- a/src/plugins/data_views/common/lib/get_title.ts +++ b/src/plugins/data_views/common/lib/get_title.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { SavedObjectsClientContract } from '@kbn/core/public'; +import type { SavedObjectsClientContract } from '@kbn/core/public'; import { DATA_VIEW_SAVED_OBJECT_TYPE } from '../constants'; import { DataViewAttributes } from '../types'; diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable_factory_definition.ts b/src/plugins/embeddable/public/lib/embeddables/embeddable_factory_definition.ts index a51ca4b54e831..2ae5d4161e15d 100644 --- a/src/plugins/embeddable/public/lib/embeddables/embeddable_factory_definition.ts +++ b/src/plugins/embeddable/public/lib/embeddables/embeddable_factory_definition.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { SavedObjectAttributes } from '@kbn/core/server'; +import type { SavedObjectAttributes } from '@kbn/core/server'; import { IEmbeddable } from './i_embeddable'; import { EmbeddableFactory } from './embeddable_factory'; import { EmbeddableInput, EmbeddableOutput } from '..'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/authorization_provider.tsx b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/authorization_provider.tsx index bc1b795d1a46c..44079b81e15a3 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/authorization_provider.tsx +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/authorization_provider.tsx @@ -6,9 +6,10 @@ * Side Public License, v 1. */ -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import React, { createContext, useContext } from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { useRequest } from '../../../public/request'; import { Privileges, Error as CustomError } from '../types'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/page_error.tsx b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/page_error.tsx index 7fe745c22f225..54a75fbd3ee65 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/page_error.tsx +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/page_error.tsx @@ -8,6 +8,7 @@ import { EuiSpacer, EuiEmptyPrompt, EuiPageContent } from '@elastic/eui'; import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { APP_WRAPPER_CLASS } from '@kbn/core/public'; import { Error } from '../types'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.test.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.test.ts index 595e65577aa1a..51b91353f9aa2 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.test.ts +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.test.ts @@ -7,7 +7,6 @@ */ import { errors } from '@elastic/elasticsearch'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { kibanaResponseFactory as response } from '@kbn/core/server'; import { handleEsError } from './handle_es_error'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.ts index 7620c71ae8956..3e97194195b46 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.ts +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/errors/handle_es_error.ts @@ -7,8 +7,7 @@ */ import { errors } from '@elastic/elasticsearch'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { IKibanaResponse, KibanaResponseFactory } from '@kbn/core/server'; +import type { IKibanaResponse, KibanaResponseFactory } from '@kbn/core/server'; import { getEsCause } from './es_error_parser'; interface EsErrorHandlerParams { diff --git a/src/plugins/expression_image/server/plugin.ts b/src/plugins/expression_image/server/plugin.ts index f474c3e05948d..f13db7b9ad7f2 100755 --- a/src/plugins/expression_image/server/plugin.ts +++ b/src/plugins/expression_image/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { imageFunction } from '../common/expression_functions'; diff --git a/src/plugins/expression_metric/server/plugin.ts b/src/plugins/expression_metric/server/plugin.ts index 4f5edabdca3b3..0b5c5c0cef3c2 100755 --- a/src/plugins/expression_metric/server/plugin.ts +++ b/src/plugins/expression_metric/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { metricFunction } from '../common'; diff --git a/src/plugins/expression_repeat_image/server/plugin.ts b/src/plugins/expression_repeat_image/server/plugin.ts index 8c316e3c17d61..b175f268b0e88 100755 --- a/src/plugins/expression_repeat_image/server/plugin.ts +++ b/src/plugins/expression_repeat_image/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { repeatImageFunction } from '../common'; diff --git a/src/plugins/expression_reveal_image/server/plugin.ts b/src/plugins/expression_reveal_image/server/plugin.ts index 58ebe7b42609e..ff950f0d084a6 100644 --- a/src/plugins/expression_reveal_image/server/plugin.ts +++ b/src/plugins/expression_reveal_image/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { revealImageFunction } from '../common'; diff --git a/src/plugins/expression_shape/server/plugin.ts b/src/plugins/expression_shape/server/plugin.ts index 41538ba489656..7c78f6fa8474a 100644 --- a/src/plugins/expression_shape/server/plugin.ts +++ b/src/plugins/expression_shape/server/plugin.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { CoreSetup, CoreStart, Plugin } from '@kbn/core/server'; import { ExpressionsServerStart, ExpressionsServerSetup } from '@kbn/expressions-plugin/server'; import { shapeFunction, progressFunction } from '../common/expression_functions'; diff --git a/src/plugins/expressions/common/execution/types.ts b/src/plugins/expressions/common/execution/types.ts index 686ade0869171..debe34e223e08 100644 --- a/src/plugins/expressions/common/execution/types.ts +++ b/src/plugins/expressions/common/execution/types.ts @@ -7,7 +7,6 @@ */ import type { SerializableRecord } from '@kbn/utility-types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { KibanaRequest } from '@kbn/core/server'; import type { KibanaExecutionContext } from '@kbn/core/public'; diff --git a/src/plugins/expressions/common/expression_functions/specs/ui_setting.ts b/src/plugins/expressions/common/expression_functions/specs/ui_setting.ts index c1a3c572031dc..ee4998dc8a1a1 100644 --- a/src/plugins/expressions/common/expression_functions/specs/ui_setting.ts +++ b/src/plugins/expressions/common/expression_functions/specs/ui_setting.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { KibanaRequest } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { ExpressionFunctionDefinition } from '../..'; diff --git a/src/plugins/expressions/common/service/expressions_services.ts b/src/plugins/expressions/common/service/expressions_services.ts index d2824a7894642..530bce8066716 100644 --- a/src/plugins/expressions/common/service/expressions_services.ts +++ b/src/plugins/expressions/common/service/expressions_services.ts @@ -9,7 +9,6 @@ import { Observable } from 'rxjs'; import type { Logger } from '@kbn/logging'; import type { SerializableRecord } from '@kbn/utility-types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { KibanaRequest } from '@kbn/core/server'; import type { KibanaExecutionContext } from '@kbn/core/public'; diff --git a/src/plugins/expressions/common/util/index.ts b/src/plugins/expressions/common/util/index.ts index 110dcaec282f7..c7f74a09917a8 100644 --- a/src/plugins/expressions/common/util/index.ts +++ b/src/plugins/expressions/common/util/index.ts @@ -10,5 +10,6 @@ export * from './create_error'; export * from './get_by_alias'; export * from './tables_adapter'; export * from './expressions_inspector_adapter'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export * from './test_utils'; export * from './create_default_inspector_adapters'; diff --git a/src/plugins/home/server/services/sample_data/sample_data_registry.ts b/src/plugins/home/server/services/sample_data/sample_data_registry.ts index 4ee78da7128e6..7f4967f56e104 100644 --- a/src/plugins/home/server/services/sample_data/sample_data_registry.ts +++ b/src/plugins/home/server/services/sample_data/sample_data_registry.ts @@ -7,7 +7,7 @@ */ import { CoreSetup, PluginInitializerContext } from '@kbn/core/server'; -import { SavedObject } from '@kbn/core/public'; +import type { SavedObject } from '@kbn/core/public'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import { CustomIntegrationsPluginSetup } from '@kbn/custom-integrations-plugin/server'; import { diff --git a/src/plugins/interactive_setup/public/submit_error_callout.test.tsx b/src/plugins/interactive_setup/public/submit_error_callout.test.tsx index 693aad37fdab9..9f22ac3293937 100644 --- a/src/plugins/interactive_setup/public/submit_error_callout.test.tsx +++ b/src/plugins/interactive_setup/public/submit_error_callout.test.tsx @@ -19,7 +19,7 @@ import { ERROR_OUTSIDE_PREBOOT_STAGE, ERROR_PING_FAILURE, } from '../common'; -import { interactiveSetupMock } from '../server/mocks'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { interactiveSetupMock } from '../server/mocks'; import { SubmitErrorCallout } from './submit_error_callout'; describe('SubmitErrorCallout', () => { diff --git a/src/plugins/kibana_utils/demos/state_sync/url.ts b/src/plugins/kibana_utils/demos/state_sync/url.ts index 9d8b9ef352e4a..7594c5192c67f 100644 --- a/src/plugins/kibana_utils/demos/state_sync/url.ts +++ b/src/plugins/kibana_utils/demos/state_sync/url.ts @@ -12,6 +12,7 @@ import { createKbnUrlStateStorage, syncState, INullableBaseStateContainer, + // eslint-disable-next-line @kbn/imports/no_boundary_crossing } from '../../public/state_sync'; const tick = () => new Promise((resolve) => setTimeout(resolve)); diff --git a/src/plugins/presentation_util/common/lib/index.ts b/src/plugins/presentation_util/common/lib/index.ts index 3fe90009ad8df..0839d17e04c92 100644 --- a/src/plugins/presentation_util/common/lib/index.ts +++ b/src/plugins/presentation_util/common/lib/index.ts @@ -7,4 +7,5 @@ */ export * from './utils'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export * from './test_helpers'; diff --git a/src/plugins/presentation_util/common/lib/utils/default_theme.ts b/src/plugins/presentation_util/common/lib/utils/default_theme.ts index fb744534b4e46..36bc59d57f239 100644 --- a/src/plugins/presentation_util/common/lib/utils/default_theme.ts +++ b/src/plugins/presentation_util/common/lib/utils/default_theme.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { CoreTheme } from '@kbn/core/public'; +import type { CoreTheme } from '@kbn/core/public'; import { Observable } from 'rxjs'; export const defaultTheme$: Observable = new Observable((subscriber) => diff --git a/src/plugins/presentation_util/public/services/index.ts b/src/plugins/presentation_util/public/services/index.ts index da840d7d24b2a..a264c8f7049ed 100644 --- a/src/plugins/presentation_util/public/services/index.ts +++ b/src/plugins/presentation_util/public/services/index.ts @@ -11,6 +11,7 @@ import { PluginServices } from './create'; import { PresentationCapabilitiesService } from './capabilities'; import { PresentationDashboardsService } from './dashboards'; import { PresentationLabsService } from './labs'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { registry as stubRegistry } from './stub'; import { PresentationDataViewsService } from './data_views'; import { registerExpressionsLanguage } from '..'; diff --git a/src/plugins/saved_objects_management/public/lib/get_tag_references.ts b/src/plugins/saved_objects_management/public/lib/get_tag_references.ts index fbeec9113cd6d..3ca85a36c8d72 100644 --- a/src/plugins/saved_objects_management/public/lib/get_tag_references.ts +++ b/src/plugins/saved_objects_management/public/lib/get_tag_references.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { SavedObjectsFindOptionsReference } from '@kbn/core/server'; +import type { SavedObjectsFindOptionsReference } from '@kbn/core/server'; import { SavedObjectsTaggingApi } from '@kbn/saved-objects-tagging-oss-plugin/public'; export const getTagFindReferences = ({ diff --git a/src/plugins/share/common/url_service/locators/locator.test.ts b/src/plugins/share/common/url_service/locators/locator.test.ts index 6961d1a9b39d2..996c4f1e23278 100644 --- a/src/plugins/share/common/url_service/locators/locator.test.ts +++ b/src/plugins/share/common/url_service/locators/locator.test.ts @@ -8,7 +8,6 @@ import { LocatorDefinition } from './types'; import { Locator, LocatorDependencies } from './locator'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { KibanaLocation } from '../../../public'; import { LocatorGetUrlParams } from '.'; import { decompressFromBase64 } from 'lz-string'; diff --git a/src/plugins/share/common/url_service/locators/locator.ts b/src/plugins/share/common/url_service/locators/locator.ts index b014a09442aa2..a2603d5d15fc6 100644 --- a/src/plugins/share/common/url_service/locators/locator.ts +++ b/src/plugins/share/common/url_service/locators/locator.ts @@ -7,7 +7,6 @@ */ import type { SerializableRecord } from '@kbn/utility-types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { SavedObjectReference } from '@kbn/core/server'; import { DependencyList } from 'react'; import type { PersistableState } from '@kbn/kibana-utils-plugin/common'; diff --git a/src/plugins/share/common/url_service/locators/locator_client.ts b/src/plugins/share/common/url_service/locators/locator_client.ts index 637c8f7f2718f..941d24e975c7b 100644 --- a/src/plugins/share/common/url_service/locators/locator_client.ts +++ b/src/plugins/share/common/url_service/locators/locator_client.ts @@ -8,8 +8,7 @@ import type { SerializableRecord } from '@kbn/utility-types'; import { MigrateFunctionsObject } from '@kbn/kibana-utils-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import type { LocatorDependencies } from './locator'; import type { LocatorDefinition, LocatorPublic, ILocatorClient, LocatorData } from './types'; import { Locator } from './locator'; diff --git a/src/plugins/vis_types/timelion/server/series_functions/abs.test.js b/src/plugins/vis_types/timelion/server/series_functions/abs.test.js index 75cc0676ab912..9df8e28d58b32 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/abs.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/abs.test.js @@ -11,7 +11,7 @@ import fn from './abs'; import _ from 'lodash'; import expect from '@kbn/expect'; const seriesList = require('./fixtures/series_list')(); -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('abs.js', function () { it('should return the positive value of every value', function () { diff --git a/src/plugins/vis_types/timelion/server/series_functions/aggregate/aggregate.test.js b/src/plugins/vis_types/timelion/server/series_functions/aggregate/aggregate.test.js index d3ddc12ee2d97..162a3df594614 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/aggregate/aggregate.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/aggregate/aggregate.test.js @@ -10,7 +10,7 @@ import fn from '.'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from '../helpers/invoke_series_fn'; +import invoke from '../test_helpers/invoke_series_fn'; describe('aggregate', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/bars.test.js b/src/plugins/vis_types/timelion/server/series_functions/bars.test.js index 751c20d775697..0ba1af724cd9f 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/bars.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/bars.test.js @@ -10,7 +10,7 @@ import fn from './bars'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('bars.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/color.test.js b/src/plugins/vis_types/timelion/server/series_functions/color.test.js index cb6d351f566a8..caa6a4ec441ab 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/color.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/color.test.js @@ -10,7 +10,7 @@ import fn from './color'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('color.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/condition.test.js b/src/plugins/vis_types/timelion/server/series_functions/condition.test.js index aae72031a71c4..7483455700442 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/condition.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/condition.test.js @@ -9,8 +9,8 @@ import fn from './condition'; import moment from 'moment'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; -import getSeriesList from './helpers/get_single_series_list'; +import invoke from './test_helpers/invoke_series_fn'; +import getSeriesList from './test_helpers/get_single_series_list'; import _ from 'lodash'; describe('condition.js', function () { diff --git a/src/plugins/vis_types/timelion/server/series_functions/cusum.test.js b/src/plugins/vis_types/timelion/server/series_functions/cusum.test.js index b842e53329a03..d0db89edc43ee 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/cusum.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/cusum.test.js @@ -10,7 +10,7 @@ import fn from './cusum'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('cusum.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/derivative.test.js b/src/plugins/vis_types/timelion/server/series_functions/derivative.test.js index 7f84e503adca1..65a9f504133a2 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/derivative.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/derivative.test.js @@ -10,7 +10,7 @@ import fn from './derivative'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('derivative.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/divide.test.js b/src/plugins/vis_types/timelion/server/series_functions/divide.test.js index 08275cc460194..ac15265c86c35 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/divide.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/divide.test.js @@ -10,7 +10,7 @@ import fn from './divide'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('divide.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/es/es.test.js b/src/plugins/vis_types/timelion/server/series_functions/es/es.test.js index 6d58158acb322..8a8c03c52bbb4 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/es/es.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/es/es.test.js @@ -16,7 +16,7 @@ import esResponse from '../fixtures/es_response'; import _ from 'lodash'; import sinon from 'sinon'; -import invoke from '../helpers/invoke_series_fn'; +import invoke from '../test_helpers/invoke_series_fn'; import { UI_SETTINGS } from '@kbn/data-plugin/server'; describe('es', () => { diff --git a/src/plugins/vis_types/timelion/server/series_functions/first.test.js b/src/plugins/vis_types/timelion/server/series_functions/first.test.js index 1a1ab41413bcc..af01c153a1fc6 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/first.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/first.test.js @@ -10,7 +10,7 @@ import fn from './first'; import expect from '@kbn/expect'; const seriesList = require('./fixtures/series_list')(); -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('first.js', function () { it('should return exactly the data input', function () { diff --git a/src/plugins/vis_types/timelion/server/series_functions/fit.test.js b/src/plugins/vis_types/timelion/server/series_functions/fit.test.js index 0d1bd315412e9..72cf2863b3fae 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/fit.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/fit.test.js @@ -9,8 +9,8 @@ const fn = require('./fit'); import moment from 'moment'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; -import getSeriesList from './helpers/get_single_series_list'; +import invoke from './test_helpers/invoke_series_fn'; +import getSeriesList from './test_helpers/get_single_series_list'; import _ from 'lodash'; describe('fit.js', function () { diff --git a/src/plugins/vis_types/timelion/server/series_functions/fixtures/series_list.js b/src/plugins/vis_types/timelion/server/series_functions/fixtures/series_list.js index d556c66cff7bb..9046fb262ff10 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/fixtures/series_list.js +++ b/src/plugins/vis_types/timelion/server/series_functions/fixtures/series_list.js @@ -7,8 +7,8 @@ */ import buckets from './bucket_list'; -import getSeries from '../helpers/get_series'; -import getSeriesList from '../helpers/get_series_list'; +import getSeries from '../test_helpers/get_series'; +import getSeriesList from '../test_helpers/get_series_list'; export default function () { return getSeriesList([ diff --git a/src/plugins/vis_types/timelion/server/series_functions/hide.test.js b/src/plugins/vis_types/timelion/server/series_functions/hide.test.js index d7c7e22563535..dd6004068ebff 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/hide.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/hide.test.js @@ -10,7 +10,7 @@ import fn from './hide'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('hide.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/label.test.js b/src/plugins/vis_types/timelion/server/series_functions/label.test.js index 30784aed1992b..d8ed52772bc65 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/label.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/label.test.js @@ -10,7 +10,7 @@ import fn from './label'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('label.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/legend.test.js b/src/plugins/vis_types/timelion/server/series_functions/legend.test.js index d8c175ee7cd27..0f616da412e31 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/legend.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/legend.test.js @@ -9,7 +9,7 @@ import fn from './legend'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('legend.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/lines.test.js b/src/plugins/vis_types/timelion/server/series_functions/lines.test.js index d62c1150b7a64..67e5a5d71d83a 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/lines.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/lines.test.js @@ -9,7 +9,7 @@ import fn from './lines'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('lines.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/log.test.js b/src/plugins/vis_types/timelion/server/series_functions/log.test.js index 7ce5d526faebf..ea7dd00b5c4b7 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/log.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/log.test.js @@ -10,7 +10,7 @@ import fn from './log'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('log.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/max.test.js b/src/plugins/vis_types/timelion/server/series_functions/max.test.js index 4564732abea8f..43b9b5f2ba929 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/max.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/max.test.js @@ -10,7 +10,7 @@ import fn from './max'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('max.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/min.test.js b/src/plugins/vis_types/timelion/server/series_functions/min.test.js index e222e15299b83..b73f79f91fdc4 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/min.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/min.test.js @@ -10,7 +10,7 @@ import fn from './min'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('min.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/movingaverage.test.js b/src/plugins/vis_types/timelion/server/series_functions/movingaverage.test.js index 18dc5d4bfc08b..f51aad36e75a7 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/movingaverage.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/movingaverage.test.js @@ -12,9 +12,9 @@ import expect from '@kbn/expect'; import moment from 'moment'; import _ from 'lodash'; import buckets from './fixtures/bucket_list'; -import getSeries from './helpers/get_series'; -import getSeriesList from './helpers/get_series_list'; -import invoke from './helpers/invoke_series_fn'; +import getSeries from './test_helpers/get_series'; +import getSeriesList from './test_helpers/get_series_list'; +import invoke from './test_helpers/invoke_series_fn'; function getFivePointSeries() { return getSeriesList([ diff --git a/src/plugins/vis_types/timelion/server/series_functions/movingstd.test.js b/src/plugins/vis_types/timelion/server/series_functions/movingstd.test.js index fe4cd7b333afa..0998e0d661dc5 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/movingstd.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/movingstd.test.js @@ -10,9 +10,9 @@ import fn from './movingstd'; import moment from 'moment'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; -import getSeries from './helpers/get_series'; -import getSeriesList from './helpers/get_series_list'; +import invoke from './test_helpers/invoke_series_fn'; +import getSeries from './test_helpers/get_series'; +import getSeriesList from './test_helpers/get_series_list'; describe('movingstd.js', () => { it('computes the moving standard deviation of a list', async () => { diff --git a/src/plugins/vis_types/timelion/server/series_functions/multiply.test.js b/src/plugins/vis_types/timelion/server/series_functions/multiply.test.js index 415e2119808d2..64fc2a89333f0 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/multiply.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/multiply.test.js @@ -10,7 +10,7 @@ import fn from './multiply'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('multiply.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/points.test.js b/src/plugins/vis_types/timelion/server/series_functions/points.test.js index 2f8b97c6bec9f..a9f059df4e61f 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/points.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/points.test.js @@ -10,7 +10,7 @@ import fn from './points'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('points.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/precision.test.js b/src/plugins/vis_types/timelion/server/series_functions/precision.test.js index ac58643847202..2a044b6599b8a 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/precision.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/precision.test.js @@ -10,7 +10,7 @@ import fn from './precision'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('precision.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/range.test.js b/src/plugins/vis_types/timelion/server/series_functions/range.test.js index 2339e6b3a6900..83abd639a2110 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/range.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/range.test.js @@ -10,7 +10,7 @@ import fn from './range'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('range.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/scale_interval.test.js b/src/plugins/vis_types/timelion/server/series_functions/scale_interval.test.js index cc1368f54448f..39010f997c098 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/scale_interval.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/scale_interval.test.js @@ -10,7 +10,7 @@ import fn from './scale_interval'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('scale_interval.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/static.test.js b/src/plugins/vis_types/timelion/server/series_functions/static.test.js index f77dafcc5d992..575ba6102c703 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/static.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/static.test.js @@ -10,7 +10,7 @@ import fn from './static'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('static.js', () => { it('returns a series in which all numbers are the same', () => { diff --git a/src/plugins/vis_types/timelion/server/series_functions/subtract.test.js b/src/plugins/vis_types/timelion/server/series_functions/subtract.test.js index 6d5cb234dcc38..cc92d70703625 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/subtract.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/subtract.test.js @@ -10,7 +10,7 @@ import fn from './subtract'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('subtract.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/sum.test.js b/src/plugins/vis_types/timelion/server/series_functions/sum.test.js index 68f7e5a8f9dfa..f742760e23b14 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/sum.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/sum.test.js @@ -10,7 +10,7 @@ import fn from './sum'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('sum.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/helpers/get_series.js b/src/plugins/vis_types/timelion/server/series_functions/test_helpers/get_series.js similarity index 100% rename from src/plugins/vis_types/timelion/server/series_functions/helpers/get_series.js rename to src/plugins/vis_types/timelion/server/series_functions/test_helpers/get_series.js diff --git a/src/plugins/vis_types/timelion/server/series_functions/helpers/get_series_list.js b/src/plugins/vis_types/timelion/server/series_functions/test_helpers/get_series_list.js similarity index 100% rename from src/plugins/vis_types/timelion/server/series_functions/helpers/get_series_list.js rename to src/plugins/vis_types/timelion/server/series_functions/test_helpers/get_series_list.js diff --git a/src/plugins/vis_types/timelion/server/series_functions/helpers/get_single_series_list.js b/src/plugins/vis_types/timelion/server/series_functions/test_helpers/get_single_series_list.js similarity index 100% rename from src/plugins/vis_types/timelion/server/series_functions/helpers/get_single_series_list.js rename to src/plugins/vis_types/timelion/server/series_functions/test_helpers/get_single_series_list.js diff --git a/src/plugins/vis_types/timelion/server/series_functions/helpers/invoke_series_fn.js b/src/plugins/vis_types/timelion/server/series_functions/test_helpers/invoke_series_fn.js similarity index 100% rename from src/plugins/vis_types/timelion/server/series_functions/helpers/invoke_series_fn.js rename to src/plugins/vis_types/timelion/server/series_functions/test_helpers/invoke_series_fn.js diff --git a/src/plugins/vis_types/timelion/server/series_functions/title.test.js b/src/plugins/vis_types/timelion/server/series_functions/title.test.js index e6eab431a5c5f..53bb5965cc077 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/title.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/title.test.js @@ -10,7 +10,7 @@ import fn from './title'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('title.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/trim.test.js b/src/plugins/vis_types/timelion/server/series_functions/trim.test.js index 7f0ae75045801..7da12e6586b34 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/trim.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/trim.test.js @@ -10,7 +10,7 @@ import fn from './trim'; import _ from 'lodash'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('trim.js', () => { let seriesList; diff --git a/src/plugins/vis_types/timelion/server/series_functions/yaxis.test.js b/src/plugins/vis_types/timelion/server/series_functions/yaxis.test.js index 583da757fd2ea..53896bd805165 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/yaxis.test.js +++ b/src/plugins/vis_types/timelion/server/series_functions/yaxis.test.js @@ -8,7 +8,7 @@ import fn from './yaxis'; import expect from '@kbn/expect'; -import invoke from './helpers/invoke_series_fn'; +import invoke from './test_helpers/invoke_series_fn'; describe('yaxis.js', () => { let seriesList; diff --git a/x-pack/examples/alerting_example/server/plugin.ts b/x-pack/examples/alerting_example/server/plugin.ts index 272611e95ec85..c7460120b34d0 100644 --- a/x-pack/examples/alerting_example/server/plugin.ts +++ b/x-pack/examples/alerting_example/server/plugin.ts @@ -8,7 +8,6 @@ import { Plugin, CoreSetup } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; // import directly to support examples functional tests (@kbn-test/src/functional_tests/lib/babel_register_for_test_plugins.js) -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { DEFAULT_APP_CATEGORIES } from '@kbn/core/utils/default_app_categories'; import { PluginSetupContract as AlertingSetup } from '@kbn/alerting-plugin/server'; import { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; diff --git a/x-pack/plugins/alerting/common/rule.ts b/x-pack/plugins/alerting/common/rule.ts index 609f43db3c337..cfd93f475b883 100644 --- a/x-pack/plugins/alerting/common/rule.ts +++ b/x-pack/plugins/alerting/common/rule.ts @@ -5,11 +5,10 @@ * 2.0. */ -import { +import type { SavedObjectAttribute, SavedObjectAttributes, SavedObjectsResolveResponse, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/core/server'; import { RuleNotifyWhenType } from './rule_notify_when_type'; import { RuleSnooze } from './rule_snooze_type'; diff --git a/x-pack/plugins/apm/common/anomaly_detection/get_anomaly_detection_setup_state.ts b/x-pack/plugins/apm/common/anomaly_detection/get_anomaly_detection_setup_state.ts index de4917ba37d5d..7cfd4cdd00062 100644 --- a/x-pack/plugins/apm/common/anomaly_detection/get_anomaly_detection_setup_state.ts +++ b/x-pack/plugins/apm/common/anomaly_detection/get_anomaly_detection_setup_state.ts @@ -4,9 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { FETCH_STATUS } from '../../public/hooks/use_fetcher'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { APIReturnType } from '../../public/services/rest/create_call_apm_api'; import { ENVIRONMENT_ALL } from '../environment_filter_values'; diff --git a/x-pack/plugins/apm/common/apm_telemetry.ts b/x-pack/plugins/apm/common/apm_telemetry.ts index 562dccdfbef29..d48d8fd25604b 100644 --- a/x-pack/plugins/apm/common/apm_telemetry.ts +++ b/x-pack/plugins/apm/common/apm_telemetry.ts @@ -6,7 +6,7 @@ */ import { produce } from 'immer'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { apmSchema } from '../server/lib/apm_telemetry/schema'; function schemaToMapping(schemaLeaf: any): any { diff --git a/x-pack/plugins/apm/common/fetch_options.ts b/x-pack/plugins/apm/common/fetch_options.ts index 14b8900e6ed26..3d0f9f290cca1 100644 --- a/x-pack/plugins/apm/common/fetch_options.ts +++ b/x-pack/plugins/apm/common/fetch_options.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpFetchOptions } from '@kbn/core/public'; +import type { HttpFetchOptions } from '@kbn/core/public'; export type FetchOptions = Omit & { pathname: string; diff --git a/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx b/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx index f210af92c44ad..76eea019ac83e 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx +++ b/x-pack/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx @@ -20,7 +20,6 @@ import { delay } from '../../../utils/test_helpers'; import { fromQuery } from '../../shared/links/url_helpers'; import { useFailedTransactionsCorrelations } from './use_failed_transactions_correlations'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { APIEndpoint } from '../../../../server'; function wrapper({ diff --git a/x-pack/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx b/x-pack/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx index abf0a54970195..b63327901a028 100644 --- a/x-pack/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx +++ b/x-pack/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx @@ -20,7 +20,6 @@ import { delay } from '../../../utils/test_helpers'; import { fromQuery } from '../../shared/links/url_helpers'; import { useLatencyCorrelations } from './use_latency_correlations'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { APIEndpoint } from '../../../../server'; function wrapper({ diff --git a/x-pack/plugins/apm/public/hooks/use_progressive_fetcher.tsx b/x-pack/plugins/apm/public/hooks/use_progressive_fetcher.tsx index a3268fe8d2958..8d84e90719676 100644 --- a/x-pack/plugins/apm/public/hooks/use_progressive_fetcher.tsx +++ b/x-pack/plugins/apm/public/hooks/use_progressive_fetcher.tsx @@ -16,7 +16,6 @@ import { getProbabilityFromProgressiveLoadingQuality, ProgressiveLoadingQuality, } from '@kbn/observability-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { APMServerRouteRepository } from '../../server'; import type { diff --git a/x-pack/plugins/apm/public/services/rest/create_call_apm_api.ts b/x-pack/plugins/apm/public/services/rest/create_call_apm_api.ts index 4d6ca03ba6a29..9202bf14f5b30 100644 --- a/x-pack/plugins/apm/public/services/rest/create_call_apm_api.ts +++ b/x-pack/plugins/apm/public/services/rest/create_call_apm_api.ts @@ -16,11 +16,7 @@ import { formatRequest } from '@kbn/server-route-repository'; import { InspectResponse } from '@kbn/observability-plugin/typings/common'; import { FetchOptions } from '../../../common/fetch_options'; import { CallApi, callApi } from './call_api'; -import type { - APMServerRouteRepository, - APIEndpoint, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../server'; +import type { APMServerRouteRepository, APIEndpoint } from '../../../server'; export type APMClientOptions = Omit< FetchOptions, diff --git a/x-pack/plugins/apm/public/utils/test_helpers.tsx b/x-pack/plugins/apm/public/utils/test_helpers.tsx index ea8219ed55248..1c0a92f0f6b49 100644 --- a/x-pack/plugins/apm/public/utils/test_helpers.tsx +++ b/x-pack/plugins/apm/public/utils/test_helpers.tsx @@ -23,7 +23,6 @@ import { ESSearchRequest, ESSearchResponse, } from '@kbn/core/types/elasticsearch'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { APMConfig } from '../../server'; import { MockApmPluginContextWrapper } from '../context/apm_plugin/mock_apm_plugin_context'; import { UrlParamsProvider } from '../context/url_params_context/url_params_context'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/index.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/index.ts index 3e1f4af69c69d..52c9f362716fa 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/index.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EmbeddableStart } from '@kbn/embeddable-plugin/public'; +import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; import { embeddableFunctionFactory } from './embeddable'; import { savedLens } from './saved_lens'; import { savedMap } from './saved_map'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts index 2c09f33d7e25d..14c0e11c69acd 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts @@ -6,7 +6,7 @@ */ import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; -import { MapEmbeddableInput } from '@kbn/maps-plugin/public'; +import type { MapEmbeddableInput } from '@kbn/maps-plugin/public'; import { SavedObjectReference } from '@kbn/core/types'; import { getQueryFilters } from '../../../common/lib/build_embeddable_filters'; import { ExpressionValueFilter, MapCenter, TimeRange as TimeRangeArg } from '../../../types'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_search.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_search.ts index 8e9b7c3643098..86c289a27c70d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_search.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_search.ts @@ -6,7 +6,7 @@ */ import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; -import { SearchInput } from '@kbn/discover-plugin/public'; +import type { SearchInput } from '@kbn/discover-plugin/public'; import { SavedObjectReference } from '@kbn/core/types'; import { EmbeddableTypes, diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_visualization.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_visualization.ts index 743dab0f8d744..805a4bc49f5f2 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_visualization.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_visualization.ts @@ -7,7 +7,7 @@ import { omit } from 'lodash'; import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; -import { VisualizeInput } from '@kbn/visualizations-plugin/public'; +import type { VisualizeInput } from '@kbn/visualizations-plugin/public'; import { SavedObjectReference } from '@kbn/core/types'; import { EmbeddableTypes, diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/input_type_to_expression/lens.ts b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/input_type_to_expression/lens.ts index 8f791668d75f9..6653b9efaac22 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/input_type_to_expression/lens.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/input_type_to_expression/lens.ts @@ -7,7 +7,7 @@ import { toExpression as toExpressionString } from '@kbn/interpreter'; import type { PaletteRegistry } from '@kbn/coloring'; -import { SavedLensInput } from '../../../functions/external/saved_lens'; +import type { SavedLensInput } from '../../../functions/external/saved_lens'; export function toExpression(input: SavedLensInput, palettes: PaletteRegistry): string { const expressionParts = [] as string[]; diff --git a/x-pack/plugins/canvas/common/functions/filters.ts b/x-pack/plugins/canvas/common/functions/filters.ts index f33974dd56a49..20da7d710a56f 100644 --- a/x-pack/plugins/canvas/common/functions/filters.ts +++ b/x-pack/plugins/canvas/common/functions/filters.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/public'; +import type { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/public'; import { ExpressionValueFilter } from '../../types'; import { getFunctionHelp } from '../../i18n'; diff --git a/x-pack/plugins/canvas/common/lib/constants.ts b/x-pack/plugins/canvas/common/lib/constants.ts index fa938f2c07c74..08dc0047bb2d4 100644 --- a/x-pack/plugins/canvas/common/lib/constants.ts +++ b/x-pack/plugins/canvas/common/lib/constants.ts @@ -5,6 +5,7 @@ * 2.0. */ +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SHAREABLE_RUNTIME_NAME } from '../../shareable_runtime/constants_static'; import { FilterField } from '../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/all.ts b/x-pack/plugins/canvas/i18n/functions/dict/all.ts index f3fc09848701b..7313201fe1858 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/all.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/all.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { all } from '../../../canvas_plugin_src/functions/common/all'; +import type { all } from '../../../canvas_plugin_src/functions/common/all'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { BOOLEAN_TRUE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/alter_column.ts b/x-pack/plugins/canvas/i18n/functions/dict/alter_column.ts index 795a70abb981a..067240b6b3706 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/alter_column.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/alter_column.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { alterColumn } from '../../../canvas_plugin_src/functions/common/alterColumn'; +import type { alterColumn } from '../../../canvas_plugin_src/functions/common/alterColumn'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE_COLUMN_TYPES } from '../../../common/lib/constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/any.ts b/x-pack/plugins/canvas/i18n/functions/dict/any.ts index b18a08f63f3a5..9915de4d91eea 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/any.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/any.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { any } from '../../../canvas_plugin_src/functions/common/any'; +import type { any } from '../../../canvas_plugin_src/functions/common/any'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { BOOLEAN_TRUE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/as.ts b/x-pack/plugins/canvas/i18n/functions/dict/as.ts index 01fb5dfbae26d..367a99fff30a4 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/as.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/as.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { asFn } from '../../../canvas_plugin_src/functions/common/as'; +import type { asFn } from '../../../canvas_plugin_src/functions/common/as'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/asset.ts b/x-pack/plugins/canvas/i18n/functions/dict/asset.ts index 5edcee2d514a1..d4a87b723be4e 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/asset.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/asset.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { asset } from '../../../public/functions/asset'; +import type { asset } from '../../../public/functions/asset'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/axis_config.ts b/x-pack/plugins/canvas/i18n/functions/dict/axis_config.ts index 8694f21f81e4b..fa3be9673febd 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/axis_config.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/axis_config.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { axisConfig } from '../../../canvas_plugin_src/functions/common/axisConfig'; +import type { axisConfig } from '../../../canvas_plugin_src/functions/common/axisConfig'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { Position } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/case.ts b/x-pack/plugins/canvas/i18n/functions/dict/case.ts index a7b1fef4bd78b..478d7391fd4fa 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/case.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/case.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { caseFn } from '../../../canvas_plugin_src/functions/common/case'; +import type { caseFn } from '../../../canvas_plugin_src/functions/common/case'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/clear.ts b/x-pack/plugins/canvas/i18n/functions/dict/clear.ts index 10d9ee04f6918..e381b99398af6 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/clear.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/clear.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { clear } from '../../../canvas_plugin_src/functions/common/clear'; +import type { clear } from '../../../canvas_plugin_src/functions/common/clear'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT, TYPE_NULL } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/columns.ts b/x-pack/plugins/canvas/i18n/functions/dict/columns.ts index 44cb8200a7820..73f32157686eb 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/columns.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/columns.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { columns } from '../../../canvas_plugin_src/functions/common/columns'; +import type { columns } from '../../../canvas_plugin_src/functions/common/columns'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/compare.ts b/x-pack/plugins/canvas/i18n/functions/dict/compare.ts index 1ebf0044c6a37..05dcf13c95c47 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/compare.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/compare.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { compare, Operation } from '../../../canvas_plugin_src/functions/common/compare'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/container_style.ts b/x-pack/plugins/canvas/i18n/functions/dict/container_style.ts index 64108d272ac78..bad2e9fc13c3b 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/container_style.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/container_style.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { containerStyle } from '../../../canvas_plugin_src/functions/common/containerStyle'; +import type { containerStyle } from '../../../canvas_plugin_src/functions/common/containerStyle'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CSS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/context.ts b/x-pack/plugins/canvas/i18n/functions/dict/context.ts index 89838e42c49ba..708a89449b074 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/context.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/context.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { context } from '../../../canvas_plugin_src/functions/common/context'; +import type { context } from '../../../canvas_plugin_src/functions/common/context'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/csv.ts b/x-pack/plugins/canvas/i18n/functions/dict/csv.ts index 19498dec2e97b..f5b371d994d1c 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/csv.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/csv.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { csv } from '../../../canvas_plugin_src/functions/common/csv'; +import type { csv } from '../../../canvas_plugin_src/functions/common/csv'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE, CSV } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/date.ts b/x-pack/plugins/canvas/i18n/functions/dict/date.ts index 608e82059b9f7..7db00cf9c956a 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/date.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/date.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { date } from '../../../canvas_plugin_src/functions/common/date'; +import type { date } from '../../../canvas_plugin_src/functions/common/date'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { ISO8601, MOMENTJS, JS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/demodata.ts b/x-pack/plugins/canvas/i18n/functions/dict/demodata.ts index 1a56a75a0637c..d4b6cb661debf 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/demodata.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/demodata.ts @@ -6,9 +6,10 @@ */ import { i18n } from '@kbn/i18n'; -import { demodata } from '../../../canvas_plugin_src/functions/server/demodata'; +import type { demodata } from '../../../canvas_plugin_src/functions/server/demodata'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { DemoRows } from '../../../canvas_plugin_src/functions/server/demodata/demo_rows_types'; export const help: FunctionHelp> = { diff --git a/x-pack/plugins/canvas/i18n/functions/dict/do.ts b/x-pack/plugins/canvas/i18n/functions/dict/do.ts index 1badd12b05e2b..6358199befe11 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/do.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/do.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { doFn } from '../../../canvas_plugin_src/functions/common/do'; +import type { doFn } from '../../../canvas_plugin_src/functions/common/do'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/dropdown_control.ts b/x-pack/plugins/canvas/i18n/functions/dict/dropdown_control.ts index 28817e6542547..58a278849021a 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/dropdown_control.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/dropdown_control.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { dropdownControl } from '../../../canvas_plugin_src/functions/common/dropdownControl'; +import type { dropdownControl } from '../../../canvas_plugin_src/functions/common/dropdownControl'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/embeddable.ts b/x-pack/plugins/canvas/i18n/functions/dict/embeddable.ts index 279f58799e8c0..7864087c8a561 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/embeddable.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/embeddable.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { embeddableFunctionFactory } from '../../../canvas_plugin_src/functions/external/embeddable'; +import type { embeddableFunctionFactory } from '../../../canvas_plugin_src/functions/external/embeddable'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/eq.ts b/x-pack/plugins/canvas/i18n/functions/dict/eq.ts index 8ba9c0488c8a7..99000dfceb1db 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/eq.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/eq.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { eq } from '../../../canvas_plugin_src/functions/common/eq'; +import type { eq } from '../../../canvas_plugin_src/functions/common/eq'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/escount.ts b/x-pack/plugins/canvas/i18n/functions/dict/escount.ts index c831213e1f923..743765816c5aa 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/escount.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/escount.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { escount } from '../../../canvas_plugin_src/functions/browser/escount'; +import type { escount } from '../../../canvas_plugin_src/functions/browser/escount'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { ELASTICSEARCH, LUCENE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/esdocs.ts b/x-pack/plugins/canvas/i18n/functions/dict/esdocs.ts index 99979b566f529..e621dbb605241 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/esdocs.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/esdocs.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { esdocs } from '../../../canvas_plugin_src/functions/browser/esdocs'; +import type { esdocs } from '../../../canvas_plugin_src/functions/browser/esdocs'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { ELASTICSEARCH, LUCENE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/exactly.ts b/x-pack/plugins/canvas/i18n/functions/dict/exactly.ts index 088b133127018..7bea509b0f457 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/exactly.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/exactly.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { exactly } from '../../../canvas_plugin_src/functions/common/exactly'; +import type { exactly } from '../../../canvas_plugin_src/functions/common/exactly'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/filterrows.ts b/x-pack/plugins/canvas/i18n/functions/dict/filterrows.ts index faaef67a08b59..c1b12a6d664c5 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/filterrows.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/filterrows.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { filterrows } from '../../../canvas_plugin_src/functions/common/filterrows'; +import type { filterrows } from '../../../canvas_plugin_src/functions/common/filterrows'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE, TYPE_BOOLEAN, BOOLEAN_TRUE, BOOLEAN_FALSE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/filters.ts b/x-pack/plugins/canvas/i18n/functions/dict/filters.ts index d9beacbac2477..a5900dfd9a9b2 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/filters.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/filters.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { filtersFunctionFactory } from '../../../public/functions/filters'; +import type { filtersFunctionFactory } from '../../../public/functions/filters'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/formatdate.ts b/x-pack/plugins/canvas/i18n/functions/dict/formatdate.ts index c085bc029abc3..722bab1434074 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/formatdate.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/formatdate.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { formatdate } from '../../../canvas_plugin_src/functions/common/formatdate'; +import type { formatdate } from '../../../canvas_plugin_src/functions/common/formatdate'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { ISO8601, MOMENTJS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/formatnumber.ts b/x-pack/plugins/canvas/i18n/functions/dict/formatnumber.ts index 1a1735fce29d9..a160fcb427a77 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/formatnumber.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/formatnumber.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { formatnumber } from '../../../canvas_plugin_src/functions/common/formatnumber'; +import type { formatnumber } from '../../../canvas_plugin_src/functions/common/formatnumber'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { NUMERALJS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/get_cell.ts b/x-pack/plugins/canvas/i18n/functions/dict/get_cell.ts index b66e6c7f7066f..de77e5adea028 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/get_cell.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/get_cell.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { getCell } from '../../../canvas_plugin_src/functions/common/getCell'; +import type { getCell } from '../../../canvas_plugin_src/functions/common/getCell'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/gt.ts b/x-pack/plugins/canvas/i18n/functions/dict/gt.ts index 53a177b7a7ef7..99481663303c0 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/gt.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/gt.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { gt } from '../../../canvas_plugin_src/functions/common/gt'; +import type { gt } from '../../../canvas_plugin_src/functions/common/gt'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/gte.ts b/x-pack/plugins/canvas/i18n/functions/dict/gte.ts index b51b7978212aa..d965c5612e5f3 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/gte.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/gte.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { gte } from '../../../canvas_plugin_src/functions/common/gte'; +import type { gte } from '../../../canvas_plugin_src/functions/common/gte'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/head.ts b/x-pack/plugins/canvas/i18n/functions/dict/head.ts index 9a718debdf74e..69670bd377294 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/head.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/head.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { head } from '../../../canvas_plugin_src/functions/common/head'; +import type { head } from '../../../canvas_plugin_src/functions/common/head'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/if.ts b/x-pack/plugins/canvas/i18n/functions/dict/if.ts index 9413ce8fa9261..3a9b163204626 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/if.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/if.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ifFn } from '../../../canvas_plugin_src/functions/common/if'; +import type { ifFn } from '../../../canvas_plugin_src/functions/common/if'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { BOOLEAN_TRUE, BOOLEAN_FALSE, CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/join_rows.ts b/x-pack/plugins/canvas/i18n/functions/dict/join_rows.ts index 955af300d5414..7eb8f0614d5e6 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/join_rows.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/join_rows.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { joinRows } from '../../../canvas_plugin_src/functions/common/join_rows'; +import type { joinRows } from '../../../canvas_plugin_src/functions/common/join_rows'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/location.ts b/x-pack/plugins/canvas/i18n/functions/dict/location.ts index dcea17c71e1a7..d29bf6df726f5 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/location.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/location.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { location } from '../../../canvas_plugin_src/functions/browser/location'; +import type { location } from '../../../canvas_plugin_src/functions/browser/location'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/lt.ts b/x-pack/plugins/canvas/i18n/functions/dict/lt.ts index 86663a129c8f7..98542ca4fcec7 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/lt.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/lt.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { lt } from '../../../canvas_plugin_src/functions/common/lt'; +import type { lt } from '../../../canvas_plugin_src/functions/common/lt'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/lte.ts b/x-pack/plugins/canvas/i18n/functions/dict/lte.ts index b8623d022b03c..148db5c929695 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/lte.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/lte.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { lte } from '../../../canvas_plugin_src/functions/common/lte'; +import type { lte } from '../../../canvas_plugin_src/functions/common/lte'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/map_center.ts b/x-pack/plugins/canvas/i18n/functions/dict/map_center.ts index 99d607e05b03c..1a554daa929b7 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/map_center.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/map_center.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { mapCenter } from '../../../canvas_plugin_src/functions/common/map_center'; +import type { mapCenter } from '../../../canvas_plugin_src/functions/common/map_center'; import { FunctionHelp } from '..'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/markdown.ts b/x-pack/plugins/canvas/i18n/functions/dict/markdown.ts index 7770cb7deb04d..06d009e28b6ac 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/markdown.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/markdown.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { markdown } from '../../../canvas_plugin_src/functions/browser/markdown'; +import type { markdown } from '../../../canvas_plugin_src/functions/browser/markdown'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { MARKDOWN, CSS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/neq.ts b/x-pack/plugins/canvas/i18n/functions/dict/neq.ts index efe1a43a44cd9..8af1ec88bf3a1 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/neq.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/neq.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { neq } from '../../../canvas_plugin_src/functions/common/neq'; +import type { neq } from '../../../canvas_plugin_src/functions/common/neq'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/pie.ts b/x-pack/plugins/canvas/i18n/functions/dict/pie.ts index 7b02935b1fc55..f12009cc0e58d 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/pie.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/pie.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { pieFunctionFactory } from '../../../public/functions/pie'; +import type { pieFunctionFactory } from '../../../public/functions/pie'; import { FunctionFactoryHelp } from '../function_help'; import { Legend } from '../../../types'; import { CSS, FONT_FAMILY, FONT_WEIGHT, BOOLEAN_FALSE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/plot.ts b/x-pack/plugins/canvas/i18n/functions/dict/plot.ts index 9a0f88746759d..e47e7a67515e5 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/plot.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/plot.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { plotFunctionFactory } from '../../../public/functions/plot'; +import type { plotFunctionFactory } from '../../../public/functions/plot'; import { FunctionFactoryHelp } from '../function_help'; import { Legend } from '../../../types'; import { CSS, FONT_FAMILY, FONT_WEIGHT, BOOLEAN_FALSE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/ply.ts b/x-pack/plugins/canvas/i18n/functions/dict/ply.ts index b5bae61a49cf8..eae5eb3645d7d 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/ply.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/ply.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ply } from '../../../canvas_plugin_src/functions/common/ply'; +import type { ply } from '../../../canvas_plugin_src/functions/common/ply'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/pointseries.ts b/x-pack/plugins/canvas/i18n/functions/dict/pointseries.ts index 30a3918bbe69f..c9bb28f8e00c9 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/pointseries.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/pointseries.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { pointseries } from '../../../canvas_plugin_src/functions/server/pointseries'; +import type { pointseries } from '../../../canvas_plugin_src/functions/server/pointseries'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE, TINYMATH, TINYMATH_URL } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/render.ts b/x-pack/plugins/canvas/i18n/functions/dict/render.ts index 6b582222cf745..fcfb19454370b 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/render.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/render.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { render } from '../../../canvas_plugin_src/functions/common/render'; +import type { render } from '../../../canvas_plugin_src/functions/common/render'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT, CSS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/replace.ts b/x-pack/plugins/canvas/i18n/functions/dict/replace.ts index 31993c1f00813..2ae0d693047d7 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/replace.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/replace.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { replace } from '../../../canvas_plugin_src/functions/common/replace'; +import type { replace } from '../../../canvas_plugin_src/functions/common/replace'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { JS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/rounddate.ts b/x-pack/plugins/canvas/i18n/functions/dict/rounddate.ts index 883114ca7ad92..b288498ba85dd 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/rounddate.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/rounddate.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { rounddate } from '../../../canvas_plugin_src/functions/common/rounddate'; +import type { rounddate } from '../../../canvas_plugin_src/functions/common/rounddate'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { MOMENTJS } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/row_count.ts b/x-pack/plugins/canvas/i18n/functions/dict/row_count.ts index 5deb2d0bcb956..cbb94431e2efc 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/row_count.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/row_count.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { rowCount } from '../../../canvas_plugin_src/functions/common/rowCount'; +import type { rowCount } from '../../../canvas_plugin_src/functions/common/rowCount'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/saved_lens.ts b/x-pack/plugins/canvas/i18n/functions/dict/saved_lens.ts index 9ddb2a0d793a2..93a508b2bcdd5 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/saved_lens.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/saved_lens.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { savedLens } from '../../../canvas_plugin_src/functions/external/saved_lens'; +import type { savedLens } from '../../../canvas_plugin_src/functions/external/saved_lens'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/saved_map.ts b/x-pack/plugins/canvas/i18n/functions/dict/saved_map.ts index 2d44b7aa07c38..fc191ddbccb2d 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/saved_map.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/saved_map.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { savedMap } from '../../../canvas_plugin_src/functions/external/saved_map'; +import type { savedMap } from '../../../canvas_plugin_src/functions/external/saved_map'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts b/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts index d441814105b3f..7cdac8909c6ec 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { savedSearch } from '../../../canvas_plugin_src/functions/external/saved_search'; +import type { savedSearch } from '../../../canvas_plugin_src/functions/external/saved_search'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/saved_visualization.ts b/x-pack/plugins/canvas/i18n/functions/dict/saved_visualization.ts index 1558591886018..86104221fc33e 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/saved_visualization.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/saved_visualization.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { savedVisualization } from '../../../canvas_plugin_src/functions/external/saved_visualization'; +import type { savedVisualization } from '../../../canvas_plugin_src/functions/external/saved_visualization'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/series_style.ts b/x-pack/plugins/canvas/i18n/functions/dict/series_style.ts index f49f678f56d34..24bc30aa068b5 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/series_style.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/series_style.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { seriesStyle } from '../../../canvas_plugin_src/functions/common/seriesStyle'; +import type { seriesStyle } from '../../../canvas_plugin_src/functions/common/seriesStyle'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/sort.ts b/x-pack/plugins/canvas/i18n/functions/dict/sort.ts index 2d719629e9666..13c49b71701c2 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/sort.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/sort.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { sort } from '../../../canvas_plugin_src/functions/common/sort'; +import type { sort } from '../../../canvas_plugin_src/functions/common/sort'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/static_column.ts b/x-pack/plugins/canvas/i18n/functions/dict/static_column.ts index a27c1491fc0af..0fffdef78af5a 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/static_column.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/static_column.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { staticColumn } from '../../../canvas_plugin_src/functions/common/staticColumn'; +import type { staticColumn } from '../../../canvas_plugin_src/functions/common/staticColumn'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/string.ts b/x-pack/plugins/canvas/i18n/functions/dict/string.ts index 4a4bba0e66ef4..753c76e2d200e 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/string.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/string.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { string } from '../../../canvas_plugin_src/functions/common/string'; +import type { string } from '../../../canvas_plugin_src/functions/common/string'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/switch.ts b/x-pack/plugins/canvas/i18n/functions/dict/switch.ts index 74d78b9cd786f..46e0ca13a7451 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/switch.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/switch.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { switchFn } from '../../../canvas_plugin_src/functions/common/switch'; +import type { switchFn } from '../../../canvas_plugin_src/functions/common/switch'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/table.ts b/x-pack/plugins/canvas/i18n/functions/dict/table.ts index e09d49b1d4a71..6e7e8e9b93e91 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/table.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/table.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { table } from '../../../canvas_plugin_src/functions/common/table'; +import type { table } from '../../../canvas_plugin_src/functions/common/table'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CSS, FONT_FAMILY, FONT_WEIGHT, BOOLEAN_FALSE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/tail.ts b/x-pack/plugins/canvas/i18n/functions/dict/tail.ts index 9c980a73d1562..137d1f675b5d7 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/tail.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/tail.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { tail } from '../../../canvas_plugin_src/functions/common/tail'; +import type { tail } from '../../../canvas_plugin_src/functions/common/tail'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { DATATABLE } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/time_range.ts b/x-pack/plugins/canvas/i18n/functions/dict/time_range.ts index 386774e4bea20..5e618179e4965 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/time_range.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/time_range.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { timerange } from '../../../canvas_plugin_src/functions/common/time_range'; +import type { timerange } from '../../../canvas_plugin_src/functions/common/time_range'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/timefilter.ts b/x-pack/plugins/canvas/i18n/functions/dict/timefilter.ts index 27d8f5c1a4d56..7dd47f0ff6973 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/timefilter.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/timefilter.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { timefilter } from '../../../canvas_plugin_src/functions/common/timefilter'; +import type { timefilter } from '../../../canvas_plugin_src/functions/common/timefilter'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { ISO8601, ELASTICSEARCH, DATEMATH } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/timefilter_control.ts b/x-pack/plugins/canvas/i18n/functions/dict/timefilter_control.ts index 676acdeb5d63e..b27e0b7bc5ee2 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/timefilter_control.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/timefilter_control.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { timefilterControl } from '../../../canvas_plugin_src/functions/common/timefilterControl'; +import type { timefilterControl } from '../../../canvas_plugin_src/functions/common/timefilterControl'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/timelion.ts b/x-pack/plugins/canvas/i18n/functions/dict/timelion.ts index 09206382df65f..8a7cfac0701a4 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/timelion.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/timelion.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { timelionFunctionFactory } from '../../../public/functions/timelion'; +import type { timelionFunctionFactory } from '../../../public/functions/timelion'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { ELASTICSEARCH, DATEMATH, MOMENTJS_TIMEZONE_URL } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/to.ts b/x-pack/plugins/canvas/i18n/functions/dict/to.ts index fed1d10115042..445da1dc7ef9e 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/to.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/to.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { toFunctionFactory } from '../../../public/functions/to'; +import type { toFunctionFactory } from '../../../public/functions/to'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { CONTEXT } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/functions/dict/urlparam.ts b/x-pack/plugins/canvas/i18n/functions/dict/urlparam.ts index 5ce33cfa6c0c5..1a051fa21d76f 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/urlparam.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/urlparam.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { urlparam } from '../../../canvas_plugin_src/functions/browser/urlparam'; +import type { urlparam } from '../../../canvas_plugin_src/functions/browser/urlparam'; import { FunctionHelp } from '../function_help'; import { FunctionFactory } from '../../../types'; import { TYPE_STRING, URL } from '../../constants'; diff --git a/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts b/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts index e4eb4f2842008..26c5e36ad9e09 100644 --- a/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts +++ b/x-pack/plugins/canvas/i18n/templates/template_strings.test.ts @@ -6,7 +6,6 @@ */ import { getTemplateStrings } from './template_strings'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { loadTemplates } from '../../server/templates'; import { TagStrings } from '../tags'; diff --git a/x-pack/plugins/canvas/public/components/hooks/workpad/use_download_workpad.ts b/x-pack/plugins/canvas/public/components/hooks/workpad/use_download_workpad.ts index b688bb5a3b1a5..dadf03a8fac5a 100644 --- a/x-pack/plugins/canvas/public/components/hooks/workpad/use_download_workpad.ts +++ b/x-pack/plugins/canvas/public/components/hooks/workpad/use_download_workpad.ts @@ -10,7 +10,7 @@ import fileSaver from 'file-saver'; import { i18n } from '@kbn/i18n'; import { useNotifyService, useWorkpadService } from '../../../services'; import { CanvasWorkpad } from '../../../../types'; -import { CanvasRenderedWorkpad } from '../../../../shareable_runtime/types'; +import type { CanvasRenderedWorkpad } from '../../../../shareable_runtime/types'; const strings = { getDownloadFailureErrorMessage: () => diff --git a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.component.tsx b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.component.tsx index 4ad27791c3292..42326d1b6e0c8 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.component.tsx +++ b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.component.tsx @@ -24,7 +24,7 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { CanvasRenderedWorkpad } from '../../../../../shareable_runtime/types'; +import type { CanvasRenderedWorkpad } from '../../../../../shareable_runtime/types'; import { useDownloadRenderedWorkpad } from '../../../hooks'; import { useDownloadRuntime, useDownloadZippedRuntime } from './hooks'; import { ZIP, CANVAS, HTML } from '../../../../../i18n/constants'; diff --git a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx index 9b7a6435f5f5c..31142a15e7596 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx +++ b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx @@ -16,7 +16,8 @@ import { import { ShareWebsiteFlyout as FlyoutComponent } from './flyout.component'; import { State, CanvasWorkpad } from '../../../../../types'; -import { CanvasRenderedWorkpad } from '../../../../../shareable_runtime/types'; +import type { CanvasRenderedWorkpad } from '../../../../../shareable_runtime/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { renderFunctionNames } from '../../../../../shareable_runtime/supported_renderers'; import { OnCloseFn } from '../share_menu.component'; diff --git a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts index dc2e4ff685ca5..cb158fd3958c1 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts +++ b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts @@ -12,7 +12,7 @@ import { API_ROUTE_SHAREABLE_RUNTIME_DOWNLOAD } from '../../../../../../common/l import { ZIP } from '../../../../../../i18n/constants'; import { usePlatformService, useNotifyService, useWorkpadService } from '../../../../../services'; -import { CanvasRenderedWorkpad } from '../../../../../../shareable_runtime/types'; +import type { CanvasRenderedWorkpad } from '../../../../../../shareable_runtime/types'; const strings = { getDownloadRuntimeFailureErrorMessage: () => diff --git a/x-pack/plugins/canvas/public/services/workpad.ts b/x-pack/plugins/canvas/public/services/workpad.ts index 82a29cea8de21..72996f54c158d 100644 --- a/x-pack/plugins/canvas/public/services/workpad.ts +++ b/x-pack/plugins/canvas/public/services/workpad.ts @@ -7,7 +7,7 @@ import { ResolvedSimpleSavedObject } from '@kbn/core/public'; import { CanvasWorkpad, CanvasTemplate } from '../../types'; -import { CanvasRenderedWorkpad } from '../../shareable_runtime/types'; +import type { CanvasRenderedWorkpad } from '../../shareable_runtime/types'; export type FoundWorkpads = Array>; export type FoundWorkpad = FoundWorkpads[number]; diff --git a/x-pack/plugins/canvas/public/state/selectors/workpad.ts b/x-pack/plugins/canvas/public/state/selectors/workpad.ts index 557a6b8acc4e7..359cab63395e4 100644 --- a/x-pack/plugins/canvas/public/state/selectors/workpad.ts +++ b/x-pack/plugins/canvas/public/state/selectors/workpad.ts @@ -7,7 +7,7 @@ import { get, omit } from 'lodash'; import { safeElementFromExpression, fromExpression } from '@kbn/interpreter'; -import { CanvasRenderedWorkpad } from '../../../shareable_runtime/types'; +import type { CanvasRenderedWorkpad } from '../../../shareable_runtime/types'; import { append } from '../../lib/modify_path'; import { getAssets } from './assets'; import { diff --git a/x-pack/plugins/canvas/server/routes/shareables/download.ts b/x-pack/plugins/canvas/server/routes/shareables/download.ts index 27b3765d240ec..bec6d3fb194e8 100644 --- a/x-pack/plugins/canvas/server/routes/shareables/download.ts +++ b/x-pack/plugins/canvas/server/routes/shareables/download.ts @@ -6,6 +6,7 @@ */ import { readFileSync } from 'fs'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SHAREABLE_RUNTIME_FILE } from '../../../shareable_runtime/constants'; import { RouteInitializerDeps } from '..'; import { API_ROUTE_SHAREABLE_RUNTIME_DOWNLOAD } from '../../../common/lib/constants'; diff --git a/x-pack/plugins/canvas/server/routes/shareables/zip.ts b/x-pack/plugins/canvas/server/routes/shareables/zip.ts index 3bc208a57a566..a0fba57ba6390 100644 --- a/x-pack/plugins/canvas/server/routes/shareables/zip.ts +++ b/x-pack/plugins/canvas/server/routes/shareables/zip.ts @@ -11,6 +11,7 @@ import { SHAREABLE_RUNTIME_FILE, SHAREABLE_RUNTIME_NAME, SHAREABLE_RUNTIME_SRC, + // eslint-disable-next-line @kbn/imports/no_boundary_crossing } from '../../../shareable_runtime/constants'; import { RenderedWorkpadSchema } from './rendered_workpad_schema'; import { RouteInitializerDeps } from '..'; diff --git a/x-pack/plugins/canvas/server/saved_objects/migrations/types.ts b/x-pack/plugins/canvas/server/saved_objects/migrations/types.ts index 366e29bf65d2c..c2ee975d5bedc 100644 --- a/x-pack/plugins/canvas/server/saved_objects/migrations/types.ts +++ b/x-pack/plugins/canvas/server/saved_objects/migrations/types.ts @@ -4,8 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ExpressionsServiceSetup } from '@kbn/expressions-plugin/public'; +import type { ExpressionsServiceSetup } from '@kbn/expressions-plugin/public'; export interface CanvasSavedObjectTypeMigrationsDeps { expressions: ExpressionsServiceSetup; diff --git a/x-pack/plugins/canvas/shareable_runtime/index.ts b/x-pack/plugins/canvas/shareable_runtime/index.ts index 08de4d4c7ae85..41ecd875c4326 100644 --- a/x-pack/plugins/canvas/shareable_runtime/index.ts +++ b/x-pack/plugins/canvas/shareable_runtime/index.ts @@ -6,7 +6,6 @@ */ export * from './api'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import '@kbn/core/server/core_app/assets/legacy_light_theme.css'; import '../public/style/index.scss'; import '@elastic/eui/dist/eui_theme_light.css'; diff --git a/x-pack/plugins/canvas/types/filters.ts b/x-pack/plugins/canvas/types/filters.ts index 8529b37e40b1b..1928ccdf27f17 100644 --- a/x-pack/plugins/canvas/types/filters.ts +++ b/x-pack/plugins/canvas/types/filters.ts @@ -6,7 +6,7 @@ */ import { FC } from 'react'; -import { ExpressionValueFilter } from '.'; +import { ExpressionValueFilter } from '@kbn/expressions-plugin/common'; export enum FilterType { luceneQueryString = 'luceneQueryString', diff --git a/x-pack/plugins/canvas/types/functions.ts b/x-pack/plugins/canvas/types/functions.ts index fc5f48dd901e3..5dd57c00cc499 100644 --- a/x-pack/plugins/canvas/types/functions.ts +++ b/x-pack/plugins/canvas/types/functions.ts @@ -6,11 +6,11 @@ */ import { ExpressionFunctionDefinition } from '@kbn/expressions-plugin/common'; -import { functions as commonFunctions } from '../canvas_plugin_src/functions/common'; -import { functions as browserFunctions } from '../canvas_plugin_src/functions/browser'; -import { functions as serverFunctions } from '../canvas_plugin_src/functions/server'; -import { initFunctions as initExternalFunctions } from '../canvas_plugin_src/functions/external'; -import { initFunctions as initClientFunctions } from '../public/functions'; +import type { functions as commonFunctions } from '../canvas_plugin_src/functions/common'; +import type { functions as browserFunctions } from '../canvas_plugin_src/functions/browser'; +import type { functions as serverFunctions } from '../canvas_plugin_src/functions/server'; +import type { initFunctions as initExternalFunctions } from '../canvas_plugin_src/functions/external'; +import type { initFunctions as initClientFunctions } from '../public/functions'; /** * A `ExpressionFunctionFactory` is a powerful type used for any function that produces diff --git a/x-pack/plugins/canvas/types/state.ts b/x-pack/plugins/canvas/types/state.ts index 3946e7388c836..63caba64fe710 100644 --- a/x-pack/plugins/canvas/types/state.ts +++ b/x-pack/plugins/canvas/types/state.ts @@ -16,7 +16,7 @@ import { Style, Range, } from '@kbn/expressions-plugin/common'; -import { Datasource, Model, Transform, View } from '../public/expression_types'; +import type { Datasource, Model, Transform, View } from '../public/expression_types'; import { AssetType } from './assets'; import { CanvasWorkpad, Sidebar, Flyouts } from './canvas'; diff --git a/x-pack/plugins/canvas/types/telemetry.ts b/x-pack/plugins/canvas/types/telemetry.ts index 6e46b8c4cbe69..2f9f6d48ecda7 100644 --- a/x-pack/plugins/canvas/types/telemetry.ts +++ b/x-pack/plugins/canvas/types/telemetry.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; /** Function for collecting information about canvas usage diff --git a/x-pack/plugins/cases/common/api/connectors/index.ts b/x-pack/plugins/cases/common/api/connectors/index.ts index e1e110913de74..5f73f3ae493ac 100644 --- a/x-pack/plugins/cases/common/api/connectors/index.ts +++ b/x-pack/plugins/cases/common/api/connectors/index.ts @@ -14,7 +14,6 @@ import type { ActionType } from '@kbn/actions-plugin/common'; * disable the linting for the moment */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ActionResult } from '@kbn/actions-plugin/server/types'; import { JiraFieldsRT } from './jira'; import { ResilientFieldsRT } from './resilient'; diff --git a/x-pack/plugins/cases/public/common/mock/register_connectors.ts b/x-pack/plugins/cases/public/common/mock/register_connectors.ts index ee7063141a693..594f4f96b4c8e 100644 --- a/x-pack/plugins/cases/public/common/mock/register_connectors.ts +++ b/x-pack/plugins/cases/public/common/mock/register_connectors.ts @@ -6,7 +6,6 @@ */ import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { actionTypeRegistryMock } from '@kbn/triggers-actions-ui-plugin/public/application/action_type_registry.mock'; import { CaseActionConnector } from '../../../common/ui/types'; diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.tsx index 2068e6287dadb..edffb7e192214 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.tsx @@ -11,7 +11,6 @@ import styled, { css } from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiCallOut, EuiLink } from '@elastic/eui'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ActionConnectorTableItem } from '@kbn/triggers-actions-ui-plugin/public/types'; import { CasesConnectorFeatureId } from '@kbn/actions-plugin/common'; import { useKibana } from '../../common/lib/kibana'; diff --git a/x-pack/plugins/cases/server/client/attachments/delete.ts b/x-pack/plugins/cases/server/client/attachments/delete.ts index 4a4082c3904c6..e8ac07d78527f 100644 --- a/x-pack/plugins/cases/server/client/attachments/delete.ts +++ b/x-pack/plugins/cases/server/client/attachments/delete.ts @@ -8,7 +8,7 @@ import Boom from '@hapi/boom'; import pMap from 'p-map'; -import { SavedObject } from '@kbn/core/public'; +import { SavedObject } from '@kbn/core/server'; import { Actions, ActionTypes, CommentAttributes } from '../../../common/api'; import { CASE_SAVED_OBJECT, MAX_CONCURRENT_SEARCHES } from '../../../common/constants'; import { CasesClientArgs } from '../types'; diff --git a/x-pack/plugins/cases/server/client/cases/types.ts b/x-pack/plugins/cases/server/client/cases/types.ts index 7a9abe061d8cd..61969deef4371 100644 --- a/x-pack/plugins/cases/server/client/cases/types.ts +++ b/x-pack/plugins/cases/server/client/cases/types.ts @@ -5,7 +5,6 @@ * 2.0. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { PushToServiceApiParams as JiraPushToServiceApiParams, Incident as JiraIncident, diff --git a/x-pack/plugins/cases/server/client/configure/client.ts b/x-pack/plugins/cases/server/client/configure/client.ts index abd57c7e07ed5..8efc9d82ea322 100644 --- a/x-pack/plugins/cases/server/client/configure/client.ts +++ b/x-pack/plugins/cases/server/client/configure/client.ts @@ -12,7 +12,6 @@ import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { SavedObject, SavedObjectsFindResponse, SavedObjectsUtils } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { FindActionResult } from '@kbn/actions-plugin/server/types'; import { ActionType, CasesConnectorFeatureId } from '@kbn/actions-plugin/common'; import { diff --git a/x-pack/plugins/cases/server/types.ts b/x-pack/plugins/cases/server/types.ts index 6689fd5a1c16e..3fe3c0cd72d90 100644 --- a/x-pack/plugins/cases/server/types.ts +++ b/x-pack/plugins/cases/server/types.ts @@ -11,7 +11,6 @@ import { ActionTypeSecrets, ActionTypeParams, ActionType, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/actions-plugin/server/types'; import { CasesClient } from './client'; import { AttachmentFramework } from './attachment_framework/types'; diff --git a/x-pack/plugins/data_visualizer/common/constants.ts b/x-pack/plugins/data_visualizer/common/constants.ts index 57d774a94974c..c4d3c0abac24f 100644 --- a/x-pack/plugins/data_visualizer/common/constants.ts +++ b/x-pack/plugins/data_visualizer/common/constants.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { KBN_FIELD_TYPES } from '@kbn/data-plugin/common'; -import { DocLinksStart } from '@kbn/core/public'; +import type { DocLinksStart } from '@kbn/core/public'; export const APP_ID = 'data_visualizer'; export const UI_SETTING_MAX_FILE_SIZE = 'fileUpload:maxFileSize'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx index f7702adaf293d..52bd440fcf499 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx @@ -13,7 +13,6 @@ import { MapEmbeddable, MapEmbeddableInput, MapEmbeddableOutput, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/maps-plugin/public/embeddable'; import { MAP_SAVED_OBJECT_TYPE, RenderTooltipContentParams } from '@kbn/maps-plugin/public'; import { diff --git a/x-pack/plugins/enterprise_search/common/types/api.ts b/x-pack/plugins/enterprise_search/common/types/api.ts index 786a084e1598d..71ea380711d3f 100644 --- a/x-pack/plugins/enterprise_search/common/types/api.ts +++ b/x-pack/plugins/enterprise_search/common/types/api.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpResponse } from '@kbn/core/public'; +import type { HttpResponse } from '@kbn/core/public'; import { ErrorCode } from './error_codes'; diff --git a/x-pack/plugins/fleet/common/index.ts b/x-pack/plugins/fleet/common/index.ts index 0b115a1cd1e59..ced5c17f55f6f 100644 --- a/x-pack/plugins/fleet/common/index.ts +++ b/x-pack/plugins/fleet/common/index.ts @@ -64,6 +64,7 @@ export { } from './services'; export type { FleetAuthz } from './authz'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { createFleetAuthzMock } from './mocks'; export type { // Request/Response diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts index cd544eef82150..41c25c6d4fd66 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.test.ts @@ -7,7 +7,6 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { savedObjectsClientMock } from '@kbn/core/server/saved_objects/service/saved_objects_client.mock'; import type { EsAssetReference } from '../../../../../common/types/models'; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts index 3155380b6c365..574d7f2627b42 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform.test.ts @@ -22,7 +22,6 @@ import { errors } from '@elastic/elasticsearch'; import type { SavedObject, SavedObjectsClientContract } from '@kbn/core/server'; import { loggerMock } from '@kbn/logging-mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { savedObjectsClientMock } from '@kbn/core/server/saved_objects/service/saved_objects_client.mock'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx index 76bc66b2f1df8..48918312be601 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/setup_environment.tsx @@ -8,7 +8,6 @@ import React, { ComponentType, MemoExoticComponent } from 'react'; import SemVer from 'semver/classes/semver'; -/* eslint-disable-next-line @kbn/eslint/no-restricted-paths */ import '@kbn/es-ui-shared-plugin/public/components/code_editor/jest_mock'; import { GlobalFlyout } from '@kbn/es-ui-shared-plugin/public'; import { docLinksServiceMock, uiSettingsServiceMock } from '@kbn/core/public/mocks'; diff --git a/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts b/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts index a8b488fb54c9a..a053eb44657cb 100644 --- a/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts +++ b/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { Privileges } from '@kbn/es-ui-shared-plugin/public'; +import type { Privileges } from '@kbn/es-ui-shared-plugin/public'; import { RouteDependencies } from '../../../types'; import { addBasePath } from '..'; diff --git a/x-pack/plugins/infra/common/inventory_models/aws_ec2/layout.tsx b/x-pack/plugins/infra/common/inventory_models/aws_ec2/layout.tsx index 4d676dfce8ecb..fccbdf814bb17 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_ec2/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_ec2/layout.tsx @@ -8,17 +8,16 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { MetadataDetails } from '../../../public/pages/metrics/metric_detail/components/metadata_details'; export const Layout = withTheme(({ metrics, theme, onChangeRangeTime }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/aws_ec2/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/aws_ec2/toolbar_items.tsx index c4f2d3479023b..bb94f05d62011 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_ec2/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_ec2/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { CloudToolbarItems } from '../shared/components/cloud_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/aws_rds/layout.tsx b/x-pack/plugins/infra/common/inventory_models/aws_rds/layout.tsx index 96d82343f593c..3c52b6ec623d8 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_rds/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_rds/layout.tsx @@ -8,15 +8,14 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/aws_rds/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/aws_rds/toolbar_items.tsx index e39ad5ee0f06e..d952aac75f456 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_rds/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_rds/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { CloudToolbarItems } from '../shared/components/cloud_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/aws_s3/layout.tsx b/x-pack/plugins/infra/common/inventory_models/aws_s3/layout.tsx index d068748f134a5..1452f04e4f380 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_s3/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_s3/layout.tsx @@ -8,15 +8,14 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/aws_s3/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/aws_s3/toolbar_items.tsx index 064224e92319c..11e0e172e1d06 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_s3/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_s3/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { CloudToolbarItems } from '../shared/components/cloud_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/aws_sqs/layout.tsx b/x-pack/plugins/infra/common/inventory_models/aws_sqs/layout.tsx index a06e5b0bb1add..869105fbd44d8 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_sqs/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_sqs/layout.tsx @@ -8,15 +8,14 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/aws_sqs/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/aws_sqs/toolbar_items.tsx index 3a01cd83e1e64..e58ad2b3c31fc 100644 --- a/x-pack/plugins/infra/common/inventory_models/aws_sqs/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/aws_sqs/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { CloudToolbarItems } from '../shared/components/cloud_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/container/layout.tsx b/x-pack/plugins/infra/common/inventory_models/container/layout.tsx index ec1260ab6100a..9f39385a64b01 100644 --- a/x-pack/plugins/infra/common/inventory_models/container/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/container/layout.tsx @@ -8,19 +8,18 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { GaugesSectionVis } from '../../../public/pages/metrics/metric_detail/components/gauges_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { MetadataDetails } from '../../../public/pages/metrics/metric_detail/components/metadata_details'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/container/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/container/toolbar_items.tsx index 640d0c8eced9d..62698b586a682 100644 --- a/x-pack/plugins/infra/common/inventory_models/container/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/container/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/host/layout.tsx b/x-pack/plugins/infra/common/inventory_models/host/layout.tsx index 0f634048a5a8b..40ef6055cb0aa 100644 --- a/x-pack/plugins/infra/common/inventory_models/host/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/host/layout.tsx @@ -8,21 +8,20 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { GaugesSectionVis } from '../../../public/pages/metrics/metric_detail/components/gauges_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; import * as Aws from '../shared/layouts/aws'; import * as Ngnix from '../shared/layouts/nginx'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { MetadataDetails } from '../../../public/pages/metrics/metric_detail/components/metadata_details'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/host/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/host/toolbar_items.tsx index 5976b9d8dc65a..d5d9a7cd2d2ad 100644 --- a/x-pack/plugins/infra/common/inventory_models/host/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/host/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/layouts.ts b/x-pack/plugins/infra/common/inventory_models/layouts.ts index 361c6b67168fe..8886118d733b2 100644 --- a/x-pack/plugins/infra/common/inventory_models/layouts.ts +++ b/x-pack/plugins/infra/common/inventory_models/layouts.ts @@ -23,8 +23,7 @@ import { Layout as AwsS3Layout } from './aws_s3/layout'; import { Layout as AwsRDSLayout } from './aws_rds/layout'; import { Layout as AwsSQSLayout } from './aws_sqs/layout'; import { InventoryItemType } from './types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutProps } from '../../public/pages/metrics/metric_detail/types'; +import type { LayoutProps } from '../../public/pages/metrics/metric_detail/types'; interface Layouts { [type: string]: ReactNode; diff --git a/x-pack/plugins/infra/common/inventory_models/pod/layout.tsx b/x-pack/plugins/infra/common/inventory_models/pod/layout.tsx index 88c5a25d17b9d..5f1d619c334f7 100644 --- a/x-pack/plugins/infra/common/inventory_models/pod/layout.tsx +++ b/x-pack/plugins/infra/common/inventory_models/pod/layout.tsx @@ -8,20 +8,19 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { GaugesSectionVis } from '../../../public/pages/metrics/metric_detail/components/gauges_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../public/pages/metrics/metric_detail/components/chart_section_vis'; import * as Nginx from '../shared/layouts/nginx'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { MetadataDetails } from '../../../public/pages/metrics/metric_detail/components/metadata_details'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { LayoutContent } from '../../../public/pages/metrics/metric_detail/components/layout_content'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/pod/toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/pod/toolbar_items.tsx index 1c859c5bd116a..1b9fc9c9d1ecb 100644 --- a/x-pack/plugins/infra/common/inventory_models/pod/toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/pod/toolbar_items.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { MetricsAndGroupByToolbarItems } from '../shared/components/metrics_and_groupby_toolbar_items'; import { SnapshotMetricType } from '../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/shared/components/cloud_toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/shared/components/cloud_toolbar_items.tsx index 111519de3b61d..338d56a4d6c31 100644 --- a/x-pack/plugins/infra/common/inventory_models/shared/components/cloud_toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/shared/components/cloud_toolbar_items.tsx @@ -7,11 +7,10 @@ import React from 'react'; import { EuiFlexItem } from '@elastic/eui'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { ToolbarProps } from '../../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { WaffleAccountsControls } from '../../../../public/pages/metrics/inventory_view/components/waffle/waffle_accounts_controls'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { WaffleRegionControls } from '../../../../public/pages/metrics/inventory_view/components/waffle/waffle_region_controls'; type Props = ToolbarProps; diff --git a/x-pack/plugins/infra/common/inventory_models/shared/components/metrics_and_groupby_toolbar_items.tsx b/x-pack/plugins/infra/common/inventory_models/shared/components/metrics_and_groupby_toolbar_items.tsx index 9b4b054c17139..49902df21c350 100644 --- a/x-pack/plugins/infra/common/inventory_models/shared/components/metrics_and_groupby_toolbar_items.tsx +++ b/x-pack/plugins/infra/common/inventory_models/shared/components/metrics_and_groupby_toolbar_items.tsx @@ -8,17 +8,16 @@ import React, { useMemo } from 'react'; import { EuiFlexItem } from '@elastic/eui'; import { toMetricOpt } from '../../../snapshot_metric_i18n'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { WaffleSortControls } from '../../../../public/pages/metrics/inventory_view/components/waffle/waffle_sort_controls'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { ToolbarProps } from '../../../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { WaffleMetricControls } from '../../../../public/pages/metrics/inventory_view/components/waffle/metric_control'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { WaffleGroupByControls } from '../../../../public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls'; import { toGroupByOpt, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths + // eslint-disable-next-line @kbn/imports/no_boundary_crossing } from '../../../../public/pages/metrics/inventory_view/components/toolbars/toolbar_wrapper'; import { SnapshotMetricType } from '../../types'; diff --git a/x-pack/plugins/infra/common/inventory_models/shared/layouts/aws.tsx b/x-pack/plugins/infra/common/inventory_models/shared/layouts/aws.tsx index 8a8964f121f03..e326b004299af 100644 --- a/x-pack/plugins/infra/common/inventory_models/shared/layouts/aws.tsx +++ b/x-pack/plugins/infra/common/inventory_models/shared/layouts/aws.tsx @@ -8,15 +8,14 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { GaugesSectionVis } from '../../../../public/pages/metrics/metric_detail/components/gauges_section_vis'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../../public/pages/metrics/metric_detail/components/chart_section_vis'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/shared/layouts/nginx.tsx b/x-pack/plugins/infra/common/inventory_models/shared/layouts/nginx.tsx index d679a596d51e3..f5be0461d4a9d 100644 --- a/x-pack/plugins/infra/common/inventory_models/shared/layouts/nginx.tsx +++ b/x-pack/plugins/infra/common/inventory_models/shared/layouts/nginx.tsx @@ -8,13 +8,12 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { withTheme } from '@kbn/kibana-react-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LayoutPropsWithTheme } from '../../../../public/pages/metrics/metric_detail/types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { LayoutPropsWithTheme } from '../../../../public/pages/metrics/metric_detail/types'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { Section } from '../../../../public/pages/metrics/metric_detail/components/section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { SubSection } from '../../../../public/pages/metrics/metric_detail/components/sub_section'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { ChartSectionVis } from '../../../../public/pages/metrics/metric_detail/components/chart_section_vis'; export const Layout = withTheme(({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => ( diff --git a/x-pack/plugins/infra/common/inventory_models/toolbars.ts b/x-pack/plugins/infra/common/inventory_models/toolbars.ts index 54c0676938171..43bcab343d7c6 100644 --- a/x-pack/plugins/infra/common/inventory_models/toolbars.ts +++ b/x-pack/plugins/infra/common/inventory_models/toolbars.ts @@ -11,8 +11,7 @@ import { InventoryItemType } from './types'; import { HostToolbarItems } from './host/toolbar_items'; import { ContainerToolbarItems } from './container/toolbar_items'; import { PodToolbarItems } from './pod/toolbar_items'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ToolbarProps } from '../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; +import type { ToolbarProps } from '../../public/pages/metrics/inventory_view/components/toolbars/toolbar'; import { AwsEC2ToolbarItems } from './aws_ec2/toolbar_items'; import { AwsS3ToolbarItems } from './aws_s3/toolbar_items'; import { AwsRDSToolbarItems } from './aws_rds/toolbar_items'; diff --git a/x-pack/plugins/infra/common/runtime_types.ts b/x-pack/plugins/infra/common/runtime_types.ts index d77caa52c3c98..dc7bb45a6c20e 100644 --- a/x-pack/plugins/infra/common/runtime_types.ts +++ b/x-pack/plugins/infra/common/runtime_types.ts @@ -9,7 +9,6 @@ import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { pipe } from 'fp-ts/lib/pipeable'; import { Context, Errors, IntersectionType, Type, UnionType, ValidationError } from 'io-ts'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { RouteValidationFunction } from '@kbn/core/server'; type ErrorFactory = (message: string) => Error; diff --git a/x-pack/plugins/infra/common/saved_objects/inventory_view.ts b/x-pack/plugins/infra/common/saved_objects/inventory_view.ts index 4921f38853d12..7e935086cb08a 100644 --- a/x-pack/plugins/infra/common/saved_objects/inventory_view.ts +++ b/x-pack/plugins/infra/common/saved_objects/inventory_view.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; export const inventoryViewSavedObjectName = 'inventory-view'; diff --git a/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts b/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts index 71b7887263989..7f7ca7a932203 100644 --- a/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts +++ b/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; export const metricsExplorerViewSavedObjectName = 'metrics-explorer-view'; diff --git a/x-pack/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts b/x-pack/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts index 69c21dd1cfc7d..1b7899e517999 100644 --- a/x-pack/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts +++ b/x-pack/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts @@ -7,17 +7,11 @@ import { i18n } from '@kbn/i18n'; import { HttpHandler } from '@kbn/core/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import MemoryJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/hosts_memory_usage.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import MemoryDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/datafeed_hosts_memory_usage.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkInJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/hosts_network_in.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkInDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/datafeed_hosts_network_in.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkOutJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/hosts_network_out.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkOutDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/datafeed_hosts_network_out.json'; import { ModuleDescriptor, SetUpModuleArgs } from '../../infra_ml_module_types'; import { cleanUpJobsAndDatafeeds } from '../../infra_ml_cleanup'; diff --git a/x-pack/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts b/x-pack/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts index e1290833dc934..88fe64e91f3ed 100644 --- a/x-pack/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts +++ b/x-pack/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts @@ -7,17 +7,11 @@ import { i18n } from '@kbn/i18n'; import { HttpHandler } from '@kbn/core/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import MemoryJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/k8s_memory_usage.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import MemoryDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/datafeed_k8s_memory_usage.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkInJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/k8s_network_in.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkInDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/datafeed_k8s_network_in.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkOutJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/k8s_network_out.json'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import NetworkOutDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/datafeed_k8s_network_out.json'; import { ModuleDescriptor, SetUpModuleArgs } from '../../infra_ml_module_types'; import { cleanUpJobsAndDatafeeds } from '../../infra_ml_cleanup'; diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts b/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts index 53ff7e318e1f8..8c062b2188a10 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts @@ -10,7 +10,7 @@ import { identity } from 'fp-ts/lib/function'; import { pipe } from 'fp-ts/lib/pipeable'; import { first } from 'lodash'; import { useEffect, useMemo, useCallback } from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { getIntervalInSeconds } from '../../../../../server/utils/get_interval_in_seconds'; import { throwErrors, createPlainError } from '../../../../../common/runtime_types'; import { useHTTPRequest } from '../../../../hooks/use_http_request'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx index 2da97306eee1c..7fe4d9c5515d0 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.helpers.tsx @@ -14,7 +14,6 @@ import { HttpSetup } from '@kbn/core/public'; import { registerTestBed, TestBed } from '@kbn/test-jest-helpers'; import { stubWebWorker } from '@kbn/test-jest-helpers'; -/* eslint-disable-next-line @kbn/eslint/no-restricted-paths */ import '@kbn/es-ui-shared-plugin/public/components/code_editor/jest_mock'; import { uiMetricService, apiService } from '../../../services'; import { Props } from '..'; diff --git a/x-pack/plugins/license_api_guard/server/shared_imports.ts b/x-pack/plugins/license_api_guard/server/shared_imports.ts index f3f1faf0d9f56..19688fa2e7ea0 100644 --- a/x-pack/plugins/license_api_guard/server/shared_imports.ts +++ b/x-pack/plugins/license_api_guard/server/shared_imports.ts @@ -9,4 +9,5 @@ export type { ILicense, LicenseType, LicenseCheckState } from '@kbn/licensing-pl export type { LicensingPluginStart } from '@kbn/licensing-plugin/server'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { licensingMock } from '@kbn/licensing-plugin/server/mocks'; diff --git a/x-pack/plugins/license_management/__jest__/util/util.js b/x-pack/plugins/license_management/__jest__/util/util.js index 7e6ffdd60431c..8830f672a1019 100644 --- a/x-pack/plugins/license_management/__jest__/util/util.js +++ b/x-pack/plugins/license_management/__jest__/util/util.js @@ -5,8 +5,6 @@ * 2.0. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ - import React from 'react'; import { Provider } from 'react-redux'; diff --git a/x-pack/plugins/ml/common/types/capabilities.ts b/x-pack/plugins/ml/common/types/capabilities.ts index b04c5b1cc9141..7e03746684540 100644 --- a/x-pack/plugins/ml/common/types/capabilities.ts +++ b/x-pack/plugins/ml/common/types/capabilities.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { PLUGIN_ID } from '../constants/app'; import { ML_JOB_SAVED_OBJECT_TYPE, diff --git a/x-pack/plugins/ml/common/types/locator.ts b/x-pack/plugins/ml/common/types/locator.ts index 7fa56529d58a9..adb873a3d7c6b 100644 --- a/x-pack/plugins/ml/common/types/locator.ts +++ b/x-pack/plugins/ml/common/types/locator.ts @@ -6,7 +6,6 @@ */ import type { SerializableRecord } from '@kbn/utility-types'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { LocatorPublic } from '@kbn/share-plugin/public'; import type { RefreshInterval, TimeRange } from '@kbn/data-plugin/common/query'; import type { JobId } from './anomaly_detection_jobs/job'; diff --git a/x-pack/plugins/ml/common/types/modules.ts b/x-pack/plugins/ml/common/types/modules.ts index 6b6fc72c091c2..dd9f098cabe1c 100644 --- a/x-pack/plugins/ml/common/types/modules.ts +++ b/x-pack/plugins/ml/common/types/modules.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SavedObjectAttributes } from '@kbn/core/public'; -import { Datafeed, Job } from './anomaly_detection_jobs'; -import { ErrorType } from '../util/errors'; +import type { SavedObjectAttributes } from '@kbn/core/types'; +import type { Datafeed, Job } from './anomaly_detection_jobs'; +import type { ErrorType } from '../util/errors'; export interface ModuleJob { id: string; diff --git a/x-pack/plugins/ml/shared_imports.ts b/x-pack/plugins/ml/shared_imports.ts index 33a84886aaaec..25f78cce55611 100644 --- a/x-pack/plugins/ml/shared_imports.ts +++ b/x-pack/plugins/ml/shared_imports.ts @@ -5,9 +5,11 @@ * 2.0. */ +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { EuiCodeEditor } from '@kbn/es-ui-shared-plugin/public'; export type { EuiCodeEditorProps } from '@kbn/es-ui-shared-plugin/public'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { XJson } from '@kbn/es-ui-shared-plugin/public'; const { collapseLiteralStrings, expandLiteralStrings } = XJson; diff --git a/x-pack/plugins/monitoring/common/ccs_utils.ts b/x-pack/plugins/monitoring/common/ccs_utils.ts index fea8f79bbfbbf..40ee0f34500f3 100644 --- a/x-pack/plugins/monitoring/common/ccs_utils.ts +++ b/x-pack/plugins/monitoring/common/ccs_utils.ts @@ -5,7 +5,6 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { MonitoringConfig } from '../server/config'; /** diff --git a/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx b/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx index 814901e318a3a..ede3e3167828c 100644 --- a/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx +++ b/x-pack/plugins/monitoring/public/alerts/components/param_details_form/validation.tsx @@ -7,7 +7,6 @@ import { i18n } from '@kbn/i18n'; import { RuleTypeParams } from '@kbn/alerting-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ValidationResult } from '@kbn/triggers-actions-ui-plugin/public/types'; export type MonitoringAlertTypeParams = ValidateOptions & RuleTypeParams; diff --git a/x-pack/plugins/monitoring/public/alerts/missing_monitoring_data_alert/validation.tsx b/x-pack/plugins/monitoring/public/alerts/missing_monitoring_data_alert/validation.tsx index b442a60c8506c..ca24217562880 100644 --- a/x-pack/plugins/monitoring/public/alerts/missing_monitoring_data_alert/validation.tsx +++ b/x-pack/plugins/monitoring/public/alerts/missing_monitoring_data_alert/validation.tsx @@ -6,7 +6,6 @@ */ import { i18n } from '@kbn/i18n'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ValidationResult } from '@kbn/triggers-actions-ui-plugin/public/types'; export function validate(opts: any): ValidationResult { diff --git a/x-pack/plugins/monitoring/public/legacy_shims.ts b/x-pack/plugins/monitoring/public/legacy_shims.ts index 7477150b10492..88b102b00755b 100644 --- a/x-pack/plugins/monitoring/public/legacy_shims.ts +++ b/x-pack/plugins/monitoring/public/legacy_shims.ts @@ -19,9 +19,7 @@ import { import { Observable } from 'rxjs'; import { HttpRequestInit } from '@kbn/core/public'; import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { TypeRegistry } from '@kbn/triggers-actions-ui-plugin/public/application/type_registry'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ActionTypeModel, RuleTypeModel } from '@kbn/triggers-actions-ui-plugin/public/types'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { diff --git a/x-pack/plugins/monitoring/public/types.ts b/x-pack/plugins/monitoring/public/types.ts index 554b08f0f6ce2..af232cbbf302a 100644 --- a/x-pack/plugins/monitoring/public/types.ts +++ b/x-pack/plugins/monitoring/public/types.ts @@ -10,9 +10,7 @@ import { NavigationPublicPluginStart as NavigationStart } from '@kbn/navigation- import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths export type { MonitoringConfig } from '../server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths export type { MLJobs } from '../server/lib/elasticsearch/get_ml_jobs'; import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; diff --git a/x-pack/plugins/observability/common/utils/get_inspect_response.ts b/x-pack/plugins/observability/common/utils/get_inspect_response.ts index cfcfceb72752f..6af29c16d0457 100644 --- a/x-pack/plugins/observability/common/utils/get_inspect_response.ts +++ b/x-pack/plugins/observability/common/utils/get_inspect_response.ts @@ -6,7 +6,6 @@ */ import { i18n } from '@kbn/i18n'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { KibanaRequest } from '@kbn/core/server'; import type { RequestStatistics, RequestStatus } from '@kbn/inspector-plugin/common'; import { InspectResponse } from '../../typings/common'; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx index 9e649b06979ec..8e0ac0d3505f5 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/rtl_helpers.tsx @@ -22,7 +22,6 @@ import { coreMock, themeServiceMock } from '@kbn/core/public/mocks'; import { KibanaContextProvider, KibanaServices } from '@kbn/kibana-react-plugin/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { lensPluginMock } from '@kbn/lens-plugin/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { setIndexPatterns } from '@kbn/unified-search-plugin/public/services'; import type { DataView, DataViewsContract } from '@kbn/data-views-plugin/public'; import { createStubDataView } from '@kbn/data-views-plugin/common/stubs'; diff --git a/x-pack/plugins/observability/public/services/call_observability_api/types.ts b/x-pack/plugins/observability/public/services/call_observability_api/types.ts index 014688826ada7..2d0231033ced7 100644 --- a/x-pack/plugins/observability/public/services/call_observability_api/types.ts +++ b/x-pack/plugins/observability/public/services/call_observability_api/types.ts @@ -11,7 +11,6 @@ import type { AbstractObservabilityServerRouteRepository, ObservabilityServerRouteRepository, ObservabilityAPIReturnType, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '../../../server'; export type ObservabilityClientOptions = Omit< diff --git a/x-pack/plugins/osquery/public/shared_imports.ts b/x-pack/plugins/osquery/public/shared_imports.ts index eef2814bae0e3..a1855d0ff0bcd 100644 --- a/x-pack/plugins/osquery/public/shared_imports.ts +++ b/x-pack/plugins/osquery/public/shared_imports.ts @@ -16,6 +16,8 @@ export type { ValidationError, ValidationFunc, ValidationFuncArg, + ArrayItem, + FormArrayField, } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; export { getUseField, @@ -24,8 +26,6 @@ export { Form, FormDataProvider, UseArray, - ArrayItem, - FormArrayField, UseField, UseMultiFields, useForm, diff --git a/x-pack/plugins/remote_clusters/server/routes/api/types.ts b/x-pack/plugins/remote_clusters/server/routes/api/types.ts index 95778390bfc8d..d2807de6b814f 100644 --- a/x-pack/plugins/remote_clusters/server/routes/api/types.ts +++ b/x-pack/plugins/remote_clusters/server/routes/api/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import type { elasticsearchServiceMock } from '@kbn/core/server/mocks'; export type ScopedClusterClientMock = ReturnType< typeof elasticsearchServiceMock.createScopedClusterClient diff --git a/x-pack/plugins/reporting/common/types/index.ts b/x-pack/plugins/reporting/common/types/index.ts index 6cf7b02a8b3a0..1f5abe0840317 100644 --- a/x-pack/plugins/reporting/common/types/index.ts +++ b/x-pack/plugins/reporting/common/types/index.ts @@ -5,7 +5,6 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { PdfScreenshotResult, PngScreenshotResult } from '@kbn/screenshotting-plugin/server'; import type { BaseParams, BaseParamsV2, BasePayload, BasePayloadV2, JobId } from './base'; diff --git a/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts b/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts index 4ec1cab671000..5a6fa38279c24 100644 --- a/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts +++ b/x-pack/plugins/reporting/server/test_helpers/create_mock_reportingplugin.ts @@ -22,7 +22,6 @@ import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; import { DeepPartial } from 'utility-types'; import { featuresPluginMock } from '@kbn/features-plugin/server/mocks'; import { licensingMock } from '@kbn/licensing-plugin/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { createMockScreenshottingStart } from '@kbn/screenshotting-plugin/server/mock'; import { securityMock } from '@kbn/security-plugin/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; diff --git a/x-pack/plugins/reporting/server/types.ts b/x-pack/plugins/reporting/server/types.ts index f660690c6a755..ac81bb0393a03 100644 --- a/x-pack/plugins/reporting/server/types.ts +++ b/x-pack/plugins/reporting/server/types.ts @@ -6,7 +6,6 @@ */ import type { IRouter, Logger, CustomRequestHandlerContext } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { DataPluginStart } from '@kbn/data-plugin/server/plugin'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/server'; import type { ScreenshotModePluginSetup } from '@kbn/screenshot-mode-plugin/server'; diff --git a/x-pack/plugins/rule_registry/server/mocks.ts b/x-pack/plugins/rule_registry/server/mocks.ts index 023de6aa6029c..7ab1391ca1dec 100644 --- a/x-pack/plugins/rule_registry/server/mocks.ts +++ b/x-pack/plugins/rule_registry/server/mocks.ts @@ -11,7 +11,7 @@ import { ruleDataServiceMock, RuleDataServiceMock, } from './rule_data_plugin_service/rule_data_plugin_service.mock'; -import { createLifecycleAlertServicesMock } from './utils/lifecycle_alert_services_mock'; +import { createLifecycleAlertServicesMock } from './utils/lifecycle_alert_services.mock'; export const ruleRegistryMocks = { createLifecycleAlertServices: createLifecycleAlertServicesMock, diff --git a/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts b/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts index 2d49c09f007f7..f0190ef7adf67 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_lifecycle_executor.test.ts @@ -25,7 +25,7 @@ import { } from '../../common/technical_rule_data_field_names'; import { createRuleDataClientMock } from '../rule_data_client/rule_data_client.mock'; import { createLifecycleExecutor } from './create_lifecycle_executor'; -import { createDefaultAlertExecutorOptions } from './rule_executor_test_utils'; +import { createDefaultAlertExecutorOptions } from './rule_executor.test_helpers'; describe('createLifecycleExecutor', () => { it('wraps and unwraps the original executor state', async () => { diff --git a/x-pack/plugins/rule_registry/server/utils/lifecycle_alert_services_mock.ts b/x-pack/plugins/rule_registry/server/utils/lifecycle_alert_services.mock.ts similarity index 100% rename from x-pack/plugins/rule_registry/server/utils/lifecycle_alert_services_mock.ts rename to x-pack/plugins/rule_registry/server/utils/lifecycle_alert_services.mock.ts diff --git a/x-pack/plugins/rule_registry/server/utils/rule_executor_test_utils.ts b/x-pack/plugins/rule_registry/server/utils/rule_executor.test_helpers.ts similarity index 100% rename from x-pack/plugins/rule_registry/server/utils/rule_executor_test_utils.ts rename to x-pack/plugins/rule_registry/server/utils/rule_executor.test_helpers.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js b/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js index 0b6dde0a3eeb0..ca319ace9d027 100644 --- a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js +++ b/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js @@ -10,6 +10,7 @@ * The TS file needs to be compiled on the fly, unlike when Kibana is running as a dist. */ +// eslint-disable-next-line @kbn/imports/no_boundary_crossing require('../../../../../../../src/setup_node_env'); // eslint-disable-next-line @kbn/imports/uniform_imports require('./worker.ts'); diff --git a/x-pack/plugins/security/common/model/deprecations.ts b/x-pack/plugins/security/common/model/deprecations.ts index 66dd7d7dabac5..3fa9bd4019818 100644 --- a/x-pack/plugins/security/common/model/deprecations.ts +++ b/x-pack/plugins/security/common/model/deprecations.ts @@ -5,7 +5,6 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { DeprecationsDetails, GetDeprecationsContext } from '@kbn/core/server'; import type { Role } from './role'; diff --git a/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts b/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts index ac466d2d72540..72dd21dc2e3ac 100644 --- a/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts +++ b/x-pack/plugins/security/public/management/roles/__fixtures__/kibana_privileges.ts @@ -6,15 +6,11 @@ */ import type { KibanaFeature } from '@kbn/features-plugin/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { featuresPluginMock } from '@kbn/features-plugin/server/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { LicenseType } from '@kbn/licensing-plugin/server'; import type { SecurityLicenseFeatures } from '../../../../common/licensing'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { Actions } from '../../../../server/authorization'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { privilegesFactory } from '../../../../server/authorization/privileges'; import { KibanaPrivileges } from '../model'; diff --git a/x-pack/plugins/security/server/prompt_page.tsx b/x-pack/plugins/security/server/prompt_page.tsx index 276af2b7e7ec4..7b9e2e74dcb83 100644 --- a/x-pack/plugins/security/server/prompt_page.tsx +++ b/x-pack/plugins/security/server/prompt_page.tsx @@ -15,7 +15,6 @@ import type { ReactNode } from 'react'; import React from 'react'; import type { IBasePath } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { Fonts } from '@kbn/core/server/rendering/views/fonts'; import { i18n } from '@kbn/i18n'; import { I18nProvider } from '@kbn/i18n-react'; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/host_isolation_exception_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/host_isolation_exception_generator.ts index a54f3b6a21aa0..0103c81b1c185 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/host_isolation_exception_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/host_isolation_exception_generator.ts @@ -7,6 +7,7 @@ import type { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID } from '@kbn/securitysolution-list-constants'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { getCreateExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/request/create_exception_list_item_schema.mock'; import { BaseDataGenerator } from './base_data_generator'; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts index 975d28eb9dcbf..83c1627a91825 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts @@ -6,4 +6,5 @@ */ export { getEndpointAuthzInitialState, calculateEndpointAuthz } from './authz'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { getEndpointAuthzInitialStateMock } from './mocks'; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts index 4754b4c17a958..f047d201dfd14 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts @@ -5,7 +5,6 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { IEsSearchResponse } from '@kbn/data-plugin/public'; import type { CtiEnrichment, CtiEventEnrichmentRequestOptions } from '.'; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts index 4d9a054b49461..f2fe3e3fee37d 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts @@ -6,7 +6,6 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { IEsSearchResponse, IEsSearchRequest } from '@kbn/data-plugin/public'; import type { FactoryQueryTypes } from '../..'; import { EVENT_ENRICHMENT_INDICATOR_FIELD_MAP } from '../../../cti/constants'; diff --git a/x-pack/plugins/security_solution/cypress/objects/rule.ts b/x-pack/plugins/security_solution/cypress/objects/rule.ts index 7fd9e7b5f7625..197d3b9b6a58a 100644 --- a/x-pack/plugins/security_solution/cypress/objects/rule.ts +++ b/x-pack/plugins/security_solution/cypress/objects/rule.ts @@ -6,7 +6,6 @@ */ import type { RulesSchema } from '../../common/detection_engine/schemas/response'; -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { rawRules } from '../../server/lib/detection_engine/rules/prepackaged_rules'; import { getMockThreatData } from '../../public/detections/mitre/mitre_tactics_techniques'; import type { CompleteTimeline } from './timeline'; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts index 8fb75174ede83..0d778a3284cc4 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts @@ -7,7 +7,6 @@ import { notificationServiceMock } from '@kbn/core/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { createTGridMocks } from '@kbn/timelines-plugin/public/mock'; import { diff --git a/x-pack/plugins/security_solution/public/common/types.ts b/x-pack/plugins/security_solution/public/common/types.ts index 0cf2b989f2006..ef19c73f307b7 100644 --- a/x-pack/plugins/security_solution/public/common/types.ts +++ b/x-pack/plugins/security_solution/public/common/types.ts @@ -5,7 +5,6 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ResponseErrorAttributes } from '@kbn/core/server'; import type { DataViewBase } from '@kbn/es-query'; import type { FieldSpec } from '@kbn/data-views-plugin/common'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx index 14aa195e0be81..c98f5616b1750 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx @@ -25,5 +25,6 @@ export const EndpointsContainer = memo(() => { }); EndpointsContainer.displayName = 'EndpointsContainer'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { endpointListFleetApisHttpMock } from './mocks'; export type { EndpointListFleetApisHttpMockInterface } from './mocks'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx index 9afec661d22fb..a7e2f67e5f586 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx @@ -14,7 +14,6 @@ import styled, { css } from 'styled-components'; import type { Filter, Query } from '@kbn/es-query'; import type { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { MapEmbeddable } from '@kbn/maps-plugin/public/embeddable'; import { Loader } from '../../../common/components/loader'; import { displayErrorToast, useStateToaster } from '../../../common/components/toasters'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx index 018bb4dd30e2b..fb6d0dc6898d5 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx @@ -8,7 +8,6 @@ import React from 'react'; import { EuiBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { SourceDestinationArrows } from '../../source_destination/source_destination_arrows'; import { diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx index 93b5436b13bce..3db7e496cb88d 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx @@ -13,7 +13,6 @@ import { EuiOutsideClickDetector, } from '@elastic/eui'; import type { Geometry } from 'geojson'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import type { MapToolTipProps } from '../types'; import { ToolTipFooter } from './tooltip_footer'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx index dd1cc78ac3519..ce476b488571c 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx @@ -6,7 +6,6 @@ */ import React, { useMemo } from 'react'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { sourceDestinationFieldMappings } from '../map_config'; import { diff --git a/x-pack/plugins/security_solution/public/resolver/index.ts b/x-pack/plugins/security_solution/public/resolver/index.ts index fdb1315cd769f..48869aacacb3f 100644 --- a/x-pack/plugins/security_solution/public/resolver/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/index.ts @@ -9,6 +9,7 @@ import { Provider } from 'react-redux'; import type { ResolverPluginSetup } from './types'; import { resolverStoreFactory } from './store'; import { ResolverWithoutProviders } from './view/resolver_without_providers'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { noAncestorsTwoChildrenWithRelatedEventsOnOrigin } from './data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin'; /** diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/alerts.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/alerts.tsx index 23456e62a26f7..7183aa8e85d7e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/alerts.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/alerts.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndpointProcessExecutionMalwarePreventionAlert } from '../../../../common/mock/mock_timeline_data'; import { createEndpointAlertsRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; import { WAS_PREVENTED_FROM_EXECUTING_A_MALICIOUS_PROCESS } from '../../timeline/body/renderers/system/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd.tsx index f6b3962412267..d85f0537fe720 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockTimelineData } from '../../../../common/mock/mock_timeline_data'; import { createGenericAuditRowRenderer } from '../../timeline/body/renderers/auditd/generic_row_renderer'; import { CONNECTED_USING } from '../../timeline/body/renderers/auditd/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd_file.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd_file.tsx index fff934ed55039..b55e667a6e43f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd_file.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/auditd_file.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockTimelineData } from '../../../../common/mock/mock_timeline_data'; import { createGenericFileRowRenderer } from '../../timeline/body/renderers/auditd/generic_row_renderer'; import { OPENED_FILE, USING } from '../../timeline/body/renderers/auditd/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/library.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/library.tsx index cf1ddafcd4b0a..c45555f9c31ac 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/library.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/library.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndpointLibraryLoadEvent } from '../../../../common/mock/mock_timeline_data'; import { createEndpointLibraryRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; import { LOADED_LIBRARY } from '../../timeline/body/renderers/system/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/netflow.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/netflow.tsx index b9755bcf573b5..06321441a34d7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/netflow.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/netflow.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { getMockNetflowData } from '../../../../common/mock/netflow'; import { netflowRowRenderer } from '../../timeline/body/renderers/netflow/netflow_row_renderer'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/registry.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/registry.tsx index 8742b0e62dfa3..f4d39a6870e80 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/registry.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/registry.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndpointRegistryModificationEvent } from '../../../../common/mock/mock_timeline_data'; import { createEndpointRegistryRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; import { MODIFIED_REGISTRY_KEY } from '../../timeline/body/renderers/system/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/suricata.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/suricata.tsx index 1c26ee13229bd..613f6c632ad0c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/suricata.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/suricata.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockTimelineData } from '../../../../common/mock/mock_timeline_data'; import { suricataRowRenderer } from '../../timeline/body/renderers/suricata/suricata_row_renderer'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system.tsx index 649edd08c450f..2018f46865219 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { TERMINATED_PROCESS } from '../../timeline/body/renderers/system/translations'; import { createGenericSystemRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameTerminationEvent } from '../../../../common/mock/mock_endgame_ecs_data'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_dns.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_dns.tsx index 0566cf503443b..aba609a8e5385 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_dns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_dns.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { createDnsRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameDnsRequest } from '../../../../common/mock/mock_endgame_ecs_data'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_endgame_process.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_endgame_process.tsx index 3af5d401bc3ac..c7c369c01ed1f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_endgame_process.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_endgame_process.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { createEndgameProcessRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameCreationEvent } from '../../../../common/mock/mock_endgame_ecs_data'; import { PROCESS_STARTED } from '../../timeline/body/renderers/system/translations'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_file.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_file.tsx index d693c7df1b06f..72903035b2e12 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_file.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_file.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameFileDeleteEvent } from '../../../../common/mock/mock_endgame_ecs_data'; import { createGenericFileRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; import { DELETED_FILE } from '../../timeline/body/renderers/system/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_fim.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_fim.tsx index 257719e573986..74a02902fb78a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_fim.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_fim.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameFileCreateEvent } from '../../../../common/mock/mock_endgame_ecs_data'; import { createFimRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; import { CREATED_FILE } from '../../timeline/body/renderers/system/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_security_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_security_event.tsx index 9490a9e776e73..aecf23ff08346 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_security_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_security_event.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { createSecurityEventRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameUserLogon } from '../../../../common/mock/mock_endgame_ecs_data'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_socket.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_socket.tsx index 47dd0122a47fe..015a571ae6f5b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_socket.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/system_socket.tsx @@ -9,6 +9,7 @@ import React from 'react'; import { ACCEPTED_A_CONNECTION_VIA } from '../../timeline/body/renderers/system/translations'; import { createSocketRowRenderer } from '../../timeline/body/renderers/system/generic_row_renderer'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockEndgameIpv4ConnectionAcceptEvent } from '../../../../common/mock/mock_endgame_ecs_data'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/threat_match.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/threat_match.tsx index cffa39584a624..ba3ca74147f29 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/threat_match.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/threat_match.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockTimelineData } from '../../../../common/mock/mock_timeline_data'; import { threatMatchRowRenderer } from '../../timeline/body/renderers/cti/threat_match_row_renderer'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/zeek.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/zeek.tsx index f47fa275245a6..ab8cab5e3d697 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/zeek.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/examples/zeek.tsx @@ -7,6 +7,7 @@ import React from 'react'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing import { mockTimelineData } from '../../../../common/mock/mock_timeline_data'; import { zeekRowRenderer } from '../../timeline/body/renderers/zeek/zeek_row_renderer'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../constants'; diff --git a/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts b/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts index f5764fe28e9d3..81cf68ef2ed90 100644 --- a/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts +++ b/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts @@ -9,7 +9,6 @@ import { parseDuration } from '@kbn/alerting-plugin/common/parse_duration'; // We _must_ import from the restricted path or we pull in _everything_ including memory leaks from Kibana core -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ReadOperations, WriteOperations } from '@kbn/alerting-plugin/server/authorization'; module.exports = { diff --git a/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts b/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts index 47703d54ec3b8..57feaedbc9487 100644 --- a/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts +++ b/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts @@ -8,9 +8,7 @@ // See: https://github.com/elastic/kibana/issues/117255, this creates mocks to avoid memory leaks from kibana core. // We _must_ import from the restricted path or we pull in _everything_ including memory leaks from Kibana core -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { SavedObjectsUtils } from '@kbn/core/server/saved_objects/service/lib/utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { SavedObjectsErrorHelpers } from '@kbn/core/server/saved_objects/service/lib/errors'; module.exports = { SavedObjectsUtils, diff --git a/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts b/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts index 8a0eb39aa8f23..b169811ee53a5 100644 --- a/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts +++ b/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts @@ -7,7 +7,6 @@ // See: https://github.com/elastic/kibana/issues/117255, this creates mocks to avoid memory leaks from kibana core. -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { TaskStatus } from '@kbn/task-manager-plugin/server/task'; module.exports = { TaskStatus, diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 7e9fd53749344..01759c01df53b 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -23,7 +23,6 @@ import { // plugin server `index.ts`. Its unclear what is actually causing the error. Since this is a Mock // file and not bundled with the application, adding a eslint disable below and using import from // a restricted path. -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { createCasesClientMock } from '@kbn/cases-plugin/server/client/mocks'; import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; import { xpackMocks } from '../fixtures'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts index 814dd457347ab..3e6446595d800 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts @@ -9,7 +9,6 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; // Because mocks are for testing only, should be ok to import the FleetArtifactsClient directly -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { FleetArtifactsClient } from '@kbn/fleet-plugin/server/services'; import { createArtifactsClientMock } from '@kbn/fleet-plugin/server/mocks'; import type { EndpointArtifactClientInterface } from './artifact_client'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/index.ts b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/index.ts index f8da583e712a6..d65ea404f298d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/index.ts @@ -7,6 +7,7 @@ import { FeatureUsageService } from './service'; export type { FeatureKeys } from './service'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export { createFeatureUsageServiceMock, createMockPolicyData } from './mocks'; export const featureUsageService = new FeatureUsageService(); diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts b/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts index 4af0da29e6307..eaecf9d3c9daa 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts @@ -6,7 +6,6 @@ */ import type { ElasticsearchClient } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { SearchRequest } from '@kbn/data-plugin/public'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { TransportResult } from '@elastic/elasticsearch'; diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/audit_log_helpers.ts b/x-pack/plugins/security_solution/server/endpoint/utils/audit_log_helpers.ts index a7e3dbbf7a4c3..8b0b6789dd5f1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/audit_log_helpers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/audit_log_helpers.ts @@ -6,7 +6,6 @@ */ import type { Logger } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { SearchRequest } from '@kbn/data-plugin/public'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { TransportResult } from '@elastic/elasticsearch'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts index 8abbec103b2cb..0ac0a67a761ef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -16,7 +16,6 @@ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. // We cannot import from "../../../../../../actions/server" directly here or we have a really bad memory issue. We cannot add this to the existing mocks we created, this fix must be here. -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { actionsClientMock } from '@kbn/actions-plugin/server/actions_client.mock'; import { licensingMock } from '@kbn/licensing-plugin/server/mocks'; import { listMock } from '@kbn/lists-plugin/server/mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts index 4d649ccfaa6ee..e733f36d1421a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts @@ -15,7 +15,6 @@ import type { RuleTypeState, } from '@kbn/alerting-plugin/common'; import { parseDuration } from '@kbn/alerting-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ExecutorType } from '@kbn/alerting-plugin/server/types'; import type { Alert } from '@kbn/alerting-plugin/server'; import type { StartPlugins, SetupPlugins } from '../../../../plugin'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts index 268c5448d7fe2..ce6ab5c84678f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts @@ -6,12 +6,8 @@ */ import type { ExceptionListSchema, ListArray } from '@kbn/securitysolution-io-ts-list-types'; import type { SavedObjectsClientContract } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { ExceptionListQueryInfo } from '@kbn/lists-plugin/server/services/exception_lists/utils/import/find_all_exception_list_types'; -import { - getAllListTypes, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '@kbn/lists-plugin/server/services/exception_lists/utils/import/find_all_exception_list_types'; +import { getAllListTypes } from '@kbn/lists-plugin/server/services/exception_lists/utils/import/find_all_exception_list_types'; import type { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts index e0e985ff23865..f2f023e28da7d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts @@ -22,8 +22,7 @@ import { createRuleMock } from './rule'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import type { QueryRuleParams, RuleParams } from '../../schemas/rule_schemas'; // this is only used in tests -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { createDefaultAlertExecutorOptions } from '@kbn/rule-registry-plugin/server/utils/rule_executor_test_utils'; +import { createDefaultAlertExecutorOptions } from '@kbn/rule-registry-plugin/server/utils/rule_executor.test_helpers'; import { getCompleteRuleMock } from '../../schemas/rule_schemas.mock'; export const createRuleTypeMocks = ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts index 40bb3e3ef41e4..b73119d15077a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts @@ -10,7 +10,6 @@ import type { AlertInstanceState, RuleTypeState, } from '@kbn/alerting-plugin/common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { Alert } from '@kbn/alerting-plugin/server/alert'; import type { RuleParams } from '../../schemas/rule_schemas'; diff --git a/x-pack/plugins/synthetics/common/config.ts b/x-pack/plugins/synthetics/common/config.ts index 5b0e56fed4423..c9c48e5878391 100644 --- a/x-pack/plugins/synthetics/common/config.ts +++ b/x-pack/plugins/synthetics/common/config.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { PluginConfigDescriptor } from '@kbn/core/server'; +import type { PluginConfigDescriptor } from '@kbn/core/server'; import { schema, TypeOf } from '@kbn/config-schema'; import { sslSchema } from '@kbn/server-http-tools'; diff --git a/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts b/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts index 250d3194e2664..b7e7006cc1b05 100644 --- a/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts +++ b/x-pack/plugins/synthetics/common/requests/get_certs_request_body.ts @@ -8,8 +8,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { CertResult, GetCertsParams, Ping } from '../runtime_types'; import { createEsQuery } from '../utils/es_search'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { CertificatesResults } from '../../server/legacy_uptime/lib/requests/get_certs'; +import type { CertificatesResults } from '../../server/legacy_uptime/lib/requests/get_certs'; import { asMutableArray } from '../utils/as_mutable_array'; enum SortFields { diff --git a/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts b/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts index a54cd03003c4e..1a0c7a7c46709 100644 --- a/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts +++ b/x-pack/plugins/synthetics/common/types/synthetics_monitor.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SimpleSavedObject } from '@kbn/core/public'; +import type { SimpleSavedObject } from '@kbn/core/public'; import { EncryptedSyntheticsMonitor, SyntheticsMonitor } from '../runtime_types'; export interface MonitorIdParam { diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/types.ts b/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/types.ts index 4c2bcad2206e4..e0ddd911b23da 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/types.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/settings/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { IndexActionTypeId, JiraActionTypeId, PagerDutyActionTypeId, @@ -15,7 +15,6 @@ import { TeamsActionTypeId, WebhookActionTypeId, EmailActionTypeId, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/actions-plugin/server/builtin_action_types'; export type ActionTypeId = diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/lib/index.ts b/x-pack/plugins/synthetics/public/legacy_uptime/lib/index.ts index 9added9af6592..356f3f3cf8ad9 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/lib/index.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/lib/index.ts @@ -6,4 +6,5 @@ */ export { MountWithReduxProvider } from './helper'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing export * from './helper/enzyme_helpers'; diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/state/api/alert_actions.ts b/x-pack/plugins/synthetics/public/legacy_uptime/state/api/alert_actions.ts index 31d8c0577780c..8bda332884546 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/state/api/alert_actions.ts +++ b/x-pack/plugins/synthetics/public/legacy_uptime/state/api/alert_actions.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { RuleAction as RuleActionOrig } from '@kbn/triggers-actions-ui-plugin/public'; -import { +import type { IndexActionParams, PagerDutyActionParams, ServerLogActionParams, @@ -15,7 +15,6 @@ import { JiraActionParams, WebhookActionParams, EmailActionParams, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/actions-plugin/server'; import { NewAlertParams } from './alerts'; import { ACTION_GROUP_DEFINITIONS } from '../../../../common/constants/alerts'; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/alerts/test_utils/index.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/alerts/test_utils/index.ts index 050347f37eeaf..c80b04d24982f 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/alerts/test_utils/index.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/alerts/test_utils/index.ts @@ -12,7 +12,7 @@ import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { UMServerLibs } from '../../lib'; import { UptimeCorePluginsSetup, UptimeServerSetup } from '../../adapters'; import type { UptimeRouter } from '../../../../types'; -import { getUptimeESMockClient } from '../../requests/helper'; +import { getUptimeESMockClient } from '../../requests/test_helpers'; /** * The alert takes some dependencies as parameters; these are things like diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts index 72de8be638dcc..b4dce0e2421fd 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_certs.test.ts @@ -6,7 +6,7 @@ */ import { getCerts } from './get_certs'; -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; describe('getCerts', () => { let mockHits: any; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_details.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_details.test.ts index 4d678021ce784..88519119d945e 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_details.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_details.test.ts @@ -6,7 +6,7 @@ */ import { getJourneyDetails } from './get_journey_details'; -import { mockSearchResult } from './helper'; +import { mockSearchResult } from './test_helpers'; describe('getJourneyDetails', () => { let mockData: unknown; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_failed_steps.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_failed_steps.test.ts index 58e5202c2bca2..bcfd7d3296fa9 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_failed_steps.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_failed_steps.test.ts @@ -6,7 +6,7 @@ */ import { getJourneyFailedSteps } from './get_journey_failed_steps'; -import { mockSearchResult } from './helper'; +import { mockSearchResult } from './test_helpers'; describe('getJourneyFailedSteps', () => { let mockData: unknown; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot.test.ts index 15cee91606e66..5a94fac1ee31c 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot.test.ts @@ -6,7 +6,7 @@ */ import { getJourneyScreenshot } from './get_journey_screenshot'; -import { mockSearchResult } from './helper'; +import { mockSearchResult } from './test_helpers'; describe('getJourneyScreenshot', () => { it('returns screenshot data', async () => { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot_blocks.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot_blocks.test.ts index 32e4b730e80ab..76b2ea0d98708 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot_blocks.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_screenshot_blocks.test.ts @@ -6,7 +6,7 @@ */ import { getJourneyScreenshotBlocks } from './get_journey_screenshot_blocks'; -import { mockSearchResult } from './helper'; +import { mockSearchResult } from './test_helpers'; describe('getJourneyScreenshotBlocks', () => { it('returns formatted blocks', async () => { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_steps.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_steps.test.ts index cadd7e79d63e4..46986cc47f3e5 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_steps.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_journey_steps.test.ts @@ -7,7 +7,7 @@ import { JourneyStep } from '../../../../common/runtime_types/ping/synthetics'; import { getJourneySteps, formatSyntheticEvents } from './get_journey_steps'; -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; describe('getJourneySteps request module', () => { describe('formatStepTypes', () => { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_latest_monitor.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_latest_monitor.test.ts index c25b0de66d822..f276384a86c74 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_latest_monitor.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_latest_monitor.test.ts @@ -7,7 +7,7 @@ import { getLatestMonitor } from './get_latest_monitor'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../common/constants'; -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; describe('getLatestMonitor', () => { let expectedGetLatestSearchParams: any; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_availability.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_availability.test.ts index f959eaf497a38..d84c4025d5dd0 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_availability.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_availability.test.ts @@ -11,7 +11,7 @@ import { AvailabilityKey, getMonitorAvailability, } from './get_monitor_availability'; -import { getUptimeESMockClient, setupMockEsCompositeQuery } from './helper'; +import { getUptimeESMockClient, setupMockEsCompositeQuery } from './test_helpers'; import { GetMonitorAvailabilityParams, makePing, Ping } from '../../../../common/runtime_types'; interface AvailabilityTopHit { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_details.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_details.test.ts index fb53522cdc809..f1b37eedf0d69 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_details.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_details.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { mockSearchResult } from './helper'; +import { mockSearchResult } from './test_helpers'; import { getMonitorAlerts, getMonitorDetails } from './get_monitor_details'; import * as statusCheck from '../alerts/status_check'; import { CLIENT_ALERT_TYPES } from '../../../../common/constants/alerts'; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_duration.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_duration.test.ts index cc260d6d6bfdf..06d5fae6f5663 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_duration.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_duration.test.ts @@ -7,7 +7,7 @@ import { set } from 'lodash'; import mockChartsData from './__fixtures__/monitor_charts_mock.json'; import { getMonitorDurationChart } from './get_monitor_duration'; -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; describe('ElasticsearchMonitorsAdapter', () => { it('getMonitorChartsData will provide expected filters', async () => { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_status.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_status.test.ts index fba1f57868e0c..6dab9e8a4bb98 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_status.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_monitor_status.test.ts @@ -6,7 +6,7 @@ */ import { getMonitorStatus } from './get_monitor_status'; -import { getUptimeESMockClient, setupMockEsCompositeQuery } from './helper'; +import { getUptimeESMockClient, setupMockEsCompositeQuery } from './test_helpers'; export interface BucketItemCriteria { monitorId: string; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_network_events.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_network_events.test.ts index 9d8f5a590bb54..bb6f2340e4a7d 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_network_events.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_network_events.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; import { getNetworkEvents, secondsToMillis } from './get_network_events'; describe('getNetworkEvents', () => { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts index 3f83cdd84ed0e..4476f4f9e14e7 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_ping_histogram.test.ts @@ -7,7 +7,7 @@ import { getPingHistogram } from './get_ping_histogram'; import * as intervalHelper from '../../../../common/lib/get_histogram_interval'; -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; describe('getPingHistogram', () => { beforeEach(() => { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_pings.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_pings.test.ts index b1fe5528641c2..faf66d4aa8bd8 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_pings.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/get_pings.test.ts @@ -8,7 +8,7 @@ import { getPings } from './get_pings'; import { set } from 'lodash'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../common/constants'; -import { getUptimeESMockClient } from './helper'; +import { getUptimeESMockClient } from './test_helpers'; describe('getAll', () => { let mockEsSearchResult: any; diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/query_context.test.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/query_context.test.ts index 7f969e836fc78..034f3dbd1f973 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/query_context.test.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/query_context.test.ts @@ -8,7 +8,7 @@ import { QueryContext } from './query_context'; import { CursorPagination } from './types'; import { CursorDirection, SortOrder } from '../../../../../common/runtime_types'; -import { getUptimeESMockClient } from '../helper'; +import { getUptimeESMockClient } from '../test_helpers'; describe(QueryContext, () => { // 10 minute range diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/test_helpers.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/test_helpers.ts index 7aafc3aa503c5..5d85b5b89c4fe 100644 --- a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/test_helpers.ts +++ b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/search/test_helpers.ts @@ -8,7 +8,7 @@ import { CursorPagination } from './types'; import { CursorDirection, SortOrder } from '../../../../../common/runtime_types'; import { QueryContext } from './query_context'; -import { getUptimeESMockClient } from '../helper'; +import { getUptimeESMockClient } from '../test_helpers'; export const nextPagination = (key: any): CursorPagination => { return { diff --git a/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/helper.ts b/x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/test_helpers.ts similarity index 100% rename from x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/helper.ts rename to x-pack/plugins/synthetics/server/legacy_uptime/lib/requests/test_helpers.ts diff --git a/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.test.ts index ad9c989bd8b7a..5bd8d05951031 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/get_api_key.test.ts @@ -12,7 +12,7 @@ import { coreMock } from '@kbn/core/server/mocks'; import { syntheticsServiceApiKey } from '../legacy_uptime/lib/saved_objects/service_api_key'; import { KibanaRequest } from '@kbn/core/server'; import { UptimeServerSetup } from '../legacy_uptime/lib/adapters'; -import { getUptimeESMockClient } from '../legacy_uptime/lib/requests/helper'; +import { getUptimeESMockClient } from '../legacy_uptime/lib/requests/test_helpers'; describe('getAPIKeyTest', function () { const core = coreMock.createStart(); diff --git a/x-pack/plugins/synthetics/server/synthetics_service/hydrate_saved_object.test.ts b/x-pack/plugins/synthetics/server/synthetics_service/hydrate_saved_object.test.ts index 86efbd22df56c..c2c0412d940c5 100644 --- a/x-pack/plugins/synthetics/server/synthetics_service/hydrate_saved_object.test.ts +++ b/x-pack/plugins/synthetics/server/synthetics_service/hydrate_saved_object.test.ts @@ -8,7 +8,7 @@ import { hydrateSavedObjects } from './hydrate_saved_object'; import { DecryptedSyntheticsMonitorSavedObject } from '../../common/types'; import { UptimeServerSetup } from '../legacy_uptime/lib/adapters'; -import { getUptimeESMockClient } from '../legacy_uptime/lib/requests/helper'; +import { getUptimeESMockClient } from '../legacy_uptime/lib/requests/test_helpers'; import { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import moment from 'moment'; diff --git a/x-pack/plugins/timelines/common/types/timeline/actions/index.ts b/x-pack/plugins/timelines/common/types/timeline/actions/index.ts index 729be20ef59bd..6e3c5c303383f 100644 --- a/x-pack/plugins/timelines/common/types/timeline/actions/index.ts +++ b/x-pack/plugins/timelines/common/types/timeline/actions/index.ts @@ -14,7 +14,6 @@ import type { GetFieldTableColumns, FieldBrowserProps, BrowserFieldItem, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/triggers-actions-ui-plugin/public/types'; import { OnRowSelected, SortColumnTimeline, TimelineTabs } from '..'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/cases_webhook/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/cases_webhook/types.ts index b1867c28263e4..197470eea6cca 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/cases_webhook/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/cases_webhook/types.ts @@ -5,9 +5,7 @@ * 2.0. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ - -import { +import type { CasesWebhookPublicConfigurationType, CasesWebhookSecretConfigurationType, ExecutorSubActionPushParams, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/types.ts index 22c727df7bb09..bb0268795ec0d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/types.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ExecutorSubActionPushParams } from '@kbn/actions-plugin/server/builtin_action_types/jira/types'; +import type { ExecutorSubActionPushParams } from '@kbn/actions-plugin/server/builtin_action_types/jira/types'; import { UserConfiguredActionConnector } from '../../../../types'; export type JiraActionConnector = UserConfiguredActionConnector; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/resilient/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/resilient/types.ts index fcee38cf441fa..e845590ce2c3d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/resilient/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/resilient/types.ts @@ -5,8 +5,7 @@ * 2.0. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ExecutorSubActionPushParams } from '@kbn/actions-plugin/server/builtin_action_types/resilient/types'; +import type { ExecutorSubActionPushParams } from '@kbn/actions-plugin/server/builtin_action_types/resilient/types'; import { UserConfiguredActionConnector } from '../../../../types'; export type ResilientActionConnector = UserConfiguredActionConnector< diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/types.ts index 07d80f6f78e26..61f66b2be1780 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/types.ts @@ -5,11 +5,10 @@ * 2.0. */ -import { +import type { ExecutorSubActionPushParamsITSM, ExecutorSubActionPushParamsSIR, ExecutorSubActionAddEventParams, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/actions-plugin/server/builtin_action_types/servicenow/types'; import { UserConfiguredActionConnector } from '../../../../types'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/swimlane/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/swimlane/types.ts index f629f98942504..9c8cf1b852bb9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/swimlane/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/swimlane/types.ts @@ -5,9 +5,7 @@ * 2.0. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ - -import { +import type { ExecutorSubActionPushParams, MappingConfigType, } from '@kbn/actions-plugin/server/builtin_action_types/swimlane/types'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_cell_renderer.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_cell_renderer.tsx index 84fc3404f228e..78137d56d70fc 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_cell_renderer.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_cell_renderer.tsx @@ -7,8 +7,7 @@ import React from 'react'; import moment from 'moment'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { EcsEventOutcome } from '@kbn/core/server'; +import type { EcsEventOutcome } from '@kbn/core/server'; import { formatRuleAlertCount } from '../../../../common/lib/format_rule_alert_count'; import { RuleEventLogListStatus } from './rule_event_log_list_status'; import { RuleDurationFormat } from '../../rules_list/components/rule_duration_format'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status.tsx index fd28f62bda0cd..02d5bcf082f28 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status.tsx @@ -7,8 +7,7 @@ import React from 'react'; import { EuiIcon } from '@elastic/eui'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { EcsEventOutcome } from '@kbn/core/server'; +import type { EcsEventOutcome } from '@kbn/core/server'; interface RuleEventLogListStatusProps { status: EcsEventOutcome; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status_filter.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status_filter.tsx index 5eae69c4b6bc2..f70c2ab51400d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status_filter.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list_status_filter.tsx @@ -8,8 +8,7 @@ import React, { useState, useCallback } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFilterButton, EuiPopover, EuiFilterGroup, EuiFilterSelectItem } from '@elastic/eui'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { EcsEventOutcome } from '@kbn/core/server'; +import type { EcsEventOutcome } from '@kbn/core/server'; import { RuleEventLogListStatus } from './rule_event_log_list_status'; const statusFilters: EcsEventOutcome[] = ['success', 'failure', 'unknown']; diff --git a/x-pack/plugins/triggers_actions_ui/public/index.ts b/x-pack/plugins/triggers_actions_ui/public/index.ts index d185c923840a8..12f45dcc31e41 100644 --- a/x-pack/plugins/triggers_actions_ui/public/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/index.ts @@ -7,8 +7,7 @@ // TODO: https://github.com/elastic/kibana/issues/110895 -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { PluginInitializerContext } from '@kbn/core/server'; +import type { PluginInitializerContext } from '@kbn/core/server'; import { Plugin } from './plugin'; export type { diff --git a/x-pack/plugins/upgrade_assistant/common/types.ts b/x-pack/plugins/upgrade_assistant/common/types.ts index 3da2215a14370..768ef135fe555 100644 --- a/x-pack/plugins/upgrade_assistant/common/types.ts +++ b/x-pack/plugins/upgrade_assistant/common/types.ts @@ -6,7 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { SavedObject, SavedObjectAttributes } from '@kbn/core/public'; +import { SavedObject, SavedObjectAttributes } from '@kbn/core/types'; export type DeprecationSource = 'Kibana' | 'Elasticsearch'; diff --git a/x-pack/plugins/ux/common/fetch_options.ts b/x-pack/plugins/ux/common/fetch_options.ts index 14b8900e6ed26..3d0f9f290cca1 100644 --- a/x-pack/plugins/ux/common/fetch_options.ts +++ b/x-pack/plugins/ux/common/fetch_options.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpFetchOptions } from '@kbn/core/public'; +import type { HttpFetchOptions } from '@kbn/core/public'; export type FetchOptions = Omit & { pathname: string; diff --git a/x-pack/plugins/ux/public/services/rest/create_call_apm_api.ts b/x-pack/plugins/ux/public/services/rest/create_call_apm_api.ts index f7e9b6799e17d..cb8522c95e3af 100644 --- a/x-pack/plugins/ux/public/services/rest/create_call_apm_api.ts +++ b/x-pack/plugins/ux/public/services/rest/create_call_apm_api.ts @@ -16,7 +16,6 @@ import { formatRequest } from '@kbn/server-route-repository'; import type { APMServerRouteRepository, APIEndpoint, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/apm-plugin/server'; import { InspectResponse } from '@kbn/observability-plugin/typings/common'; import { CallApi, callApi } from './call_api';