CodeforLeipzig/stadtratmonitor

View on GitHub

Showing 321 of 611 total issues

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

    _addEventListeners() {
      EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, (event) => {
        if (event.key !== ESCAPE_KEY$1) {
          return;
        }

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

      async function topLevelLoad (url, fetchOpts, source, nativelyLoaded, lastStaticLoadPromise) {
        if (!shimMode)
          acceptingImportMaps = false;
        await importMapPromise;
        if (importHook) await importHook(url, typeof fetchOpts !== 'string' ? fetchOpts : {}, '');

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

          html: function( value ) {
              return access( this, function( value ) {
                  var elem = this[ 0 ] || {},
                      i = 0,
                      l = this.length;

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

          function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
            if (typeof originalTypeEvent !== "string" || !element) {
              return;
            }
            let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);

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

            function getBoundingClientRect(element, includeScale, isFixedStrategy) {
              if (includeScale === void 0) {
                includeScale = false;
              }
              if (isFixedStrategy === void 0) {

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

              function computeAutoPlacement(state, options) {
                if (options === void 0) {
                  options = {};
                }
                var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;

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

                const featureDetectionPromise = Promise.resolve(supportsImportMaps || supportsDynamicImportCheck).then(_supportsDynamicImport => {
                  if (!_supportsDynamicImport)
                    return;
                  supportsDynamicImport = true;
              
              

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

                    hide() {
                      if (!this._isShown()) {
                        return;
                      }
                      const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));

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

                      finish: function( type ) {
                          if ( type !== false ) {
                              type = type || "fx";
                          }
                          return this.each( function() {

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

                        off: function( types, selector, fn ) {
                            var handleObj, type;
                            if ( types && types.preventDefault && types.handleObj ) {
                    
                                // ( event )  dispatched jQuery.Event

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

                          addClass: function( value ) {
                              var classes, elem, cur, curValue, clazz, j, finalValue,
                                  i = 0;
                      
                              if ( jQuery.isFunction( value ) ) {

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

                            fix: function( event ) {
                                if ( event[ jQuery.expando ] ) {
                                    return event;
                                }
                        
                        

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

                              show(relatedTarget) {
                                if (this._isShown) {
                                  return;
                                }
                                const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {

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

                                _setListeners() {
                                  const triggers = this._config.trigger.split(" ");
                                  for (const trigger of triggers) {
                                    if (trigger === "click") {
                                      EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, (event) => {

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

                              import e from"jquery";function _typeof(e){_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};return _typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||false;n.configurable=true;"value"in n&&(n.writable=true);Object.defineProperty(e,n.key,n)}}function _createClass(e,t,i){t&&_defineProperties(e.prototype,t);i&&_defineProperties(e,i);return e}function _inherits(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if("function"===typeof Proxy)return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(e){return false}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function _createSuperInternal(){var i,n=_getPrototypeOf(e);if(t){var s=_getPrototypeOf(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _superPropBase(e,t){while(!Object.prototype.hasOwnProperty.call(e,t)){e=_getPrototypeOf(e);if(null===e)break}return e}function _get(e,t,i){_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,i){var n=_superPropBase(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(i):s.value}};return _get(e,t,i||e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var i=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n=[];var s=true;var a=false;var o,r;try{for(i=i.call(e);!(s=(o=i.next()).done);s=true){n.push(o.value);if(t&&n.length===t)break}}catch(e){a=true;r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return n}}function _unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);return"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rtl(){return"rtl"===e("html").attr("dir")}

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

                              type:"auto"};P.SPECIAL_QUERIES={landscape:"screen and (orientation: landscape)",portrait:"screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)"};var I=function(t){_inherits(SmoothScroll,t);var i=_createSuper(SmoothScroll);function SmoothScroll(){_classCallCheck(this,SmoothScroll);return i.apply(this,arguments)}_createClass(SmoothScroll,[{key:"_setup",value:
                              /**
                                   * Creates a new instance of SmoothScroll.
                                   * @class
                                   * @name SmoothScroll

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

                                      e.UTF16String = function(t3) {
                                        function e2(t4, e3) {
                                          this.ucs2String = t4, this.codepoints = e3, this.length = this.codepoints.length, this.ucs2Length = this.ucs2String.length;
                                        }
                                        return s(e2, t3), e2.box = function(t4) {

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

                                        setup: function() {
                                
                                            if ( rformElems.test( this.nodeName ) ) {
                                
                                                // IE doesn't fire change on a check/radio until blur; trigger it on click

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

                                          e.Object = function(n2) {
                                            function i() {
                                              this.id = ++o;
                                            }
                                            var o;

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

                                            e.ObjectGroup = function() {
                                              function t2(t3, e2) {
                                                var n, i;
                                                this.objects = t3 != null ? t3 : [], i = e2.depth, n = e2.asTree, n && (this.depth = i, this.objects = this.constructor.groupObjects(this.objects, {asTree: n, depth: this.depth + 1}));
                                              }
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language