osunyorg/theme

View on GitHub

Showing 28 of 28 total issues

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

listen () {
window.addEventListener('resize', this.resize.bind(this));
 
window.addEventListener('click', (event) => {
const insideHeader = event.target.closest('#document-header');
Severity: Minor
Found in assets/js/theme/design-system/mainMenu.js - About 1 hr to fix

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

    (function () {
    const modalButtons = document.querySelectorAll('[data-open-modal]');
    modalButtons.forEach(button => {
    new Modal(button);
    });
    Severity: Minor
    Found in assets/js/theme/design-system/modal.js and 1 other location - About 50 mins to fix
    assets/js/theme/design-system/clickToCopy.js on lines 31..36

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

    (function () {
    const clickToCopy = document.querySelectorAll("[data-click-to-copy]");
    clickToCopy.forEach(button => {
    new ClickToCopy(button);
    });
    Severity: Minor
    Found in assets/js/theme/design-system/clickToCopy.js and 1 other location - About 50 mins to fix
    assets/js/theme/design-system/modal.js on lines 66..71

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

    window.osuny.Search.prototype._setup = function () {
    this.setPageFind();
    this.setAccessibility();
    };
    Severity: Minor
    Found in assets/js/theme/design-system/search.js and 1 other location - About 40 mins to fix
    assets/js/theme/design-system/search.js on lines 124..127

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

    window.osuny.Search.prototype.updateAccessibility = function () {
    this.updateAccessibilityMessage();
    this.updateAccessibilityTags();
    };
    Severity: Minor
    Found in assets/js/theme/design-system/search.js and 1 other location - About 40 mins to fix
    assets/js/theme/design-system/search.js on lines 16..19

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

    _listen: function () {
    this.closeElements.forEach(function (button) {
    button.addEventListener('click', this.toggle.bind(this, false));
    }.bind(this));
     
     
    Severity: Minor
    Found in assets/js/theme/design-system/Popup.js - About 35 mins to fix

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

    toggle: function (open, triggerElement) {
    var classAction;
    this.state.opened = typeof open !== 'undefined' ? open : !this.state.opened;
    classAction = this.state.opened ? 'add' : 'remove';
     
     
    Severity: Minor
    Found in assets/js/theme/design-system/Popup.js - About 25 mins to fix

    Line should be indented 0 spaces, but was indented 2 spaces
    Open

    @mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {

    Line contains trailing whitespace
    Open

    Line contains trailing whitespace
    Open

    Line contains trailing whitespace
    Open

    Line should be indented 2 spaces, but was indented 4 spaces
    Open

    @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);

    Line contains trailing whitespace
    Open

    Line should be indented 2 spaces, but was indented 4 spaces
    Open

    $n: index($breakpoint-names, $name);

    Line should be indented 0 spaces, but was indented 2 spaces
    Open

    @mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {

    Line should be indented 2 spaces, but was indented 4 spaces
    Open

    @if not $n {

    Line should be indented 0 spaces, but was indented 2 spaces
    Open

    @mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {

    Line contains trailing whitespace
    Open

    Line contains trailing whitespace
    Open

    Line contains trailing whitespace
    Open

    Severity
    Category
    Status
    Source
    Language