jquery/jquery

View on GitHub

Showing 230 of 230 total issues

Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

jQuery.Callbacks = function( options ) {

    // Convert options from String-formatted to Object-formatted if needed
    // (we check in cache first)
    options = typeof options === "string" ?
Severity: Major
Found in src/callbacks.js - About 4 hrs to fix

    Function extend has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    jQuery.extend = jQuery.fn.extend = function() {
        var options, name, src, copy, copyIsArray, clone,
            target = arguments[ 0 ] || {},
            i = 1,
            length = arguments.length,
    Severity: Minor
    Found in src/core.js - About 4 hrs to fix

    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 style has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        style: function( elem, name, value, extra ) {
    
            // Don't set styles on text and comment nodes
            if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                return;
    Severity: Minor
    Found in src/css.js - About 4 hrs to fix

    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 exports has 104 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function( Release, files, complete ) {
    
        const fs = require( "fs" ).promises;
        const shell = require( "shelljs" );
        const inquirer = require( "inquirer" );
    Severity: Major
    Found in build/release/dist.js - About 4 hrs to fix

      Function then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      then: function( onFulfilled, onRejected, onProgress ) {
                          var maxDepth = 0;
                          function resolve( depth, deferred, handler, special ) {
                              return function() {
                                  var that = this,
      Severity: Major
      Found in src/deferred.js - About 4 hrs to fix

        Function Animation has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
        Open

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = Animation.prefilters.length,
        Severity: Minor
        Found in src/effects.js - About 3 hrs to fix

        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 manipulation.js has 329 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import jQuery from "./core.js";
        import isAttached from "./core/isAttached.js";
        import flat from "./var/flat.js";
        import isIE from "./var/isIE.js";
        import push from "./var/push.js";
        Severity: Minor
        Found in src/manipulation.js - About 3 hrs to fix

          Function Animation has 95 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function Animation( elem, properties, options ) {
              var result,
                  stopped,
                  index = 0,
                  length = Animation.prefilters.length,
          Severity: Major
          Found in src/effects.js - About 3 hrs to fix

            Function trigger has 94 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                trigger: function( event, data, elem, onlyHandlers ) {
            
                    var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                        eventPath = [ elem || document ],
                        type = hasOwn.call( event, "type" ) ? event.type : event,
            Severity: Major
            Found in src/event/trigger.js - About 3 hrs to fix

              Function cleanData has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  cleanData: function( elems ) {
                      var data, elem, type,
                          special = jQuery.event.special,
                          i = 0;
              
              
              Severity: Minor
              Found in src/manipulation.js - About 3 hrs to fix

              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 access has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                  var i = 0,
                      len = elems.length,
                      bulk = key == null;
              
              
              Severity: Minor
              Found in src/core/access.js - About 3 hrs to fix

              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 ajaxHandleResponses has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
              Open

              function ajaxHandleResponses( s, jqXHR, responses ) {
              
                  var ct, type, finalDataType, firstDataType,
                      contents = s.contents,
                      dataTypes = s.dataTypes;
              Severity: Minor
              Found in src/ajax.js - About 3 hrs to fix

              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 showHide has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
              Open

              function showHide( elements, show ) {
                  var display, elem,
                      values = [],
                      index = 0,
                      length = elements.length;
              Severity: Minor
              Found in src/css/showHide.js - About 3 hrs to fix

              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 boxModelAdjustment has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
              Open

              function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                  var i = dimension === "width" ? 1 : 0,
                      extra = 0,
                      delta = 0;
              
              
              Severity: Minor
              Found in src/css.js - About 3 hrs to fix

              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 data has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
              Open

                  data: function( key, value ) {
                      var i, name, data,
                          elem = this[ 0 ],
                          attrs = elem && elem.attributes;
              
              
              Severity: Minor
              Found in src/data.js - About 3 hrs to fix

              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 Gruntfile.js has 301 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              "use strict";
              
              module.exports = function( grunt ) {
                  function readOptionalJSON( filepath ) {
                      var stripJSONComments = require( "strip-json-comments" ),
              Severity: Minor
              Found in Gruntfile.js - About 3 hrs to fix

                Function speed has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                Open

                jQuery.speed = function( speed, easing, fn ) {
                    var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
                        complete: fn || !fn && easing ||
                            typeof speed === "function" && speed,
                        duration: speed,
                Severity: Minor
                Found in src/effects.js - About 3 hrs to fix

                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 CHILD has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        CHILD: function( type, what, _argument, first, last ) {
                            var simple = type.slice( 0, 3 ) !== "nth",
                                forward = type.slice( -4 ) !== "last",
                                ofType = what === "of-type";
                
                
                Severity: Major
                Found in src/selector.js - About 2 hrs to fix

                  Function find has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function find( selector, context, results, seed ) {
                      var m, i, elem, nid, match, groups, newSelector,
                          newContext = context && context.ownerDocument,
                  
                          // nodeType defaults to 9, since context defaults to document
                  Severity: Major
                  Found in src/selector.js - About 2 hrs to fix

                    Function removeClass has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        removeClass: function( value ) {
                            var classes, elem, cur, curValue, clazz, j, finalValue,
                                i = 0;
                    
                            if ( typeof value === "function" ) {
                    Severity: Minor
                    Found in src/attributes/classes.js - About 2 hrs to fix

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language