src/tabs.js
Function render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function () {
const styles = this.styles() // Gets the user styles for this element
let filler = this.state.menuFixed
? <div
style={{
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
render: function () {
const styles = this.styles() // Gets the user styles for this element
let filler = this.state.menuFixed
? <div
style={{
- 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
Function elements
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let elements = this.props.elements.map((element, i) => {
let style = {
width: elementWidth + '%'
}
Function styles
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
styles: function () {
let styles = {
lineStyle: this.props.lineStyle || {},
selectedTabStyle: this.props.selectedTabStyle || defaultStyles.selectedTabStyle,
tabsStyle: this.props.tabsStyle || {},
- 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 'react/jsx-sort-prop-types' was not found Open
Open
'use strict'
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Missing parentheses around multilines JSX Open
Open
? <div
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Props should be sorted alphabetically Open
Open
aria-multiselectable="false"
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/