diff --git a/.overcommit.yml b/.overcommit.yml index 849a4d892..39a80d1fd 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -56,9 +56,7 @@ PreCommit: enabled: true on_warn: warn JsHint: - problem_on_unmodified_line: warn enabled: true - on_fail: warn exclude: - 'app/assets/**' - 'spec/javascripts/support/vendor/**' diff --git a/app/assets/javascripts/graphs/bar_label_group.js b/app/assets/javascripts/graphs/bar_label_group.js index ca8f82533..bfe2eee51 100644 --- a/app/assets/javascripts/graphs/bar_label_group.js +++ b/app/assets/javascripts/graphs/bar_label_group.js @@ -31,10 +31,10 @@ This file draws the labels to the left of each bar. var barLabelTopEdge = 17; return i * barHeight * (barLabelSpread) + barLabelTopEdge; }) - .text(function(d){return d}); + .text(function(d){return d;}); }; growstuff.BarLabelGroup = BarLabelGroup; -}()) \ No newline at end of file +}()); \ No newline at end of file diff --git a/app/assets/javascripts/graphs/width_scale.js b/app/assets/javascripts/graphs/width_scale.js index 8afd0ecd4..d8997c8c9 100644 --- a/app/assets/javascripts/graphs/width_scale.js +++ b/app/assets/javascripts/graphs/width_scale.js @@ -26,7 +26,7 @@ to the display size of the svg WidthScale.prototype.getMaxValue = function(){ return d3.max(this._data.bars.map(function(bar) { return bar.value; })); - } + }; growstuff.WidthScale = WidthScale; diff --git a/spec/javascripts/graphs/bar_group_spec.js b/spec/javascripts/graphs/bar_group_spec.js index 2e624555e..6358d1d26 100644 --- a/spec/javascripts/graphs/bar_group_spec.js +++ b/spec/javascripts/graphs/bar_group_spec.js @@ -31,7 +31,7 @@ }); it('draws a group', function(){ - expect($('g.bar')).toExist() + expect($('g.bar')).toExist(); }); it('draws 2 bars', function() { diff --git a/spec/javascripts/graphs/bar_label_group_spec.js b/spec/javascripts/graphs/bar_label_group_spec.js index a94606713..aaaf680c7 100644 --- a/spec/javascripts/graphs/bar_label_group_spec.js +++ b/spec/javascripts/graphs/bar_label_group_spec.js @@ -20,22 +20,22 @@ }; subject = new BarLabelGroup(data); subject.render(d3.select('#jasmine_content').append('svg')); - }) + }); it('draws a group for labels', function(){ - expect($('g.bar-label')).toExist() + expect($('g.bar-label')).toExist(); }); it('draws 2 bar labels', function(){ expect($('g.bar-label text')).toHaveLength(2); - }) + }); it ('has text for 2 bar labels', function(){ //jquery jasmine appends text from all text elements // into one string expect($('g.bar-label text')).toHaveText('ShadeHalf Shade'); - }) + }); });