From 9e4d04913ab9267d4a59df4d7feafd97b8117fe7 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 10 Jan 2017 16:35:09 -0600 Subject: resolve all no-plusplus eslint violations --- spec/javascripts/line_highlighter_spec.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'spec/javascripts/line_highlighter_spec.js') diff --git a/spec/javascripts/line_highlighter_spec.js b/spec/javascripts/line_highlighter_spec.js index 31f516b41bf..0354a16c099 100644 --- a/spec/javascripts/line_highlighter_spec.js +++ b/spec/javascripts/line_highlighter_spec.js @@ -1,4 +1,4 @@ -/* eslint-disable space-before-function-paren, no-var, no-param-reassign, quotes, prefer-template, no-else-return, new-cap, dot-notation, no-return-assign, comma-dangle, no-new, one-var, one-var-declaration-per-line, no-plusplus, jasmine/no-spec-dupes, no-underscore-dangle, padded-blocks, max-len */ +/* eslint-disable space-before-function-paren, no-var, no-param-reassign, quotes, prefer-template, no-else-return, new-cap, dot-notation, no-return-assign, comma-dangle, no-new, one-var, one-var-declaration-per-line, jasmine/no-spec-dupes, no-underscore-dangle, padded-blocks, max-len */ /* global LineHighlighter */ /*= require line_highlighter */ @@ -33,11 +33,11 @@ return expect($('#LC13')).toHaveClass(this.css); }); it('highlights a range of lines given in the URL hash', function() { - var i, line, results; + var line, results; new LineHighlighter('#L5-25'); expect($("." + this.css).length).toBe(21); results = []; - for (line = i = 5; i <= 25; line = ++i) { + for (line = 5; line <= 25; line += 1) { results.push(expect($("#LC" + line)).toHaveClass(this.css)); } return results; @@ -124,27 +124,27 @@ }); describe('with existing single-line highlight', function() { it('uses existing line as last line when target is lesser', function() { - var i, line, results; + var line, results; clickLine(20); clickLine(15, { shiftKey: true }); expect($("." + this.css).length).toBe(6); results = []; - for (line = i = 15; i <= 20; line = ++i) { + for (line = 15; line <= 20; line += 1) { results.push(expect($("#LC" + line)).toHaveClass(this.css)); } return results; }); return it('uses existing line as first line when target is greater', function() { - var i, line, results; + var line, results; clickLine(5); clickLine(10, { shiftKey: true }); expect($("." + this.css).length).toBe(6); results = []; - for (line = i = 5; i <= 10; line = ++i) { + for (line = 5; line <= 10; line += 1) { results.push(expect($("#LC" + line)).toHaveClass(this.css)); } return results; @@ -160,25 +160,25 @@ }); }); it('uses target as first line when it is less than existing first line', function() { - var i, line, results; + var line, results; clickLine(5, { shiftKey: true }); expect($("." + this.css).length).toBe(6); results = []; - for (line = i = 5; i <= 10; line = ++i) { + for (line = 5; line <= 10; line += 1) { results.push(expect($("#LC" + line)).toHaveClass(this.css)); } return results; }); return it('uses target as last line when it is greater than existing first line', function() { - var i, line, results; + var line, results; clickLine(15, { shiftKey: true }); expect($("." + this.css).length).toBe(6); results = []; - for (line = i = 10; i <= 15; line = ++i) { + for (line = 10; line <= 15; line += 1) { results.push(expect($("#LC" + line)).toHaveClass(this.css)); } return results; -- cgit v1.2.3