diff --git a/js/.eslintrc b/js/.eslintrc index 427098c13d..e712f32474 100644 --- a/js/.eslintrc +++ b/js/.eslintrc @@ -10,7 +10,7 @@ // Possible Errors "comma-dangle": [2, "never"], "handle-callback-err": 2, - "no-bitwise": 0, + "no-bitwise": 2, "no-cond-assign": 2, "no-console": 2, "no-constant-condition": 2, diff --git a/js/src/util.js b/js/src/util.js index 5cb8f810be..dba6e9bd6f 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -99,7 +99,9 @@ const Util = (($) => { getUID(prefix) { do { + /* eslint-disable no-bitwise */ prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here + /* eslint-enable no-bitwise */ } while (document.getElementById(prefix)) return prefix },