Showing 98 of 257 total issues
Function renderItem
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
renderItem(item, path = '', subtitle = false) {
let finalChildren = [];
for (let prop in item) {
if (item.hasOwnProperty(prop)) {
if (typeof item[prop] === 'object') {
- 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 render
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { size, color, style, absolute, hidden, ...props } = this.props;
let containerStyle = { ...styles.container };
let componentStyle = {
Function render
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<svg x="0px" y="0px" viewBox="0 0 302.6 49.2" width="116" height="20" style={{ padding: '10px 10px 0 10px' }}>
<g>
<path
Function render
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let {
style,
label,
size,
Function render
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let {
style,
label,
size,
Function render
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
render() {
let { style, label, color, ...props } = this.props;
let componentStyle = {
...styles.radio,
...(this.context.theme === 'dark' ? styles['radioDark'] : {})
- 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 styleHelper
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export default function styleHelper(options, propTypes, mapStyleCallback, mapStylesCallback, mapProps) {
if (!mapProps || typeof mapProps !== 'function') {
mapProps = props => props;
}
- 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 render
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
render() {
let {
style,
label,
size,
- 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 render
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let { style, label, color, ...props } = this.props;
let componentStyle = {
...styles.radio,
...(this.context.theme === 'dark' ? styles['radioDark'] : {})
Function render
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
render() {
let {
style,
label,
size,
- 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 render
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { style } = this.props;
let children;
// todo: use Children.map
- 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 render
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let {
style,
onClick,
onMaximizeClick,
Function mapAlignmentStyle
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function mapAlignmentStyle(key, value, props) {
let finalKey, finalValue;
if (allowedValues.indexOf(value) === -1) {
console.error('Unknown value for ' + key + ': ' + value);
} else {
- 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 applyDefaultProps
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
export function applyDefaultProps(props, context, defaultProps) {
let finalProps = { ...props };
for (let prop in defaultProps) {
if (defaultProps.hasOwnProperty(prop)) {
- 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 mapRules
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function mapRules(selector, style) {
let styles = { 0: style };
if (style[':hover']) {
styles = { ...styles, ':hover': style[':hover'] };
delete styles[0][':hover'];
- 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 render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let { style, label, isWindowFocused, ...props } = this.props;
const { transition } = this.state;
let componentStyle = { ...styles.checkbox, ...style };
let labelStyle = styles.label;
Function render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let { style, label, isWindowFocused, ...props } = this.props;
const { transition } = this.state;
let componentStyle = { ...styles.radio, ...style };
let labelStyle = styles.label;
Function render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const isChecked = this.state.theme === 'dark';
let colorPicker;
if (this.state.displayColorPicker) {
Function mapStyle
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export function mapStyle(prevStyles, nextStyles, defaultStyles, styleCallback, stylesCallback, props) {
let finalStyles = { ...prevStyles };
if (defaultStyles) {
for (let key in defaultStyles) {
if (defaultStyles.hasOwnProperty(key)) {
- 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 rotateCircle
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function rotateCircle(circles) {
let lastFrame = false;
for (var i = 0, len = circles.length; i < len; ++i) {
if (this.iteration >= circlesInterval * i) {
let iteration = this.iteration - circlesInterval * i;
- 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"