Skip to content

Commit

Permalink
Chore: removed extra getRaw calls
Browse files Browse the repository at this point in the history
  • Loading branch information
anikethsaha committed Aug 26, 2020
1 parent d20255f commit 648f9b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rules/no-loss-of-precision.js
Expand Up @@ -52,10 +52,9 @@ module.exports = {
*/
function isBaseTen(node) {
const prefixes = ["0x", "0X", "0b", "0B", "0o", "0O"];
const raw = getRaw(node);

return prefixes.every(prefix => !raw.startsWith(prefix)) &&
!/^0[0-7]+$/u.test(raw);
return prefixes.every(prefix => !node.raw.startsWith(prefix)) &&
!/^0[0-7]+$/u.test(node.raw);
}

/**
Expand Down

0 comments on commit 648f9b8

Please sign in to comment.