I've been working with JavaScript for a while now and just started analyzing my code with Plato. I'm not sure how it calculates maintainability but the code bellow returns maintainability score of 69.3. What am i missing? Tried adding comments and it didn't change.
/*globals jQuery*/
var App = App|| {};
App.AnimateSearch = (function ($) {
'use strict';
var searchContainer = $('[search-container]'),
emptySearchMessage = $('.empty-search-message');
function animateEmptyMessage() {
emptySearchMessage.css({
'opacity': 0,
'transform': 'scale(0.5)',
'-webkit-transform': 'scale(0.5)',
'-moz-transform': 'scale(0.5)'
});
emptySearchMessage.fadeIn().animate({
'opacity': 1,
'transform': 'scale(1)',
'-webkit-transform': 'scale(1)',
'-moz-transform': 'scale(1)'
}, 300);
}
function animateSearch(customClass) {
searchContainer = typeof customClass === 'undefined' ? searchContainer : $(customClass);
searchContainer.css({ 'margin-top': '100px', 'opacity': 0 });
setTimeout(function () {
searchContainer.stop().animate({ 'margin-top': '0', 'opacity': 1 }, 300);
}, 500);
}
return {
animateEmptyMessage: animateEmptyMessage,
animateSearch: animateSearch
};
}(jQuery));
Thanks for your help/suggestions!