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/**/*',