superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Avoid too many return statements within this function.
Open

            return 'handled';
Severity: Major
Found in scripts/core/editor3/components/Editor3Component.tsx - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return null;
    Severity: Major
    Found in scripts/core/editor3/components/media/MediaBlock.tsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return 'delete';
      Severity: Major
      Found in scripts/core/editor3/components/Editor3Component.tsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                            return 'handled';
        Severity: Major
        Found in scripts/core/editor3/components/Editor3Component.tsx - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return 'not-handled';
          Severity: Major
          Found in scripts/core/editor3/components/Editor3Component.tsx - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return null;
            Severity: Major
            Found in scripts/core/editor3/components/blockRenderer.tsx - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return saveEditorStatus(state, editorState, 'change-inline-style', true);
              Severity: Major
              Found in scripts/core/editor3/reducers/suggestions.tsx - About 30 mins to fix

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.handleClicks = this.handleClicks.bind(this);
                    }
                Severity: Major
                Found in scripts/extensions/sams/src/ui/list/ListItem.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.saveSnapshot = this.saveSnapshot.bind(this);
                    }
                Severity: Major
                Found in scripts/apps/search/components/SmoothLoader.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.saveSnapshot = this.saveSnapshot.bind(this);
                    }
                Severity: Major
                Found in scripts/apps/search/components/SmoothLoaderOuter.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.doSendCorrection = this.doSendCorrection.bind(this);
                    }
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.patchSubitem = this.patchSubitem.bind(this);
                    }
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IPropsSelectBoxWithoutMutation) {
                        super(props);
                
                        this.toggle = this.toggle.bind(this);
                    }
                Severity: Major
                Found in scripts/apps/search/components/SelectBox.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.closeModal = this.closeModal.bind(this);
                    }
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.togglePopup = this.togglePopup.bind(this);
                    }
                Severity: Major
                Found in scripts/core/helpers/with-popover.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.edit = this.edit.bind(this);
                    }
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.markForDesk = this.markForDesk.bind(this);
                    }
                Severity: Major
                Found in scripts/apps/desks/components/MarkBtn.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.handleShortcutChange = this.handleShortcutChange.bind(this);
                    }
                Severity: Major
                Found in scripts/apps/authoring-react/fields/date/config.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.changeFilter = this.changeFilter.bind(this);
                    }
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/authoring-react/with-keybindings.tsx on lines 9..13
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 17 locations. Consider refactoring.
                Open

                    constructor(props: IProps) {
                        super(props);
                
                        this.handleKeyUp = this.handleKeyUp.bind(this);
                    }
                Severity: Major
                Found in scripts/apps/authoring-react/with-keybindings.tsx and 16 other locations - About 30 mins to fix
                scripts/apps/authoring-react/fields/date/config.tsx on lines 9..13
                scripts/apps/authoring-react/fields/media/media-carousel/image.tsx on lines 24..28
                scripts/apps/authoring-react/fields/urls/editor.tsx on lines 16..20
                scripts/apps/desks/components/MarkBtn.tsx on lines 11..15
                scripts/apps/search/components/SelectBox.tsx on lines 45..49
                scripts/apps/search/components/SmoothLoader.tsx on lines 16..20
                scripts/apps/search/components/SmoothLoaderOuter.tsx on lines 16..20
                scripts/core/helpers/with-popover.tsx on lines 17..21
                scripts/core/interactive-article-actions-panel/actions/send-correction-tab.tsx on lines 19..23
                scripts/extensions/broadcasting/src/authoring-fields/subitems/subitems-view-edit.tsx on lines 29..33
                scripts/extensions/sams/src/components/assets/assetTypeFilterButtons.tsx on lines 37..41
                scripts/extensions/sams/src/components/sets/manageSetsModal.tsx on lines 54..58
                scripts/extensions/sams/src/ui/grid/GridItem.tsx on lines 16..20
                scripts/extensions/sams/src/ui/list/ListItem.tsx on lines 25..29
                scripts/extensions/sams/src/ui/modal/Modal.tsx on lines 17..21
                scripts/core/with-resources.tsx on lines 226..230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language