From 199f51cf538b869c8f37a97c9fa1875ce01795a5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 21 May 2020 02:10:52 +0100 Subject: [PATCH] chore(NA): avoids imports of server code into public --- .eslintrc.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 6b3378d44cb81..86ac92de9042d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -197,6 +197,11 @@ module.exports = { from: ['src/core/utils/**/*'], errorMessage: `Plugins may only import from src/core/server and src/core/public.`, }, + { + target: ['(src|x-pack)/plugins/*/public/**/*'], + from: ['(src|x-pack)/plugins/*/server/**/*'], + errorMessage: `Public code can not import from server, use a common directory.`, + }, { target: [ '(src|x-pack)/legacy/**/*',