Showing 214 of 347 total issues
Function collectFeild
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function collectFeild(nodes, fields, validator) {
for (var i = 0, vdom; vdom = nodes[i++];) {
var duplex = vdom.rules && vdom.duplex
if (duplex) {
fields.push(duplex)
- 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 collectHooks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function collectHooks(a, list) {
for (var i in a) {
if (componentEvents[i]) {
if (typeof a[i] === 'function' &&
i.indexOf('on') === 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 deepEquals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function deepEquals(a, b, level) {
if (level === 0)
return a === b
if (a === null && b === null)
return true
- 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 setOption
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function setOption(vdom, values) {
var props = vdom.props
if (!('disabled' in props)) {
var value = getOptionValue(vdom, props)
value = String(value || '').trim()
- 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
Avoid too many return
statements within this function. Open
return !(val && val.nodeName && val.nodeType)
Avoid too many return
statements within this function. Open
return !obj.window //IE6-8 window
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return 3
Avoid too many return
statements within this function. Open
return NaN
Avoid too many return
statements within this function. Open
return 5
Avoid too many return
statements within this function. Open
return false
Avoid too many return
statements within this function. Open
return false
Avoid too many return
statements within this function. Open
return key === undefined || ohasOwn.call(obj, key)
Avoid too many return
statements within this function. Open
return 4
Avoid too many return
statements within this function. Open
return equalObject(a, b, level)
Avoid too many return
statements within this function. Open
return a === b
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return false
Avoid too many return
statements within this function. Open
return equalArray(a, b, level)
Function touchmove
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
touchmove: function(event) {
Recognizer.move(event, function(pointer) {
if (pointer.distance > 10 && pointer.pressingHandler) {
pressRecognizer.cancelPress(pointer)
if (pointer.status === 'tapping') {
- 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"