나는 잠시 동안 JavaScript로 작업 해 왔으며 Plato으로 코드를 분석하기 시작했습니다. 유지 보수 가능성을 계산하는 방법을 모르지만 코드 벨로우즈는 유지 관리 가능성 점수 69.3을 반환합니다. 나는 무엇을 놓치고 있습니까? 댓글을 추가하려고했지만 변경되지 않았습니다.자바 스크립트 코드 분석 - Plato의 유지 보수성 평가
/*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));
도움/의견을 보내 주셔서 감사합니다.