From 588d7e8ae0ded93bf1084fa90fbd9fa9905a944e Mon Sep 17 00:00:00 2001
From: Mike Greiling <mike@pixelcog.com>
Date: Thu, 12 Jan 2017 00:38:39 -0500
Subject: [PATCH] resolve all parseInt radix eslint violations

---
 app/assets/javascripts/awards_handler.js                 | 4 ++--
 app/assets/javascripts/boards/components/board.js.es6    | 4 ++--
 app/assets/javascripts/boards/stores/boards_store.js.es6 | 4 ++--
 app/assets/javascripts/issuable_form.js                  | 4 ++--
 app/assets/javascripts/issues_bulk_assignment.js.es6     | 2 +-
 app/assets/javascripts/line_highlighter.js               | 6 +++---
 app/assets/javascripts/notes.js                          | 4 ++--
 app/assets/javascripts/project_new.js                    | 6 +++---
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js
index e8382f2d6f2..629dc267337 100644
--- a/app/assets/javascripts/awards_handler.js
+++ b/app/assets/javascripts/awards_handler.js
@@ -1,4 +1,4 @@
-/* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, no-var, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, no-unused-vars, no-else-return, prefer-template, quotes, comma-dangle, no-param-reassign, no-void, radix, brace-style, no-underscore-dangle, no-return-assign, camelcase */
+/* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, no-var, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, no-unused-vars, no-else-return, prefer-template, quotes, comma-dangle, no-param-reassign, no-void, brace-style, no-underscore-dangle, no-return-assign, camelcase */
 /* global Cookies */
 
 (function() {
@@ -134,7 +134,7 @@
           return this.decrementCounter($emojiButton, emoji);
         } else {
           counter = $emojiButton.find('.js-counter');
-          counter.text(parseInt(counter.text()) + 1);
+          counter.text(parseInt(counter.text(), 10) + 1);
           $emojiButton.addClass('active');
           this.addYouToUserList(votesBlock, emoji);
           return this.animateEmoji($emojiButton);
diff --git a/app/assets/javascripts/boards/components/board.js.es6 b/app/assets/javascripts/boards/components/board.js.es6
index 8b00014b801..a32881116d5 100644
--- a/app/assets/javascripts/boards/components/board.js.es6
+++ b/app/assets/javascripts/boards/components/board.js.es6
@@ -1,4 +1,4 @@
-/* eslint-disable comma-dangle, space-before-function-paren, one-var, radix */
+/* eslint-disable comma-dangle, space-before-function-paren, one-var */
 /* global Vue */
 /* global Sortable */
 
@@ -89,7 +89,7 @@
 
           if (e.newIndex !== undefined && e.oldIndex !== e.newIndex) {
             const order = this.sortable.toArray();
-            const list = Store.findList('id', parseInt(e.item.dataset.id));
+            const list = Store.findList('id', parseInt(e.item.dataset.id, 10));
 
             this.$nextTick(() => {
               Store.moveList(list, order);
diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6
index de715481fa1..ce581aed909 100644
--- a/app/assets/javascripts/boards/stores/boards_store.js.es6
+++ b/app/assets/javascripts/boards/stores/boards_store.js.es6
@@ -1,4 +1,4 @@
-/* eslint-disable comma-dangle, space-before-function-paren, one-var, space-in-parens, no-shadow, radix, dot-notation, max-len */
+/* eslint-disable comma-dangle, space-before-function-paren, one-var, space-in-parens, no-shadow, dot-notation, max-len */
 /* global Cookies */
 /* global List */
 
@@ -86,7 +86,7 @@
     },
     moveList (listFrom, orderLists) {
       orderLists.forEach((id, i) => {
-        const list = this.findList('id', parseInt(id));
+        const list = this.findList('id', parseInt(id, 10));
 
         list.position = i;
       });
diff --git a/app/assets/javascripts/issuable_form.js b/app/assets/javascripts/issuable_form.js
index 195dbec2f5a..293b856dc4d 100644
--- a/app/assets/javascripts/issuable_form.js
+++ b/app/assets/javascripts/issuable_form.js
@@ -1,4 +1,4 @@
-/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, no-useless-escape, no-new, quotes, object-shorthand, no-unused-vars, comma-dangle, radix, no-alert, consistent-return, no-else-return, prefer-template, one-var, one-var-declaration-per-line, curly, max-len */
+/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, no-useless-escape, no-new, quotes, object-shorthand, no-unused-vars, comma-dangle, no-alert, consistent-return, no-else-return, prefer-template, one-var, one-var-declaration-per-line, curly, max-len */
 /* global GitLab */
 /* global UsersSelect */
 /* global ZenMode */
@@ -51,7 +51,7 @@
 
     IssuableForm.prototype.handleSubmit = function() {
       var fieldId = (this.issueMoveField != null) ? this.issueMoveField.val() : null;
-      if ((parseInt(fieldId) || 0) > 0) {
+      if ((parseInt(fieldId, 10) || 0) > 0) {
         if (!confirm(this.issueMoveConfirmMsg)) {
           return false;
         }
diff --git a/app/assets/javascripts/issues_bulk_assignment.js.es6 b/app/assets/javascripts/issues_bulk_assignment.js.es6
index d8068ec295c..c260ad03d47 100644
--- a/app/assets/javascripts/issues_bulk_assignment.js.es6
+++ b/app/assets/javascripts/issues_bulk_assignment.js.es6
@@ -1,4 +1,4 @@
-/* eslint-disable comma-dangle, quotes, consistent-return, func-names, array-callback-return, space-before-function-paren, prefer-arrow-callback, radix, max-len, no-unused-expressions, no-sequences, no-underscore-dangle, no-unused-vars, no-param-reassign */
+/* eslint-disable comma-dangle, quotes, consistent-return, func-names, array-callback-return, space-before-function-paren, prefer-arrow-callback, max-len, no-unused-expressions, no-sequences, no-underscore-dangle, no-unused-vars, no-param-reassign */
 /* global Issuable */
 /* global Flash */
 
diff --git a/app/assets/javascripts/line_highlighter.js b/app/assets/javascripts/line_highlighter.js
index d77e5f30e0e..4620715a521 100644
--- a/app/assets/javascripts/line_highlighter.js
+++ b/app/assets/javascripts/line_highlighter.js
@@ -1,4 +1,4 @@
-/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, no-underscore-dangle, no-param-reassign, prefer-template, quotes, comma-dangle, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, radix, no-else-return, max-len */
+/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, no-underscore-dangle, no-param-reassign, prefer-template, quotes, comma-dangle, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, no-else-return, max-len */
 
 // LineHighlighter
 //
@@ -122,8 +122,8 @@
       // ?L(\d+)(?:-(\d+))?$/)
       matches = hash.match(/^#?L(\d+)(?:-(\d+))?$/);
       if (matches && matches.length) {
-        first = parseInt(matches[1]);
-        last = matches[2] ? parseInt(matches[2]) : null;
+        first = parseInt(matches[1], 10);
+        last = matches[2] ? parseInt(matches[2], 10) : null;
         return [first, last];
       } else {
         return [null, null];
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 8887a1ae67f..c7663926a41 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -1,4 +1,4 @@
-/* eslint-disable no-restricted-properties, func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, camelcase, no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line, default-case, prefer-template, consistent-return, no-alert, no-return-assign, no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new, brace-style, no-lonely-if, vars-on-top, no-unused-vars, no-sequences, no-shadow, newline-per-chained-call, no-useless-escape, radix */
+/* eslint-disable no-restricted-properties, func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, camelcase, no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line, default-case, prefer-template, consistent-return, no-alert, no-return-assign, no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new, brace-style, no-lonely-if, vars-on-top, no-unused-vars, no-sequences, no-shadow, newline-per-chained-call, no-useless-escape */
 /* global Flash */
 /* global GLForm */
 /* global Autosave */
@@ -917,7 +917,7 @@
     };
 
     Notes.prototype.updateNotesCount = function(updateCount) {
-      return this.notesCountBadge.text(parseInt(this.notesCountBadge.text()) + updateCount);
+      return this.notesCountBadge.text(parseInt(this.notesCountBadge.text(), 10) + updateCount);
     };
 
     Notes.prototype.resolveDiscussion = function() {
diff --git a/app/assets/javascripts/project_new.js b/app/assets/javascripts/project_new.js
index f931bb1cd94..6f9e98a10c2 100644
--- a/app/assets/javascripts/project_new.js
+++ b/app/assets/javascripts/project_new.js
@@ -1,4 +1,4 @@
-/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-unused-vars, one-var, no-underscore-dangle, prefer-template, no-else-return, prefer-arrow-callback, radix, max-len */
+/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-unused-vars, one-var, no-underscore-dangle, prefer-template, no-else-return, prefer-arrow-callback, max-len */
 
 (function() {
   var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
@@ -57,11 +57,11 @@
 
       $repoAccessLevel.off('change')
         .on('change', function () {
-          var selectedVal = parseInt($repoAccessLevel.val());
+          var selectedVal = parseInt($repoAccessLevel.val(), 10);
 
           this.$repoSelects.each(function () {
             var $this = $(this);
-            var repoSelectVal = parseInt($this.val());
+            var repoSelectVal = parseInt($this.val(), 10);
 
             $this.find('option').show();
 
-- 
GitLab