Commits

Chris Leonello committed 46e741e

Cleaned up some lint.

  • Participants
  • Parent commits 6dda677

Comments (0)

Files changed (4)

src/jqplot.linearTickGenerator.js

         }
 
         else if (interval > 1) {
-            if (interval === parseInt(interval)) {
+            if (interval === parseInt(interval, 10)) {
                 fstr = '%d';
             }
             else {

src/jqplot.sprintf.js

         var sd = (parts[0].indexOf('.') != -1) ? parts[0].length - 1 : parts[0].length;
         var zeros = (parts[1] < 0) ? -parts[1] - 1 : 0;
         // exponent
-        var expn = parseInt(parts[1]);
+        var expn = parseInt(parts[1], 10);
         // digits to the left of the decimal place
         var dleft = (expn + 1 > 0) ? expn + 1 : 0;
         // digits to the right of the decimal place

src/jqplot.toImage.js

         newContext.textBaseline = 'top';
 
         function getLineheight(el) {
-            var lineheight = parseInt($(el).css('line-height'));
+            var lineheight = parseInt($(el).css('line-height'), 10);
 
             if (isNaN(lineheight)) {
-                lineheight = parseInt($(el).css('font-size')) * 1.2;
+                lineheight = parseInt($(el).css('font-size'), 10) * 1.2;
             }
             return lineheight;
         }
             var tagname = el.tagName.toLowerCase();
             var p = $(el).position();
             var css = window.getComputedStyle ?  window.getComputedStyle(el) : el.currentStyle; // for IE < 9
-            var left = x_offset + p.left + parseInt(css.marginLeft) + parseInt(css.borderLeftWidth) + parseInt(css.paddingLeft);
-            var top = y_offset + p.top + parseInt(css.marginTop) + parseInt(css.borderTopWidth)+ parseInt(css.paddingTop);
+            var left = x_offset + p.left + parseInt(css.marginLeft, 10) + parseInt(css.borderLeftWidth) + parseInt(css.paddingLeft, 10);
+            var top = y_offset + p.top + parseInt(css.marginTop, 10) + parseInt(css.borderTopWidth, 10)+ parseInt(css.paddingTop, 10);
             var w = newCanvas.width;
             // var left = x_offset + p.left + $(el).css('marginLeft') + $(el).css('borderLeftWidth') 
 
                 newContext.strokeStyle = $(el).css('border-top-color');
                 newContext.fillStyle = $(el).css('background-color');
                 newContext.fillRect(left, top, $(el).innerWidth(), $(el).innerHeight());
-                if (parseInt($(el).css('border-top-width')) > 0) {
+                if (parseInt($(el).css('border-top-width'), 10) > 0) {
                     newContext.strokeRect(left, top, $(el).innerWidth(), $(el).innerHeight());
                 }
 
 
                     // now fill the swatch
                     
-                    l += parseInt(elem.css('padding-left'));
-                    t += parseInt(elem.css('padding-top'));
-                    var h = elem.innerHeight() - 2 * parseInt(elem.css('padding-top'));
-                    var w = elem.innerWidth() - 2 * parseInt(elem.css('padding-left'));
+                    l += parseInt(elem.css('padding-left'), 10);
+                    t += parseInt(elem.css('padding-top'), 10);
+                    var h = elem.innerHeight() - 2 * parseInt(elem.css('padding-top'), 10);
+                    var w = elem.innerWidth() - 2 * parseInt(elem.css('padding-left'), 10);
 
                     var swatch = elem.children('div.jqplot-table-legend-swatch');
                     newContext.fillStyle = swatch.css('background-color');
                 $(el).find('td.jqplot-table-legend-label').each(function(){
                     var elem = $(this);
                     var l = left + elem.position().left;
-                    var t = top + elem.position().top + parseInt(elem.css('padding-top'));
+                    var t = top + elem.position().top + parseInt(elem.css('padding-top'), 10);
                     newContext.font = elem.jqplotGetComputedFontStyle();
                     newContext.fillStyle = elem.css('color');
                     newContext.fillText(elem.text(), l, t);
 # Enable or disable warnings based on requirements.
 # Use "+WarningName" to display or "-WarningName" to suppress.
 #
-+no_return_value              # function {0} does not always return a value
+-no_return_value              # function {0} does not always return a value
 +duplicate_formal             # duplicate formal argument {0}
 +equal_as_assign              # test for equality (==) mistyped as assignment (=)?{0}
-+var_hides_arg                # variable {0} hides argument
+-var_hides_arg                # variable {0} hides argument
 -redeclared_var               # redeclaration of {0} {1}
 -anon_no_return_value         # anonymous function does not always return a value
 +missing_semicolon            # missing semicolon
 +missing_break_for_last_case  # missing break statement for last case in switch
 -comparison_type_conv         # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
 -inc_dec_within_stmt          # increment (++) and decrement (--) operators used as part of greater statement
-+useless_void                 # use of the void type may be unnecessary (void is always undefined)
+-useless_void                 # use of the void type may be unnecessary (void is always undefined)
 +multiple_plus_minus          # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
 +use_of_label                 # use of label
 +block_without_braces         # block statement without curly braces
 +with_statement               # with statement hides undeclared variables; use temporary variable instead
 +trailing_comma_in_array      # extra comma is not recommended in array initializers
 +assign_to_function_call      # assignment to a function call
--parseint_missing_radix       # parseInt missing radix parameter
++parseint_missing_radix       # parseInt missing radix parameter
 
 
 ### Output format