18F/18f.gsa.gov

View on GitHub
_sass/_libs/uswds/js/uswds.js

Summary

Maintainability
F
1 mo
Test Coverage

File uswds.js has 1952 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";

/*
 * classList.js: Cross-browser full element.classList implementation.
Severity: Major
Found in _sass/_libs/uswds/js/uswds.js - About 5 days to fix

    Function 20 has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"../config":28,"../utils/behavior":35,"../utils/select":38}],20:[function(require,module,exports){
    "use strict";
    
    var _CLICK, _keydown, _behavior;
    
    
    Severity: Minor
    Found in _sass/_libs/uswds/js/uswds.js - About 2 days 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 6 has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
    Open

    },{}],6:[function(require,module,exports){
    (function (global){
    "use strict";
    
    function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
    Severity: Minor
    Found in _sass/_libs/uswds/js/uswds.js - About 2 days 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 20 has 457 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"../config":28,"../utils/behavior":35,"../utils/select":38}],20:[function(require,module,exports){
    "use strict";
    
    var _CLICK, _keydown, _behavior;
    
    
    Severity: Major
    Found in _sass/_libs/uswds/js/uswds.js - About 2 days to fix

      Function 1 has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring.
      Open

      (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
      "use strict";
      
      /*
       * classList.js: Cross-browser full element.classList implementation.
      Severity: Minor
      Found in _sass/_libs/uswds/js/uswds.js - About 2 days 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 1 has 166 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
      "use strict";
      
      /*
       * classList.js: Cross-browser full element.classList implementation.
      Severity: Major
      Found in _sass/_libs/uswds/js/uswds.js - About 6 hrs to fix

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

        },{}],7:[function(require,module,exports){
        /*
        object-assign
        (c) Sindre Sorhus
        @license MIT
        Severity: Minor
        Found in _sass/_libs/uswds/js/uswds.js - About 6 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 6 has 145 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],6:[function(require,module,exports){
        (function (global){
        "use strict";
        
        function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
        Severity: Major
        Found in _sass/_libs/uswds/js/uswds.js - About 5 hrs to fix

          `` has 42 functions (exceeds 20 allowed). Consider refactoring.
          Open

          (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
          "use strict";
          
          /*
           * classList.js: Cross-browser full element.classList implementation.
          Severity: Minor
          Found in _sass/_libs/uswds/js/uswds.js - About 5 hrs to fix

            Function 42 has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
            Open

            },{}],42:[function(require,module,exports){
            "use strict";
            
            function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
            
            
            Severity: Minor
            Found in _sass/_libs/uswds/js/uswds.js - About 5 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 5 has 106 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{}],5:[function(require,module,exports){
            "use strict";
            
            /* global define, KeyboardEvent, module */
            (function () {
            Severity: Major
            Found in _sass/_libs/uswds/js/uswds.js - About 4 hrs to fix

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

              },{"./accordion":17,"./banner":18,"./character-count":19,"./combo-box":20,"./footer":21,"./navigation":23,"./password":24,"./search":25,"./skipnav":26,"./validator":27}],23:[function(require,module,exports){
              "use strict";
              
              var _CLICK;
              
              
              Severity: Major
              Found in _sass/_libs/uswds/js/uswds.js - About 4 hrs to fix

                Function debounce has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function debounce(func, wait, options) {
                  var lastArgs,
                      lastThis,
                      maxWait,
                      result,
                Severity: Major
                Found in _sass/_libs/uswds/js/uswds.js - About 3 hrs to fix

                  Function 19 has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"../config":28,"../events":29,"../utils/behavior":35}],19:[function(require,module,exports){
                  "use strict";
                  
                  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                  
                  
                  Severity: Minor
                  Found in _sass/_libs/uswds/js/uswds.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 19 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"../config":28,"../events":29,"../utils/behavior":35}],19:[function(require,module,exports){
                  "use strict";
                  
                  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                  
                  
                  Severity: Major
                  Found in _sass/_libs/uswds/js/uswds.js - About 2 hrs to fix

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

                    },{}],8:[function(require,module,exports){
                    "use strict";
                    
                    function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                    
                    
                    Severity: Minor
                    Found in _sass/_libs/uswds/js/uswds.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

                    Function 3 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },{}],3:[function(require,module,exports){
                    'use strict'; // <3 Modernizr
                    // https://raw.githubusercontent.com/Modernizr/Modernizr/master/feature-detects/dom/dataset.js
                    
                    function useNative() {
                    Severity: Minor
                    Found in _sass/_libs/uswds/js/uswds.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

                    Function 7 has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{}],7:[function(require,module,exports){
                    /*
                    object-assign
                    (c) Sindre Sorhus
                    @license MIT
                    Severity: Major
                    Found in _sass/_libs/uswds/js/uswds.js - About 2 hrs to fix

                      Function 17 has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],17:[function(require,module,exports){
                      "use strict";
                      
                      function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                      
                      
                      Severity: Major
                      Found in _sass/_libs/uswds/js/uswds.js - About 2 hrs to fix

                        Function 4 has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                        },{}],4:[function(require,module,exports){
                        "use strict";
                        
                        // element-closest | CC0-1.0 | github.com/jonathantneal/closest
                        (function (ElementProto) {
                        Severity: Minor
                        Found in _sass/_libs/uswds/js/uswds.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

                        Function 8 has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{}],8:[function(require,module,exports){
                        "use strict";
                        
                        function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                        
                        
                        Severity: Major
                        Found in _sass/_libs/uswds/js/uswds.js - About 2 hrs to fix

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

                          },{"../config":28,"../events":29,"../utils/behavior":35,"../utils/toggle-form-input":40}],25:[function(require,module,exports){
                          "use strict";
                          
                          function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                          
                          
                          Severity: Major
                          Found in _sass/_libs/uswds/js/uswds.js - About 2 hrs to fix

                            Function 36 has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{"object-assign":7,"receptor/behavior":8}],36:[function(require,module,exports){
                            "use strict";
                            
                            var assign = require("object-assign");
                            
                            
                            Severity: Major
                            Found in _sass/_libs/uswds/js/uswds.js - About 2 hrs to fix

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

                              },{}],5:[function(require,module,exports){
                              "use strict";
                              
                              /* global define, KeyboardEvent, module */
                              (function () {
                              Severity: Minor
                              Found in _sass/_libs/uswds/js/uswds.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

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

                              },{}],16:[function(require,module,exports){
                              'use strict';
                              
                              function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                              
                              
                              Severity: Minor
                              Found in _sass/_libs/uswds/js/uswds.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

                              Function enhanceComboBox has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var enhanceComboBox = function enhanceComboBox(comboBoxEl) {
                                var selectEl = comboBoxEl.querySelector("select");
                              
                                if (!selectEl) {
                                  throw new Error("".concat(COMBO_BOX, " is missing inner select"));
                              Severity: Minor
                              Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                Function 21 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                },{"../config":28,"../events":29,"../utils/behavior":35,"../utils/select":38,"receptor/keymap":14}],21:[function(require,module,exports){
                                "use strict";
                                
                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                
                                
                                Severity: Minor
                                Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                  Function displayList has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  var displayList = function displayList(el) {
                                    var _getComboBoxContext5 = getComboBoxContext(el),
                                        selectEl = _getComboBoxContext5.selectEl,
                                        inputEl = _getComboBoxContext5.inputEl,
                                        listEl = _getComboBoxContext5.listEl,
                                  Severity: Minor
                                  Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                    Function 36 has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    },{"object-assign":7,"receptor/behavior":8}],36:[function(require,module,exports){
                                    "use strict";
                                    
                                    var assign = require("object-assign");
                                    
                                    
                                    Severity: Minor
                                    Found in _sass/_libs/uswds/js/uswds.js - About 1 hr 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 25 has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    },{"../config":28,"../events":29,"../utils/behavior":35,"../utils/toggle-form-input":40}],25:[function(require,module,exports){
                                    "use strict";
                                    
                                    function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                    
                                    
                                    Severity: Minor
                                    Found in _sass/_libs/uswds/js/uswds.js - About 1 hr 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 3 has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{}],3:[function(require,module,exports){
                                    'use strict'; // <3 Modernizr
                                    // https://raw.githubusercontent.com/Modernizr/Modernizr/master/feature-detects/dom/dataset.js
                                    
                                    function useNative() {
                                    Severity: Minor
                                    Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                        if (!("classList" in document.createElement("_")) || document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))) {
                                          (function (view) {
                                            "use strict";
                                      
                                            if (!('Element' in view)) return;
                                      Severity: Critical
                                      Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                        Function 38 has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        },{}],38:[function(require,module,exports){
                                        "use strict";
                                        
                                        function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                        
                                        
                                        Severity: Minor
                                        Found in _sass/_libs/uswds/js/uswds.js - About 1 hr 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 highlightOption has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        var highlightOption = function highlightOption(el, currentEl, nextEl) {
                                          var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
                                              skipFocus = _ref.skipFocus,
                                              preventScroll = _ref.preventScroll;
                                        
                                        
                                        Severity: Minor
                                        Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                          Function 42 has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          },{}],42:[function(require,module,exports){
                                          "use strict";
                                          
                                          function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
                                          
                                          
                                          Severity: Minor
                                          Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                            Function 17 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            },{}],17:[function(require,module,exports){
                                            "use strict";
                                            
                                            function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                            
                                            
                                            Severity: Minor
                                            Found in _sass/_libs/uswds/js/uswds.js - About 1 hr 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 23 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            },{"./accordion":17,"./banner":18,"./character-count":19,"./combo-box":20,"./footer":21,"./navigation":23,"./password":24,"./search":25,"./skipnav":26,"./validator":27}],23:[function(require,module,exports){
                                            "use strict";
                                            
                                            var _CLICK;
                                            
                                            
                                            Severity: Minor
                                            Found in _sass/_libs/uswds/js/uswds.js - About 1 hr 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 14 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            },{"./behavior":8,"./delegate":10,"./delegateAll":11,"./ignore":12,"./keymap":14}],14:[function(require,module,exports){
                                            "use strict";
                                            
                                            require('keyboardevent-key-polyfill'); // these are the only relevant modifiers supported on all platforms,
                                            // according to MDN:
                                            Severity: Minor
                                            Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                              Function exports has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              module.exports = useNative() ? nativeDataset : function (element) {
                                                var map = {};
                                                var attributes = element.attributes;
                                              
                                                function getter() {
                                              Severity: Minor
                                              Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                                Function 16 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                },{}],16:[function(require,module,exports){
                                                'use strict';
                                                
                                                function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                                
                                                
                                                Severity: Minor
                                                Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                                  Function shouldUseNative has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  function shouldUseNative() {
                                                    try {
                                                      if (!Object.assign) {
                                                        return false;
                                                      } // Detect buggy property enumeration order in older V8 versions.
                                                  Severity: Minor
                                                  Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                                    Function getListeners has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                    var getListeners = function getListeners(type, handler) {
                                                      var match = type.match(DELEGATE_PATTERN);
                                                      var selector;
                                                    
                                                      if (match) {
                                                    Severity: Minor
                                                    Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                                      Function completeSelection has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      var completeSelection = function completeSelection(el) {
                                                        var _getComboBoxContext10 = getComboBoxContext(el),
                                                            comboBoxEl = _getComboBoxContext10.comboBoxEl,
                                                            selectEl = _getComboBoxContext10.selectEl,
                                                            inputEl = _getComboBoxContext10.inputEl,
                                                      Severity: Minor
                                                      Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

                                                        Function 40 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        },{}],40:[function(require,module,exports){
                                                        "use strict";
                                                        
                                                        var resolveIdRefs = require("resolve-id-refs");
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in _sass/_libs/uswds/js/uswds.js - About 1 hr to fix

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

                                                          },{}],40:[function(require,module,exports){
                                                          "use strict";
                                                          
                                                          var resolveIdRefs = require("resolve-id-refs");
                                                          
                                                          
                                                          Severity: Minor
                                                          Found in _sass/_libs/uswds/js/uswds.js - About 55 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 14 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          },{"./behavior":8,"./delegate":10,"./delegateAll":11,"./ignore":12,"./keymap":14}],14:[function(require,module,exports){
                                                          "use strict";
                                                          
                                                          require('keyboardevent-key-polyfill'); // these are the only relevant modifiers supported on all platforms,
                                                          // according to MDN:
                                                          Severity: Minor
                                                          Found in _sass/_libs/uswds/js/uswds.js - About 55 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 2 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          },{}],2:[function(require,module,exports){
                                                          "use strict";
                                                          
                                                          function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                                          
                                                          
                                                          Severity: Minor
                                                          Found in _sass/_libs/uswds/js/uswds.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 26 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          },{"../events":29,"../utils/behavior":35,"../utils/select":38,"receptor/ignore":12}],26:[function(require,module,exports){
                                                          "use strict";
                                                          
                                                          function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                          
                                                          
                                                          Severity: Minor
                                                          Found in _sass/_libs/uswds/js/uswds.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 (typeof ElementProto.matches !== 'function') {
                                                              ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) {
                                                                var element = this;
                                                                var elements = (element.document || element.ownerDocument).querySelectorAll(selector);
                                                                var index = 0;
                                                          Severity: Major
                                                          Found in _sass/_libs/uswds/js/uswds.js - About 40 mins to fix

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

                                                            },{"./active-element":34,"./behavior":35,"./select":38,"object-assign":7,"receptor":13}],37:[function(require,module,exports){
                                                            "use strict";
                                                            
                                                            // https://stackoverflow.com/a/7557433
                                                            function isElementInViewport(el) {
                                                            Severity: Minor
                                                            Found in _sass/_libs/uswds/js/uswds.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 41 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                            },{"./toggle-field-mask":39,"resolve-id-refs":16}],41:[function(require,module,exports){
                                                            "use strict";
                                                            
                                                            var EXPANDED = "aria-expanded";
                                                            var CONTROLS = "aria-controls";
                                                            Severity: Minor
                                                            Found in _sass/_libs/uswds/js/uswds.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 21 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                            },{"../config":28,"../events":29,"../utils/behavior":35,"../utils/select":38,"receptor/keymap":14}],21:[function(require,module,exports){
                                                            "use strict";
                                                            
                                                            function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                            
                                                            
                                                            Severity: Minor
                                                            Found in _sass/_libs/uswds/js/uswds.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

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                return false;
                                                            Severity: Major
                                                            Found in _sass/_libs/uswds/js/uswds.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                  return true;
                                                              Severity: Major
                                                              Found in _sass/_libs/uswds/js/uswds.js - About 30 mins to fix

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 4 hrs to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 2858..2858

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 128.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 4 hrs to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 232..232

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 128.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 4 hrs to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 970..970

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 126.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 4 hrs to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1179..1179

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 126.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                var disable = function disable(el) {
                                                                  var _getComboBoxContext = getComboBoxContext(el),
                                                                      inputEl = _getComboBoxContext.inputEl,
                                                                      toggleListBtnEl = _getComboBoxContext.toggleListBtnEl,
                                                                      clearInputBtnEl = _getComboBoxContext.clearInputBtnEl;
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 3 hrs to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1621..1631

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 101.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                var enable = function enable(el) {
                                                                  var _getComboBoxContext2 = getComboBoxContext(el),
                                                                      inputEl = _getComboBoxContext2.inputEl,
                                                                      toggleListBtnEl = _getComboBoxContext2.toggleListBtnEl,
                                                                      clearInputBtnEl = _getComboBoxContext2.clearInputBtnEl;
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 3 hrs to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1603..1613

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 101.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2436..2436
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 9 locations. Consider refactoring.
                                                                Open

                                                                function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 8 other locations - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1225..1225
                                                                _sass/_libs/uswds/js/uswds.js on lines 1337..1337
                                                                _sass/_libs/uswds/js/uswds.js on lines 1360..1360
                                                                _sass/_libs/uswds/js/uswds.js on lines 1483..1483
                                                                _sass/_libs/uswds/js/uswds.js on lines 2188..2188
                                                                _sass/_libs/uswds/js/uswds.js on lines 2288..2288
                                                                _sass/_libs/uswds/js/uswds.js on lines 2460..2460
                                                                _sass/_libs/uswds/js/uswds.js on lines 2551..2551

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 74.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                  var _getComboBoxContext10 = getComboBoxContext(el),
                                                                      comboBoxEl = _getComboBoxContext10.comboBoxEl,
                                                                      selectEl = _getComboBoxContext10.selectEl,
                                                                      inputEl = _getComboBoxContext10.inputEl,
                                                                      statusEl = _getComboBoxContext10.statusEl,
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1767..1772

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 56.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                  var _getComboBoxContext5 = getComboBoxContext(el),
                                                                      selectEl = _getComboBoxContext5.selectEl,
                                                                      inputEl = _getComboBoxContext5.inputEl,
                                                                      listEl = _getComboBoxContext5.listEl,
                                                                      statusEl = _getComboBoxContext5.statusEl,
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1932..1937

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 56.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                    add: function addBehavior(element) {
                                                                      listeners.forEach(function (listener) {
                                                                        element.addEventListener(listener.type, listener.delegate, listener.options);
                                                                      });
                                                                    },
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1034..1038

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 55.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                    remove: function removeBehavior(element) {
                                                                      listeners.forEach(function (listener) {
                                                                        element.removeEventListener(listener.type, listener.delegate, listener.options);
                                                                      });
                                                                    }
                                                                Severity: Major
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 1 hr to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1029..1033

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 55.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                module.exports = {
                                                                  accordion: accordion,
                                                                  banner: banner,
                                                                  characterCount: characterCount,
                                                                  comboBox: comboBox,
                                                                Severity: Minor
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 50 mins to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1583..1594

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 52.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                  return {
                                                                    comboBoxEl: comboBoxEl,
                                                                    selectEl: selectEl,
                                                                    inputEl: inputEl,
                                                                    listEl: listEl,
                                                                Severity: Minor
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 50 mins to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 2270..2281

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 52.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
                                                                Severity: Minor
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 50 mins to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 513..513

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 51.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;
                                                                Severity: Minor
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 50 mins to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 516..516

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 51.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                  var _getComboBoxContext8 = getComboBoxContext(clearButtonEl),
                                                                      comboBoxEl = _getComboBoxContext8.comboBoxEl,
                                                                      listEl = _getComboBoxContext8.listEl,
                                                                      selectEl = _getComboBoxContext8.selectEl,
                                                                      inputEl = _getComboBoxContext8.inputEl;
                                                                Severity: Minor
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 35 mins to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1829..1833

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 47.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                Open

                                                                  var _getComboBoxContext6 = getComboBoxContext(el),
                                                                      inputEl = _getComboBoxContext6.inputEl,
                                                                      listEl = _getComboBoxContext6.listEl,
                                                                      statusEl = _getComboBoxContext6.statusEl,
                                                                      focusedOptionEl = _getComboBoxContext6.focusedOptionEl;
                                                                Severity: Minor
                                                                Found in _sass/_libs/uswds/js/uswds.js and 1 other location - About 35 mins to fix
                                                                _sass/_libs/uswds/js/uswds.js on lines 1873..1877

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 47.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                There are no issues that match your filters.

                                                                Category
                                                                Status