Skip to content

Commit 7e4c5c1

Browse files
committed
lint
1 parent ecd795a commit 7e4c5c1

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/plot_api/plot_api.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,7 @@ function checkMoveTracesArgs(gd, currentIndices, newIndices) {
633633
* @param newIndices
634634
*/
635635
function checkAddTracesArgs(gd, traces, newIndices) {
636-
var i,
637-
value;
636+
var i, value;
638637

639638
// check that gd has attribute 'data' and 'data' is array
640639
if(!Array.isArray(gd.data)) {
@@ -965,7 +964,7 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
965964
helpers.cleanData(traces, gd.data);
966965

967966
// add the traces to gd.data (no redrawing yet!)
968-
for(i = 0; i < traces.length; i += 1) {
967+
for(i = 0; i < traces.length; i++) {
969968
gd.data.push(traces[i]);
970969
}
971970

test/jasmine/tests/plot_api_test.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ describe('Test plot api', function() {
414414

415415
// make sure we didn't muck with gd.data if things failed!
416416
expect(gd).toEqual(expected);
417-
418417
});
419418

420419
it('should throw an error when traces and newIndices arrays are unequal', function() {
@@ -454,7 +453,6 @@ describe('Test plot api', function() {
454453
expect(gd.data[3].uid).toBeDefined();
455454
expect(PlotlyInternal.redraw).not.toHaveBeenCalled();
456455
expect(PlotlyInternal.moveTraces).toHaveBeenCalledWith(gd, [-2, -1], [1, 3]);
457-
458456
});
459457

460458
it('should work when newIndices has negative indices', function() {
@@ -465,7 +463,6 @@ describe('Test plot api', function() {
465463
expect(gd.data[3].uid).toBeDefined();
466464
expect(PlotlyInternal.redraw).not.toHaveBeenCalled();
467465
expect(PlotlyInternal.moveTraces).toHaveBeenCalledWith(gd, [-2, -1], [-3, -1]);
468-
469466
});
470467

471468
it('should work when newIndices is an integer', function() {
@@ -486,7 +483,7 @@ describe('Test plot api', function() {
486483
it('should work when duplicating the existing data', function() {
487484
Plotly.addTraces(gd, gd.data);
488485

489-
expect(gd.data.length).toEqual(4)
486+
expect(gd.data.length).toEqual(4);
490487
expect(gd.data[0]).not.toBe(gd.data[2]);
491488
expect(gd.data[1]).not.toBe(gd.data[3]);
492489
});

0 commit comments

Comments
 (0)