Add eslint rule to forbid importing server code from public code #49053
Labels
Feature:New Platform
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Importing server bits from client code can be very dangerous and heavy in term of side effects, unexpected behaviour and bundle size. This is something that should be explicitly forbidden and needs an eslint check.
Exemple: in
src/plugins/kibana_react/public/saved_objects/saved_object_finder.tsx
:import { SavedObjectAttributes } from '../../../../core/server';
We should probably be able to re-use
@kbn/eslint/no-restricted-paths
for thisThe text was updated successfully, but these errors were encountered: