BookStackApp/BookStack

View on GitHub
resources/js/wysiwyg/ui/defaults/forms/objects.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function build has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            build() {
                return new EditorFormTabs([
                    {
                        label: 'General',
                        contents: [
Severity: Minor
Found in resources/js/wysiwyg/ui/defaults/forms/objects.ts - About 1 hr to fix

    Function action has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        async action(formData, context: EditorUiContext) {
            const selectedNode: MediaNode|null = await (new Promise((res, rej) => {
                context.editor.getEditorState().read(() => {
                    const node = $getNodeFromSelection($getSelection(), $isMediaNode);
                    res(node as MediaNode|null);
    Severity: Minor
    Found in resources/js/wysiwyg/ui/defaults/forms/objects.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status