From ad4c0ee52f6b6f01d3d55bed4f54e6f788f44cd5 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 30 Nov 2015 23:53:25 -0800 Subject: [PATCH] Exempt getUID() from ESLint's no-bitwise rule [skip sauce] [skip validator] --- js/src/util.js | 2 ++ 1 file changed, 2 insertions(+) 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 },