Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9f9bdcf

Browse files
committed
lint
1 parent 618a2b4 commit 9f9bdcf

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

lib/jsl/jsl.default.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
# or "+process Folder\Path\*.htm".
123123
#
124124
+process src/*.js
125-
+process src/test/*.js
125+
+process src/scenario/*.js
126126
+process test/*.js
127-
+process test/test/*.js
127+
+process test/scenario/*.js
128128

src/Angular.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ function jqLiteWrap(element) {
9494
var div = document.createElement('div');
9595
div.innerHTML = element;
9696
element = new JQLite(div.childNodes);
97-
} else if (element instanceof JQLite) {
98-
} else if (isElement(element)) {
97+
} else if (!(element instanceof JQLite) && isElement(element)) {
9998
element = new JQLite(element);
10099
}
101100
return element;
@@ -119,8 +118,8 @@ function isElement(node) {
119118

120119
function isVisible(element) {
121120
var rect = element[0].getBoundingClientRect(),
122-
width = rect.width || (rect.right||0 - rect.left||0),
123-
height = rect.height || (rect.bottom||0 - rect.top||0);
121+
width = (rect.width || (rect.right||0 - rect.left||0)),
122+
height = (rect.height || (rect.bottom||0 - rect.top||0));
124123
return width>0 && height>0;
125124
}
126125

src/jqLite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ if (msie) {
231231
this[0].fireEvent('on' + type);
232232
}
233233
});
234-
};
234+
}

src/scenario/bootstrap.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
})();
1313
function addScript(path) {
1414
document.write('<script type="text/javascript" src="' + prefix + path + '"></script>');
15-
};
15+
}
16+
1617
function addCSS(path) {
1718
document.write('<link rel="stylesheet" type="text/css" href="' + prefix + path + '"/>');
18-
};
19+
}
20+
1921
window.onload = function(){
2022
if (!_.stepper) {
2123
_.stepper = function(collection, iterator, done){

src/widgets.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ angularWidget('NG:INCLUDE', function(element){
214214
angularWidget('NG:SWITCH', function ngSwitch(element){
215215
var compiler = this,
216216
watchExpr = element.attr("on"),
217-
whenExpr = (element.attr("using") || 'equals').split(":");
218-
whenFn = ngSwitch[whenExpr.shift()];
217+
whenExpr = (element.attr("using") || 'equals').split(":"),
218+
whenFn = ngSwitch[whenExpr.shift()],
219219
changeExpr = element.attr('change') || '',
220220
cases = [];
221221
if (!whenFn) throw "Using expression '" + usingExpr + "' unknown.";

test/testabilityPatch.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@ function sortedHtml(element) {
7777
for(var css in node.style){
7878
var value = node.style[css];
7979
if (isString(value) && isString(css) && css != 'cssText' && value && (1*css != css)) {
80-
var value = node.style[css];
8180
var text = css + ': ' + value;
8281
if (value != 'false' && indexOf(style, text) == -1) {
8382
style.push(text);
8483
}
8584
}
86-
};
85+
}
8786
style.sort();
8887
if (style.length) {
8988
html += ' style="' + style.join('; ') + ';"';

0 commit comments

Comments
 (0)