huridocs/uwazi

View on GitHub
app/react/Layout/DocumentsList.js

Summary

Maintainability
A
2 hrs
Test Coverage
A
91%

Function render has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

  render() {
    const {
      documents,
      connections,
      GraphView,
Severity: Minor
Found in app/react/Layout/DocumentsList.js - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Prop type "object" is forbidden
Open

  connectionsGroups: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "search" is not required, but has no corresponding defaultProps declaration.
Open

  search: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "clickOnDocument" is not required, but has no corresponding defaultProps declaration.
Open

  clickOnDocument: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prefer named exports.
Open

export default withRouter(DocumentsList);
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prop type "object" is forbidden
Open

  filters: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "LoadMoreButton" is not required, but has no corresponding defaultProps declaration.
Open

  LoadMoreButton: PropTypes.func,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "searchDocuments" is not required, but has no corresponding defaultProps declaration.
Open

  searchDocuments: PropTypes.func,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "connections" is not required, but has no corresponding defaultProps declaration.
Open

  connections: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prop type "object" is forbidden
Open

  search: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "selectAllDocuments" is not required, but has no corresponding defaultProps declaration.
Open

  selectAllDocuments: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "loadMoreDocuments" is not required, but has no corresponding defaultProps declaration.
Open

  loadMoreDocuments: PropTypes.func,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'node/no-restricted-import' was not found.
Open

/* eslint-disable max-lines */
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "storeKey" is not required, but has no corresponding defaultProps declaration.
Open

  storeKey: PropTypes.string,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "deleteConnection" is not required, but has no corresponding defaultProps declaration.
Open

  deleteConnection: PropTypes.func,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "filters" is not required, but has no corresponding defaultProps declaration.
Open

  filters: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

'search' PropType is defined but prop is never used
Open

  search: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "onSnippetClick" is not required, but has no corresponding defaultProps declaration.
Open

  onSnippetClick: PropTypes.func,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "searchCentered" is not required, but has no corresponding defaultProps declaration.
Open

  searchCentered: PropTypes.bool,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prop spreading is forbidden
Open

            {...{
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prop type "object" is forbidden
Open

  connections: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prop type "object" is forbidden
Open

  documents: PropTypes.object.isRequired,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "thesauri" is not required, but has no corresponding defaultProps declaration.
Open

  thesauri: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "view" is not required, but has no corresponding defaultProps declaration.
Open

  view: PropTypes.string,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Prop type "object" is forbidden
Open

  thesauri: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "GraphView" is not required, but has no corresponding defaultProps declaration.
Open

  GraphView: PropTypes.func,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

'scrollCount' PropType is defined but prop is never used
Open

  scrollCount: PropTypes.number,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

'thesauri' PropType is defined but prop is never used
Open

  thesauri: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "sortButtonsStateProperty" is not required, but has no corresponding defaultProps declaration.
Open

  sortButtonsStateProperty: PropTypes.string,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "connectionsGroups" is not required, but has no corresponding defaultProps declaration.
Open

  connectionsGroups: PropTypes.object,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

propType "hideFooter" is not required, but has no corresponding defaultProps declaration.
Open

  hideFooter: PropTypes.bool,
Severity: Minor
Found in app/react/Layout/DocumentsList.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

There are no issues that match your filters.

Category
Status