Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 88948cf

Browse files
committed
Revert some recently added unneded JSLint fixes
1 parent 1aa069b commit 88948cf

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

test/spec/CSSUtils-test.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -973,10 +973,10 @@ define(function (require, exports, module) {
973973

974974
// Braces inside string; string inside rule (not inside selector)
975975
css = "a::after { content: ' {' attr(href) '}'; } \n" +
976-
".foo { color:red } \n" +
977-
"a::after { content: \" {\" attr(href) \"}\"; } \n" +
978-
"li::before { content: \"} h4 { color:black }\"; } \n" +
979-
"div { color:green }";
976+
".foo { color:red } \n" +
977+
"a::after { content: \" {\" attr(href) \"}\"; } \n" +
978+
"li::before { content: \"} h4 { color:black }\"; } \n" +
979+
"div { color:green }";
980980

981981
result = match(css, { tag: "a" });
982982
expect(result.length).toBe(2);
@@ -999,7 +999,8 @@ define(function (require, exports, module) {
999999
expect(result.length).toBe(1);
10001000

10011001
css = "@import \"null?\\\"{\"; \n" + // a real-world CSS hack similar to the above case
1002-
"div { color: red }";
1002+
"div { color: red }";
1003+
10031004
result = match(css, { tag: "div" });
10041005
expect(result.length).toBe(1);
10051006

@@ -1051,9 +1052,10 @@ define(function (require, exports, module) {
10511052
expect(result.length).toBe(1);
10521053

10531054
css = ".foo\n" +
1054-
"{\n" +
1055-
" color: red;\n" +
1056-
"}";
1055+
"{\n" +
1056+
" color: red;\n" +
1057+
"}";
1058+
10571059
result = match(css, { clazz: "foo" });
10581060
expect(result.length).toBe(1);
10591061
});

test/spec/Menu-test.js

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,19 @@ define(function (require, exports, module) {
129129

130130
function getBounds(object) {
131131
return {
132-
left: object.offset().left,
133-
top: object.offset().top,
134-
right: object.offset().left + object.width(),
135-
bottom: object.offset().top + object.height()
132+
left : object.offset().left,
133+
top : object.offset().top,
134+
right : object.offset().left + object.width(),
135+
bottom : object.offset().top + object.height()
136136
};
137137
}
138138

139139
function boundsInsideWindow(object) {
140140
var bounds = getBounds(object);
141-
return (
142-
bounds.left >= 0 &&
143-
bounds.right <= $(testWindow).width() &&
144-
bounds.top >= 0 &&
145-
bounds.bottom <= $(testWindow).height()
146-
);
141+
return bounds.left >= 0 &&
142+
bounds.right <= $(testWindow).width() &&
143+
bounds.top >= 0 &&
144+
bounds.bottom <= $(testWindow).height();
147145
}
148146

149147
it("context menu is not clipped", function () {
@@ -762,21 +760,19 @@ define(function (require, exports, module) {
762760

763761
function getBounds(object) {
764762
return {
765-
left: object.offset().left,
766-
top: object.offset().top,
767-
right: object.offset().left + object.width(),
768-
bottom: object.offset().top + object.height()
763+
left : object.offset().left,
764+
top : object.offset().top,
765+
right : object.offset().left + object.width(),
766+
bottom : object.offset().top + object.height()
769767
};
770768
}
771769

772770
function boundsInsideWindow(object) {
773771
var bounds = getBounds(object);
774-
return (
775-
bounds.left >= 0 &&
776-
bounds.right <= $(testWindow).width() &&
777-
bounds.top >= 0 &&
778-
bounds.bottom <= $(testWindow).height()
779-
);
772+
return bounds.left >= 0 &&
773+
bounds.right <= $(testWindow).width() &&
774+
bounds.top >= 0 &&
775+
bounds.bottom <= $(testWindow).height();
780776
}
781777

782778
it("context menu is not clipped", function () {

0 commit comments

Comments
 (0)