for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
/*!
* @author Semenov Alexander <[email protected]>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 24.03.2018
*/
(function (sx, $, _) {
_
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.
sx.createNamespace('classes', sx);
sx.classes.DualSelect = sx.classes.Component.extend({
_init: function () {
},
_onDomReady: function () {
var self = this;
this.jWrapper = $("#" + this.get('id'));
this.jHidden = $(".sx-sortable-hidden", this.jWrapper);
this.jVisible = $(".sx-sortable-visible", this.jWrapper);
this.jElement = $(".sx-select-element", this.jWrapper);
this.jHidden.sortable({
//items: "li:not(.ui-state-disabled)"
connectWith: "." + this.get('id') + "-conncected",
dropOnEmpty: false,
out: function() {
self._update();
}
});
this.jVisible.sortable({
/*cancel: ".ui-state-disabled",*/
_update: function () {
this.jElement.empty();
$('li', this.jVisible).each(function() {
self.jElement.append(
$('<option>', {
'selected' : 'selected',
'value' : $(this).data('value')
}).append($(this).text())
)
this.trigger('change');
this.jElement.change();
})(sx, sx.$, sx._);
sx
/** global: sx */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.