superdesk/superdesk-client-core

View on GitHub
scripts/apps/authoring-react/authoring-section/get-field-container.tsx

Summary

Maintainability
C
7 hrs
Test Coverage

Function getFieldContainer has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function getFieldContainer(
    useHeaderLayout: boolean,
    canBeToggled: boolean,
    field: IAuthoringFieldV2,
    toggledOn: boolean,

    Function render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            render() {
                const {miniToolbar, sectionClassNames} = this.props;
    
                return (
                    <div className={sectionClassNames?.header}>

      Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              render() {
                  const {miniToolbar, sectionClassNames} = this.props;
      
                  return (
                      <div className={sectionClassNames?.content}>

        Function getFieldContainer has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            useHeaderLayout: boolean,
            canBeToggled: boolean,
            field: IAuthoringFieldV2,
            toggledOn: boolean,
            toggleField: (fieldId: string) => void,
        Severity: Minor
        Found in scripts/apps/authoring-react/authoring-section/get-field-container.tsx - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status