olneyhymn/westminster-daily

View on GitHub

Showing 35 of 96 total issues

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

    Dropdown._clearMenus = function _clearMenus(event) {
      if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
        return;
      }

Severity: Minor
Found in static/js/bootstrap.js - About 1 hr to fix

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

        _proto.hide = function hide() {
          var _this2 = this;
    
          if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {
            return;
    Severity: Minor
    Found in static/js/bootstrap.js - About 1 hr to fix

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

          _proto.show = function show(relatedTarget) {
            var _this = this;
      
            if (this._isShown || this._isTransitioning) {
              return;
      Severity: Minor
      Found in static/js/bootstrap.js - About 1 hr to fix

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

            Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
              // If not input/textarea:
              //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
              // If input/textarea:
              //  - If space key => not a dropdown command
        Severity: Minor
        Found in static/js/bootstrap.js - About 1 hr to fix

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

              _proto.toggle = function toggle() {
                var triggerChangeEvent = true;
                var addAriaPressed = true;
                var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
          
          
          Severity: Minor
          Found in static/js/bootstrap.js - About 1 hr to fix

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

                _proto._showElement = function _showElement(relatedTarget) {
                  var _this3 = this;
            
                  var transition = $(this._element).hasClass(ClassName$5.FADE);
            
            
            Severity: Minor
            Found in static/js/bootstrap.js - About 1 hr to fix

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

                  _proto.hide = function hide(event) {
                    var _this2 = this;
              
                    if (event) {
                      event.preventDefault();
              Severity: Minor
              Found in static/js/bootstrap.js - About 1 hr to fix

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

                    _proto._setListeners = function _setListeners() {
                      var _this3 = this;
                
                      var triggers = this.config.trigger.split(' ');
                      triggers.forEach(function (trigger) {
                Severity: Minor
                Found in static/js/bootstrap.js - About 1 hr to fix

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

                      _proto.refresh = function refresh() {
                        var _this2 = this;
                  
                        var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
                        var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
                  Severity: Minor
                  Found in static/js/bootstrap.js - About 1 hr to fix

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

                        _proto._getPopperConfig = function _getPopperConfig() {
                          var _this2 = this;
                    
                          var offsetConf = {};
                    
                    
                    Severity: Minor
                    Found in static/js/bootstrap.js - About 1 hr to fix

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

                          _proto._transitionComplete = function _transitionComplete(element, active, callback) {
                            if (active) {
                              $(active).removeClass(ClassName$9.ACTIVE);
                              var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0];
                      
                      
                      Severity: Minor
                      Found in static/js/bootstrap.js - About 1 hr to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (activeElement) {
                                        $(activeElement).removeClass(ClassName$1.ACTIVE);
                                      }
                        Severity: Major
                        Found in static/js/bootstrap.js - About 45 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
                                    continue;
                                  }
                          Severity: Major
                          Found in static/js/bootstrap.js - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
                                  throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
                                }
                            Severity: Major
                            Found in static/js/bootstrap.js - About 40 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return Util.findShadowRoot(element.parentNode);
                              Severity: Major
                              Found in static/js/bootstrap.js - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language