Showing 179 of 254 total issues
Consider simplifying this complex logical expression. Open
if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
ret = Sizzle.find( parts.shift(), context, contextXML );
context = ret.expr ?
Consider simplifying this complex logical expression. Open
if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
type === "select-multiple" ) {
return testChange.call( this, e );
}
Function PSEUDO
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
PSEUDO: function( match, curLoop, inplace, result, not ) {
Function textSelection
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jQuery.fn.textSelection = function( start, end ) {
return this.each(function( i, element ) {
var textarea = jQuery( element ),
height = textarea.height(),
current, caret, ypos, range;
- 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 callback
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
callback: function( value, position, compressor ) {
var m = rhsl.exec( value ),
str = '#',
h, s, l,
p, q;
- 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 callback
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
callback: function( branches, compressor ) {
function strip( array ) {
for ( var i = -1, branch; ++i < array.length; ) {
branch = array[ 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
Avoid too many return
statements within this function. Open
return diff === 0;
Avoid too many return
statements within this function. Open
return siblingCheck( ap[i], bp[i] );
Avoid too many return
statements within this function. Open
return jQuery( context ).find( selector );
Avoid too many return
statements within this function. Open
return this.each(function(i) {
var self = jQuery(this), val = value;
if ( this.nodeType !== 1 ) {
return;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return (context || rootjQuery).find( selector );
Avoid too many return
statements within this function. Open
return (elem.value || "").replace(rreturn, "");
Avoid too many return
statements within this function. Open
return { top: top, left: left };
Avoid too many return
statements within this function. Open
return this;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return elem.getAttribute("value") === null ? "on" : elem.value;
Avoid too many return
statements within this function. Open
return attr === null ? undefined : attr;
Avoid too many return
statements within this function. Open
return i === al ?
siblingCheck( a, bp[i], -1 ) :
siblingCheck( ap[i], b, 1 );
Avoid too many return
statements within this function. Open
return false;