Function render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { entity, showTitle, showType, relationships, showSubset, groupGeolocations } =
this.props;
let header = '';
if (showTitle || showType) {
- Read upRead up
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
Definition for rule 'node/no-restricted-import' was not found. Open
import ShowIf from 'app/App/ShowIf';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Prop type "any" is forbidden Open
relationships: PropTypes.any,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "relationships" is not required, but has no corresponding defaultProps declaration. Open
relationships: PropTypes.any,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "entity" is not required, but has no corresponding defaultProps declaration. Open
entity: PropTypes.object,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "showType" is not required, but has no corresponding defaultProps declaration. Open
showType: PropTypes.bool,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Prop type "object" is forbidden Open
entity: PropTypes.object,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "templates" is not required, but has no corresponding defaultProps declaration. Open
templates: PropTypes.object,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
propType "showTitle" is not required, but has no corresponding defaultProps declaration. Open
showTitle: PropTypes.bool,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Prefer named exports. Open
export default connect(mapStateToProps)(ShowMetadata);
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Prop type "object" is forbidden Open
templates: PropTypes.object,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
'templates' PropType is defined but prop is never used Open
templates: PropTypes.object,
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/