cityssm/bulma-js

View on GitHub

Showing 5 of 28 total issues

File bulma-js.js has 374 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(() => {
    const config = new Map();
    config.set('bulmaJS.initAttribute', 'data-bulma-js-init');
    config.set('bulmaJS.elementIdPrefix', 'bulma-js-');
    config.set('navbar.burger', true);
Severity: Minor
Found in src/bulma-js.js - About 5 hrs to fix

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

        function alertConfirm(confirmOptions, showCancelButton) {
            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
            const activeElement = document.activeElement;
            const modalElement = document.createElement('div');
            modalElement.className = 'modal is-active';
    Severity: Major
    Found in src/bulma-js.js - About 3 hrs to fix

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

          function init_navbar_dropdown(scopeElement) {
              var _a, _b;
              const dropdownLinkElements = scopeElement.querySelectorAll('.navbar-item.has-dropdown:not(.is-hoverable) > .navbar-link:not([' +
                  config.get('bulmaJS.initAttribute') +
                  '])');
      Severity: Minor
      Found in src/bulma-js.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    if ((_m = confirmOptions.cancelButton) === null || _m === void 0 ? void 0 : _m.textIsHtml) {
                        cancelButtonElement.innerHTML =
                            (_p = (_o = confirmOptions.cancelButton) === null || _o === void 0 ? void 0 : _o.text) !== null && _p !== void 0 ? _p : 'Cancel';
                    }
                    else {
        Severity: Major
        Found in src/bulma-js.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if ((_e = confirmOptions.okButton) === null || _e === void 0 ? void 0 : _e.textIsHtml) {
                      okButtonElement.innerHTML = (_g = (_f = confirmOptions.okButton) === null || _f === void 0 ? void 0 : _f.text) !== null && _g !== void 0 ? _g : 'OK';
                  }
                  else {
                      okButtonElement.textContent = (_j = (_h = confirmOptions.okButton) === null || _h === void 0 ? void 0 : _h.text) !== null && _j !== void 0 ? _j : 'OK';
          Severity: Major
          Found in src/bulma-js.js - About 40 mins to fix
            Severity
            Category
            Status
            Source
            Language