Skip to content

Commit a369647

Browse files
committed
fixed lint warnings and one flaky test
1 parent d320e3d commit a369647

12 files changed

Lines changed: 575 additions & 571 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
3+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/angular.js/lib/jsl/jsl}"/>
4+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-conf lib/jsl/jsl.default.conf"/>
5+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/angular.js}"/>
6+
</launchConfiguration>

lib/jsl/jsl.default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
+missing_semicolon # missing semicolon
2020
+meaningless_block # meaningless block; curly braces have no impact
2121
+comma_separated_stmts # multiple statements separated by commas (use semicolons?)
22-
+unreachable_code # unreachable code
22+
-unreachable_code # unreachable code
2323
-missing_break # missing break statement
2424
+missing_break_for_last_case # missing break statement for last case in switch
2525
+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)

src/Resource.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ ResourceFactory.prototype = {
108108
throw {status: status, response:response, message: status + ": " + response};
109109
}
110110
},
111-
action.verifyCache
112-
);
111+
action.verifyCache);
113112
return value;
114113
};
115114

src/scenario/HtmlUI.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ angular.scenario.ui.Html.prototype.addSpec = function(spec) {
3131
'<li class="status-pending test-it"></li>'
3232
);
3333
specContext = specContext.find('> .tests li:last');
34-
return new angular.scenario.ui.Html.Spec(specContext, spec.name,
34+
return new angular.scenario.ui.Html.Spec(specContext, spec.name,
3535
angular.bind(this, function(status) {
36-
var status = this.context.find('#status-legend .status-' + status);
36+
status = this.context.find('#status-legend .status-' + status);
3737
var parts = status.text().split(' ');
3838
var value = (parts[0] * 1) + 1;
3939
status.text(value + ' ' + parts[1]);
@@ -91,7 +91,7 @@ angular.scenario.ui.Html.Spec = function(context, name, doneFn) {
9191
' </p>' +
9292
'</div>' +
9393
'<ol class="test-actions">' +
94-
'</ol>'
94+
'</ol>'
9595
);
9696
context.find('> .test-info .test-name').text('it ' + name);
9797
};
@@ -116,8 +116,8 @@ angular.scenario.ui.Html.Spec.prototype.addStep = function(name) {
116116
angular.scenario.ui.Html.Spec.prototype.complete = function() {
117117
this.context.removeClass('status-pending');
118118
var endTime = new Date().getTime();
119-
this.context.find("> .test-info .timer-result")
120-
.text((endTime - this.startTime) + "ms");
119+
this.context.find("> .test-info .timer-result").
120+
text((endTime - this.startTime) + "ms");
121121
};
122122

123123
/**
@@ -172,8 +172,8 @@ angular.scenario.ui.Html.Step = function(context, name, doneFn) {
172172
angular.scenario.ui.Html.Step.prototype.complete = function() {
173173
this.context.removeClass('status-pending');
174174
var endTime = new Date().getTime();
175-
this.context.find(".timer-result")
176-
.text((endTime - this.startTime) + "ms");
175+
this.context.find(".timer-result").
176+
text((endTime - this.startTime) + "ms");
177177
};
178178

179179
/**

src/scenario/Runner.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ angular.scenario.Runner.prototype.describe = function(name, body) {
4343
* @param {String} Name of the block
4444
* @param {Function} Body of the block
4545
*/
46-
angular.scenario.Runner.prototype.it = function(name, body) {
47-
this.currentDescribe.it(name, body);
46+
angular.scenario.Runner.prototype.it = function(name, body) {
47+
this.currentDescribe.it(name, body);
4848
};
4949

5050
/**
@@ -54,7 +54,7 @@ angular.scenario.Runner.prototype.it = function(name, body) {
5454
* @param {Function} Callback to execute
5555
*/
5656
angular.scenario.Runner.prototype.beforeEach = function(body) {
57-
this.currentDescribe.beforeEach(body);
57+
this.currentDescribe.beforeEach(body);
5858
};
5959

6060
/**
@@ -64,7 +64,7 @@ angular.scenario.Runner.prototype.beforeEach = function(body) {
6464
* @param {Function} Callback to execute
6565
*/
6666
angular.scenario.Runner.prototype.afterEach = function(body) {
67-
this.currentDescribe.afterEach(body);
67+
this.currentDescribe.afterEach(body);
6868
};
6969

7070
/**
@@ -79,7 +79,7 @@ angular.scenario.Runner.prototype.run = function(ui, application, specRunnerClas
7979
var specs = this.rootDescribe.getSpecs();
8080
$root.application = application;
8181
$root.ui = ui;
82-
$root.setTimeout = function() {
82+
$root.setTimeout = function() {
8383
return self.$window.setTimeout.apply(self.$window, arguments);
8484
};
8585
asyncForEach(specs, angular.bind(this, function(spec, specDone) {
@@ -88,7 +88,7 @@ angular.scenario.Runner.prototype.run = function(ui, application, specRunnerClas
8888
angular.foreach(angular.scenario.dsl, angular.bind(this, function(fn, key) {
8989
this.$window[key] = function() {
9090
return fn.call($root).apply(angular.scope(runner), arguments);
91-
}
91+
};
9292
}));
9393
runner.run(ui, spec, specDone);
9494
}), specsDone || angular.noop);

test/ApiSpecs.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,9 @@ describe('api', function(){
159159
it('should use function', function(){
160160
expect(
161161
orderBy(
162-
[{a:15, b:1},{a:2, b:1}],
163-
function(value){ return value.a; }
164-
)
165-
).toEqual([{a:2, b:1},{a:15, b:1}]);
166-
162+
[{a:15, b:1},{a:2, b:1}],
163+
function(value){ return value.a; })).
164+
toEqual([{a:2, b:1},{a:15, b:1}]);
167165
});
168166

169167
});

0 commit comments

Comments
 (0)