fnando/babel-schmooze-sprockets

View on GitHub

Showing 215 of 215 total issues

Avoid deeply nested control flow statements.
Open

              if (record.type === "throw") {
                // If the return method threw an exception, let that
                // exception prevail over the original return or throw.
                method = "throw";
                arg = record.arg;
Severity: Major
Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

            else if(res)switch(TYPE){
              case 3: return true;                    // some
              case 5: return val;                     // find
              case 6: return index;                   // findIndex
              case 2: result.push(val);               // filter
    Severity: Major
    Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

              } else if(IS_EVERY)return false;          // every
      Severity: Major
      Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                  } else if (hasFinally) {
                    if (this.prev < entry.finallyLoc) {
                      return handle(entry.finallyLoc);
                    }
        
        
        Severity: Major
        Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

          Function exports has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
          Severity: Minor
          Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                    if(code < 48 || code > maxCode)return NaN;
            Severity: Major
            Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

              Function 231 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"99":99}],231:[function(_dereq_,module,exports){
              var $export        = _dereq_(32)
                , toIndex        = _dereq_(105)
                , fromCharCode   = String.fromCharCode
                , $fromCodePoint = String.fromCodePoint;
              Severity: Minor
              Found in app/assets/javascripts/babel/polyfill.js - About 45 mins 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

              Avoid deeply nested control flow statements.
              Open

                          if(byteLength < 0)throw RangeError(WRONG_LENGTH);
              Severity: Major
              Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if (this.prev < entry.catchLoc) {
                              return handle(entry.catchLoc, true);
                            }
                Severity: Major
                Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

                  Function 9 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"105":105,"108":108,"109":109}],9:[function(_dereq_,module,exports){
                  // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
                  'use strict';
                  var toObject = _dereq_(109)
                    , toIndex  = _dereq_(105)
                  Severity: Minor
                  Found in app/assets/javascripts/babel/polyfill.js - About 45 mins 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 110 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"27":27}],110:[function(_dereq_,module,exports){
                  // 7.1.1 ToPrimitive(input [, PreferredType])
                  var isObject = _dereq_(49);
                  // instead of the ES6 spec version, we didn't implement @@toPrimitive case
                  // and the second argument - flag - preferred type is a string
                  Severity: Minor
                  Found in app/assets/javascripts/babel/polyfill.js - About 45 mins 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

                  Avoid deeply nested control flow statements.
                  Open

                              for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
                  Severity: Major
                  Found in app/assets/javascripts/babel/polyfill.js - About 45 mins to fix

                    Function 159 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{"32":32,"61":61}],159:[function(_dereq_,module,exports){
                    // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
                    var $export = _dereq_(32)
                      , abs     = Math.abs;
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/babel/polyfill.js - About 45 mins 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 101 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{"101":101,"108":108,"27":27}],101:[function(_dereq_,module,exports){
                    'use strict';
                    var toInteger = _dereq_(106)
                      , defined   = _dereq_(27);
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/babel/polyfill.js - About 45 mins 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 slicedToArrayLoose has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    babelHelpers.slicedToArrayLoose = function (arr, i) {
                      if (Array.isArray(arr)) {
                        return arr;
                      } else if (Symbol.iterator in Object(arr)) {
                        var _arr = [];
                    Severity: Minor
                    Found in app/assets/javascripts/babel/external-helpers.js - About 45 mins 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

                    Consider simplifying this complex logical expression.
                    Open

                      if(
                        'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
                        'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
                        'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
                        '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
                    Severity: Major
                    Found in app/assets/javascripts/babel/polyfill.js - About 40 mins to fix

                      Function exports has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      module.exports = function(that, callbackfn, aLen, memo, isRight){
                      Severity: Minor
                      Found in app/assets/javascripts/babel/polyfill.js - About 35 mins to fix

                        Function exports has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
                        Severity: Minor
                        Found in app/assets/javascripts/babel/polyfill.js - About 35 mins to fix

                          Function 51 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          },{"117":117,"18":18,"49":49}],51:[function(_dereq_,module,exports){
                          // call something on iterator step with safe closing on error
                          var anObject = _dereq_(7);
                          module.exports = function(iterator, fn, value, entries){
                            try {
                          Severity: Minor
                          Found in app/assets/javascripts/babel/polyfill.js - About 35 mins 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 152 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          },{"32":32,"60":60}],152:[function(_dereq_,module,exports){
                          // 20.2.2.5 Math.asinh(x)
                          var $export = _dereq_(32)
                            , $asinh  = Math.asinh;
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/babel/polyfill.js - About 35 mins 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