FN-6106: block plugin view re-exports from server entries

Add an ESLint guard to keep plugin dashboard views out of server entrypoints.

- add a custom fusion/no-plugin-view-reexport ESLint rule for plugin src/index.ts files
- flag relative re-exports of *-view entrypoints so CSS-bearing dashboard modules stay out of Node-loaded plugin entries
- document the server-entry export constraint in the plugin authoring guide

Files changed:
 docs/PLUGIN_AUTHORING.md |  1 +
 eslint.config.mjs        | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

Fusion-Task-Id: FN-6106

Fusion-Task-Lineage: 6bbfa073-e7fd-42a9-a332-c638b81cd55f
This commit is contained in:
gsxdsm
2026-06-09 10:35:58 -07:00
parent 0b0186a22e
commit 47e82408af
2 changed files with 48 additions and 0 deletions

View File

@@ -763,6 +763,7 @@ The host then renders plugin views via `PluginDashboardViewHost` using the compo
Bundled workspace plugin pattern:
- Keep plugin package under `plugins/` (for example `plugins/fusion-plugin-roadmap`)
- Export backend/plugin entry from `src/index.ts` and keep dashboard view exports in the plugin package (for example `./dashboard-view`)
- Do not re-export dashboard view entrypoints (including `dashboard-view`, `manage-view`, or other `-view` modules) from `src/index.ts`; the `fusion/no-plugin-view-reexport` ESLint guard catches violations because server-side plugin entries must not transitively load CSS
- Register the lazy dashboard component in host code (currently `packages/dashboard/app/plugins/registerBundledPluginViews.ts`)
- CLI bundling inlines backend plugin code from workspace packages; dashboard view modules are imported by the dashboard build via the host registry