huridocs/uwazi

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

Summary

Maintainability
A
55 mins
Test Coverage
A
100%

Showing 8 of 8 total issues

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

render() {
const { doc } = this.props;
 
if (!doc.get('file')) {
return null;
Severity: Minor
Found in app/react/Layout/DocumentLanguage.js - About 55 mins to fix

Expected to return a value at the end of method 'render'.
Open

render() {
Severity: Minor
Found in app/react/Layout/DocumentLanguage.js by eslint

Export statements should appear at the end of the file
Open

export class DocumentLanguage extends Component {
Severity: Minor
Found in app/react/Layout/DocumentLanguage.js by eslint

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

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

Prefer named exports.
Open

export default connect(mapStateToProps)(DocumentLanguage);
Severity: Minor
Found in app/react/Layout/DocumentLanguage.js by eslint

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

import PropTypes from 'prop-types';
Severity: Minor
Found in app/react/Layout/DocumentLanguage.js by eslint

Prop type "object" is forbidden
Open

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

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

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

There are no issues that match your filters.

Category
Status