superdesk/superdesk-client-core

View on GitHub
scripts/core/services/modalService.tsx

Summary

Maintainability
B
4 hrs
Test Coverage

Function showPrintableModal has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function showPrintableModal(
    Component: React.ComponentType<IPropsPrintableModal>,
) {
    showModal(({closeModal}) => {
        return (
Severity: Minor
Found in scripts/core/services/modalService.tsx - About 1 hr to fix

    Function getErrorsModal has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getErrorsModal(
        title: string,
        errors: Array<string>,
        description?: string,
    ) {
    Severity: Minor
    Found in scripts/core/services/modalService.tsx - About 1 hr to fix

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

              function confirmBase(
                  bodyText,
                  headerText,
                  okText,
                  cancelText,
      Severity: Minor
      Found in scripts/core/services/modalService.tsx - About 1 hr to fix

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

                    bodyText = defaults.bodyText,
                    headerText = defaults.headerText,
                    okText = defaults.okText,
                    cancelText = defaults.cancelText,
                    additionalCancelText = defaults.additionalCancelText,
        Severity: Minor
        Found in scripts/core/services/modalService.tsx - About 35 mins to fix

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

                      bodyText,
                      headerText,
                      okText,
                      cancelText,
                      additionalCancelText,
          Severity: Minor
          Found in scripts/core/services/modalService.tsx - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status