BookStackApp/BookStack

View on GitHub
resources/js/wysiwyg/ui/index.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function buildEditorUI has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function buildEditorUI(container: HTMLElement, element: HTMLElement, scrollContainer: HTMLElement, editor: LexicalEditor, options: Record<string, any>): EditorUiContext {
    const manager = new EditorUIManager();
    const context: EditorUiContext = {
        editor,
        containerDOM: container,
Severity: Minor
Found in resources/js/wysiwyg/ui/index.ts - About 1 hr to fix

    Function buildEditorUI has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function buildEditorUI(container: HTMLElement, element: HTMLElement, scrollContainer: HTMLElement, editor: LexicalEditor, options: Record<string, any>): EditorUiContext {
    Severity: Minor
    Found in resources/js/wysiwyg/ui/index.ts - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status