chore(NA): avoids imports of server code into public (#67152)

This commit is contained in:
Tiago Costa 2020-05-21 18:33:33 +01:00 committed by GitHub
parent bcf1f1f93e
commit cd9084d439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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