diff --git a/.eslintrc.js b/.eslintrc.js index fff0e3a9d62f8..c86967aeeca5c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2316,6 +2316,83 @@ module.exports = { ], }, }, + { + files: [ + 'src/platform/plugins/**/ui_tests/**/*.ts', + 'x-pack/platform/**/plugins/**/ui_tests/**/*.ts', + ], + rules: { + 'no-restricted-imports': [ + 'error', + { + paths: [ + { + name: '@playwright/test', + message: "Platform tests should import only from '@kbn/scout'.", + }, + { + name: 'playwright', + message: "Platform tests should import only from '@kbn/scout'.", + }, + ], + }, + ], + }, + }, + { + files: ['x-pack/solutions/observability/plugins/**/ui_tests/**/*.ts'], + rules: { + 'no-restricted-imports': [ + 'error', + { + paths: [ + { + name: '@kbn/scout', + message: + "Observability solution tests should import from '@kbn/scout-oblt' instead.", + }, + { + name: '@playwright/test', + message: + "Observability solution tests should import from '@kbn/scout-oblt' instead.", + }, + { + name: 'playwright', + message: + "Observability solution tests should import from '@kbn/scout-oblt' instead.", + }, + ], + }, + ], + }, + }, + { + files: ['x-pack/solutions/security/plugins/**/ui_tests/**/*.ts'], + rules: { + 'no-restricted-imports': [ + 'error', + { + paths: [ + { + name: '@kbn/scout', + message: + "Security solution tests should import from '@kbn/scout-security' instead.", + }, + { + name: '@playwright/test', + message: + "Security solution tests should import from '@kbn/scout-security' instead.", + }, + { + name: 'playwright', + message: + "Security solution tests should import from '@kbn/scout-security' instead.", + }, + ], + }, + ], + }, + }, ], }; diff --git a/x-pack/platform/plugins/shared/streams_app/tsconfig.json b/x-pack/platform/plugins/shared/streams_app/tsconfig.json index 27ad746c690c6..5cf63f87ad3ee 100644 --- a/x-pack/platform/plugins/shared/streams_app/tsconfig.json +++ b/x-pack/platform/plugins/shared/streams_app/tsconfig.json @@ -75,6 +75,6 @@ "@kbn/kibana-utils-plugin", "@kbn/field-types", "@kbn/field-formats-plugin", - "@kbn/test" + "@kbn/test", ] } diff --git a/x-pack/solutions/observability/plugins/observability/tsconfig.json b/x-pack/solutions/observability/plugins/observability/tsconfig.json index baa1f1f88bd15..9d8a9590fd6f4 100644 --- a/x-pack/solutions/observability/plugins/observability/tsconfig.json +++ b/x-pack/solutions/observability/plugins/observability/tsconfig.json @@ -125,5 +125,7 @@ "@kbn/core-pricing-browser-mocks", "@kbn/esql", ], - "exclude": ["target/**/*"] + "exclude": [ + "target/**/*" + ] }