Showing 32 of 58 total issues
Function default
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (tagName) {
return {
getInitialState: function () {
return {
maxHeight: 0,
Function default
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
export default function (tagName) {
return {
getInitialState: function () {
return {
maxHeight: 0,
- 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 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
const classes = classnames({
'xb-button': true,
'_disabled': this.props.disabled,
'_focused': this.state.focused,
TableNavigator
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
export default class TableNavigator {
constructor(node, options) {
this._options = _.merge({
col: 'xb-menu:not([disabled])',
row: 'xb-menuitem:not([disabled])',
Function default
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export default function (event) {
if (event.hasOwnProperty(ConstantEvent.WRAP)) {
return event;
}
- 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
File TableNavigator.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'lodash';
import { event as xevent } from 'xblocks-core';
import delegate from 'event/delegate';
import filterClick from 'event/filterClick';
import filterMouse from 'event/filterMouse';
Function default
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function (node, callback, context, inner) {
inner = (typeof inner === 'undefined' ? true : Boolean(inner));
var next;
var cbcall;
- 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 default
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function (node, callback, context, inner) {
inner = (typeof inner === 'undefined' ? true : Boolean(inner));
var prev;
var cbcall;
- 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 menuitemSelect
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
menuitemSelect: function () {
if (!this.selectable) {
return;
}
Function default
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function (node, callback) {
var stack = [ node ];
var item;
var cbcall;
var childsLength;
- 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 default
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function (node, callback) {
var stack = [ node ];
var item;
var cbcall;
var 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"
Further reading
Function default
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (event) {
if (event.hasOwnProperty(ConstantEvent.WRAP)) {
return event;
}
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
const classes = classnames({
[ tagName ]: true
});
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
const classes = classnames({
'xb-checkbox': true,
'_disabled': this.props.disabled,
[ `_size-${this.props.size}` ]: true
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
const classes = classnames({
'xb-radio': true,
'_disabled': this.props.disabled,
[ `_size-${this.props.size}` ]: true
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
const classes = classnames({
'xb-menuitem': true,
'_disabled': this.props.disabled,
'_focused': this.props.focused,
Function fillOptionsFromAttrs
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function fillOptionsFromAttrs(popupOptions, attrs) {
for (let attrName in attrs) {
let params = ATTRS_ALIGN[ attrName ];
if (!params) {
continue;
- 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 xb-speech-recognition-result
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
'xb-speech-recognition-result': function (event) {
if (event.detail) {
var input = this.querySelector('input');
if (event.detail.interim) {
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
const classes = classnames({
'_content': true,
'_empty': this.context.isEmptyContent()
});
Function default
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function (selector, target) {
if (!target || !target.tagName) {
return;
}
- 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"