@stesura/format-lint-react
The format cleanup UI for the @stesura/format-lint plugin: an Export-tab
button, a status-bar count and the right panel. Setup is in the
Format cleanup guide.
UI extension
formatLintUIExtension
The format cleanup UI (Export-tab button, status-bar count, right panel),
to pass via uiExtensions next to formatLintPlugin() in the mount’s
plugins. Module level: the editor expects a stable uiExtensions array.
Components
FormatLintPanel
Right-hand panel listing the document’s format suggestions in document order: what “Fix all” applies first, then hints, which are one click each. Rows go to their paragraphs; ignored ones move to their own tab. While track changes is on, applying needs an explicit override.
| Name | Type | Default |
|---|---|---|
props | {} |
FormatLintStatusBar
Status-bar count of what “Fix all” would clean up; opens the panel.
| Name | Type | Default |
|---|---|---|
props | {} |
FormatLintToolbarGroup
Export-tab group with the button that toggles the format cleanup panel.
| Name | Type | Default |
|---|---|---|
props | {} |
FORMAT_LINT_PANEL_ACTION
Right-panel action id of the format cleanup panel.
Hooks
useFormatLint
The root editor’s suggestions, from the debounced state. Undefined without the plugin.
{ installed: boolean; enabled: boolean; stale: boolean; suggestions: FormatSuggestion[]; ignoredSuggestions: FormatSuggestion[]; applicable: FormatSuggestion[]; ignored: number; blocked: string | null; }useFormatLintActions
Actions against the root editor, stable across renders.