BookStackApp/BookStack

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

Summary

Maintainability
C
1 day
Test Coverage

File tables.ts has 300 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
    EditorFormDefinition,
    EditorFormFieldDefinition,
    EditorFormTabs,
    EditorSelectFormFieldDefinition
Severity: Minor
Found in resources/js/wysiwyg/ui/defaults/forms/tables.ts - About 3 hrs to fix

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

                build() {
                    const generalFields: EditorFormFieldDefinition[] = [
                        {
                            label: 'Width', // Colgroup width
                            name: 'width',
    Severity: Major
    Found in resources/js/wysiwyg/ui/defaults/forms/tables.ts - About 2 hrs to fix

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

                  build() {
                      const generalFields: EditorFormFieldDefinition[] = [
                          {
                              label: 'Width', // Style - width
                              name: 'width',
      Severity: Minor
      Found in resources/js/wysiwyg/ui/defaults/forms/tables.ts - About 1 hr to fix

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

            async action(formData, context: EditorUiContext) {
                context.editor.update(() => {
                    const table = $getTableFromSelection($getSelection());
                    if (!table) {
                        return;
        Severity: Minor
        Found in resources/js/wysiwyg/ui/defaults/forms/tables.ts - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status