fnando/babel-schmooze-sprockets

View on GitHub

Showing 159 of 215 total issues

Avoid too many return statements within this function.
Open

    return getter.call(receiver);
Severity: Major
Found in app/assets/javascripts/babel/external-helpers.js - About 30 mins to fix

    Function createClass has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    babelHelpers.createClass = function () {
      function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
    Severity: Minor
    Found in app/assets/javascripts/babel/external-helpers.js - About 25 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 217 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"35":35}],217:[function(_dereq_,module,exports){
    // @@replace logic
    _dereq_(35)('replace', 2, function(defined, REPLACE, $replace){
      // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
      return [function replace(searchValue, replaceValue){
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 277 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"10":10,"221":221,"63":63,"7":7,"74":74}],277:[function(_dereq_,module,exports){
    var metadata               = _dereq_(63)
      , anObject               = _dereq_(7)
      , getPrototypeOf         = _dereq_(74)
      , ordinaryHasOwnMetadata = metadata.has
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 285 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"32":32,"97":97}],285:[function(_dereq_,module,exports){
    'use strict';
    // https://tc39.github.io/String.prototype.matchAll/
    var $export     = _dereq_(32)
      , defined     = _dereq_(27)
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 280 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"63":63,"7":7}],280:[function(_dereq_,module,exports){
    var metadata               = _dereq_(63)
      , anObject               = _dereq_(7)
      , getPrototypeOf         = _dereq_(74)
      , ordinaryHasOwnMetadata = metadata.has
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 216 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"28":28,"36":36,"67":67}],216:[function(_dereq_,module,exports){
    // @@match logic
    _dereq_(35)('match', 1, function(defined, MATCH, $match){
      // 21.1.3.11 String.prototype.match(regexp)
      return [function match(regexp){
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 227 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"32":32,"97":97}],227:[function(_dereq_,module,exports){
    // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
    'use strict';
    var $export   = _dereq_(32)
      , toLength  = _dereq_(108)
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 71 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"107":107,"110":110,"28":28,"39":39,"42":42,"77":77,"85":85}],71:[function(_dereq_,module,exports){
    // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
    var toIObject = _dereq_(107)
      , gOPN      = _dereq_(72).f
      , toString  = {}.toString;
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 295 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"104":104,"32":32}],295:[function(_dereq_,module,exports){
    // ie9- setTimeout & setInterval additional parameters fix
    var global     = _dereq_(38)
      , $export    = _dereq_(32)
      , invoke     = _dereq_(44)
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 extends has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    babelHelpers.extends = Object.assign || function (target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
    
        for (var key in source) {
    Severity: Minor
    Found in app/assets/javascripts/babel/external-helpers.js - About 25 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 61 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{}],61:[function(_dereq_,module,exports){
    // 20.2.2.28 Math.sign(x)
    module.exports = Math.sign || function sign(x){
      return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
    };
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 66 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"109":109,"34":34,"45":45,"73":73,"76":76,"77":77}],66:[function(_dereq_,module,exports){
    // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
    var anObject    = _dereq_(7)
      , dPs         = _dereq_(68)
      , enumBugKeys = _dereq_(30)
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 275 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"63":63,"7":7}],275:[function(_dereq_,module,exports){
    var metadata               = _dereq_(63)
      , anObject               = _dereq_(7)
      , toMetaKey              = metadata.key
      , getOrCreateMetadataMap = metadata.map
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 115 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{}],115:[function(_dereq_,module,exports){
    var global         = _dereq_(38)
      , core           = _dereq_(23)
      , LIBRARY        = _dereq_(58)
      , wksExt         = _dereq_(116)
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 54 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"117":117,"32":32,"39":39,"40":40,"52":52,"56":56,"58":58,"74":74,"87":87,"92":92}],54:[function(_dereq_,module,exports){
    var ITERATOR     = _dereq_(117)('iterator')
      , SAFE_CLOSING = false;
    
    try {
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 150 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"28":28,"39":39,"67":67,"85":85}],150:[function(_dereq_,module,exports){
    'use strict';
    var strong = _dereq_(19);
    
    // 23.1 Map Objects
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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 218 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"35":35}],218:[function(_dereq_,module,exports){
    // @@search logic
    _dereq_(35)('search', 1, function(defined, SEARCH, $search){
      // 21.1.3.15 String.prototype.search(regexp)
      return [function search(regexp){
    Severity: Minor
    Found in app/assets/javascripts/babel/polyfill.js - About 25 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

    Method call has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def call(input)
          data = input[:data]
    
          result = input[:cache].fetch(@cache_key + [input[:filename]] + [data]) do
            options = {
    Severity: Minor
    Found in lib/babel-schmooze-sprockets/babel_processor.rb - About 25 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