Showing 137 of 233 total issues
File foundation.abide.js
has 492 lines of code (exceeds 250 allowed). Consider refactoring. Open
import $ from 'jquery';
import { Plugin } from './foundation.core.plugin';
import { GetYoDigits } from './foundation.core.utils';
/**
Function _events
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
_events() {
var _this = this,
hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined'),
parClass = 'is-dropdown-submenu-parent';
File foundation.slider.js
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
import $ from 'jquery';
import { Keyboard } from './foundation.util.keyboard';
import { Move } from './foundation.util.motion';
import { GetYoDigits, rtl as Rtl } from './foundation.core.utils';
Function changeSlide
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
changeSlide(isLTR, chosenSlide, idx) {
if (!this.$slides) {return; } // Don't freak out if we're in the middle of cleanup
var $curSlide = this.$slides.filter('.is-active').eq(0);
if (/mui/g.test($curSlide[0].className)) { return false; } //if the slide is currently animating, kick out of the function
- Read upRead up
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
File foundation.offcanvas.js
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
import $ from 'jquery';
import { Plugin } from './foundation.core.plugin';
import { onLoad, transitionend, RegExpEscape } from './foundation.core.utils';
import { Keyboard } from './foundation.util.keyboard';
import { MediaQuery } from './foundation.util.mediaQuery';
File foundation.drilldown.js
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
import $ from 'jquery';
import { Keyboard } from './foundation.util.keyboard';
import { Nest } from './foundation.util.nest';
import { GetYoDigits, transitionend } from './foundation.core.utils';
import { Box } from './foundation.util.box';
File foundation.reveal.js
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
import $ from 'jquery';
import { Plugin } from './foundation.core.plugin';
import { onLoad } from './foundation.core.utils';
import { Keyboard } from './foundation.util.keyboard';
import { MediaQuery } from './foundation.util.mediaQuery';
Function _updateActive
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
_updateActive(/*evt, elem, scrollPos*/) {
if(this._inTransition) return;
const newScrollPos = parseInt(window.pageYOffset, 10);
const isScrollingUp = this.scrollPos > newScrollPos;
- Read upRead up
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 _setHandlePos
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
_setHandlePos($hndl, location, cb) {
// don't move if the slider has been disabled since its initialization
if (this.$element.hasClass(this.options.disabledClass)) {
return;
}
- Read upRead up
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 _init
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
_init() {
var _this = this;
this._isInitializing = true;
this.$element.attr({'role': 'tablist'});
- Read upRead up
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 _init
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
_init() {
this._isInitializing = true;
this.$tabs = this.$element.children('[data-accordion-item]');
- Read upRead up
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 close
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
close() {
if (!this.isActive || !this.$element.is(':visible')) {
return false;
}
var _this = this;
- Read upRead up
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 _handleEvent
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
_handleEvent(e, $handle, val) {
var value;
if (!val) {//click or drag events
e.preventDefault();
var _this = this,
- Read upRead up
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 open
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
open() {
// either update or replace browser history
const hash = `#${this.id}`;
if (this.options.deepLink && window.location.hash !== hash) {
- Read upRead up
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 _init
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
_init() {
var id = this.$element.attr('id');
this.$element.attr('aria-hidden', 'true');
- Read upRead up
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 _events
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
_events() {
var _this = this;
this.$element.find('li').each(function() {
var $submenu = $(this).children('[data-submenu]');
File foundation.dropdownMenu.js
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
import $ from 'jquery';
import { Plugin } from './foundation.core.plugin';
import { rtl as Rtl, ignoreMousedisappear } from './foundation.core.utils';
import { Keyboard } from './foundation.util.keyboard';
import { Nest } from './foundation.util.nest';
Abide
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Abide extends Plugin {
/**
* Creates a new instance of Abide.
* @class
* @name Abide
Function _eventsForHandle
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
_eventsForHandle($handle) {
var _this = this,
curHandle;
const handleChangeEvent = function(e) {
Function open
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
open() {
// either update or replace browser history
const hash = `#${this.id}`;
if (this.options.deepLink && window.location.hash !== hash) {