Showing 199 of 290 total issues
Function scrollSpy
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.scrollSpy = function(selector, options) {
var visible = [];
selector = $(selector);
selector.each(function(i, element) {
elements.push($(element));
Function scrollSpy
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.scrollSpy = function(selector, options) {
var visible = [];
selector = $(selector);
selector.each(function(i, element) {
elements.push($(element));
Function activate
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DatePicker.prototype.activate = function( type, datesToEnable ) {
var calendar = this,
disabledItems = calendar.item.disable,
disabledItemsCount = disabledItems.length
Function activate
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DatePicker.prototype.activate = function( type, datesToEnable ) {
var calendar = this,
disabledItems = calendar.item.disable,
disabledItemsCount = disabledItems.length
Function returnToOriginal
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function returnToOriginal() {
doneAnimating = false;
var placeholder = origin.parent('.material-placeholder');
Function returnToOriginal
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function returnToOriginal() {
doneAnimating = false;
var placeholder = origin.parent('.material-placeholder');
Function createToast
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createToast(html) {
// Create toast
var toast = document.createElement('div');
toast.classList.add('toast');
Function createToast
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createToast(html) {
// Create toast
var toast = document.createElement('div');
toast.classList.add('toast');
Function formats
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DatePicker.prototype.formats = (function() {
// Return the length of the first word in a collection.
function getWordLengthFromCollection( string, collection, dateObject ) {
Function formats
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DatePicker.prototype.formats = (function() {
// Return the length of the first word in a collection.
function getWordLengthFromCollection( string, collection, dateObject ) {
Function prepareElementRoot
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function prepareElementRoot() {
P.$root.
on({
Function prepareElementRoot
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function prepareElementRoot() {
P.$root.
on({
Consider simplifying this complex logical expression. Open
Open
if ( !options || !options.nav ) if (
/* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
/* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
/* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
) {
Consider simplifying this complex logical expression. Open
Open
if ( !options || !options.nav ) if (
/* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
/* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
/* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
) {
Function validate
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DatePicker.prototype.validate = function( type, dateObject, options ) {
var calendar = this,
// Keep a reference to the original date.
Function validate
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
DatePicker.prototype.validate = function( type, dateObject, options ) {
var calendar = this,
// Keep a reference to the original date.
Function item
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
item: function( rowCounter ) {
// If Monday is the first day and the month starts on Sunday, shift the date back a week.
var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
Function item
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
item: function( rowCounter ) {
// If Monday is the first day and the month starts on Sunday, shift the date back a week.
var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
Function placeDropdown
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function placeDropdown() {
// Check html data attributes
updateOptions();
// Set Dropdown state
Function placeDropdown
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function placeDropdown() {
// Check html data attributes
updateOptions();
// Set Dropdown state