Skip to content

Commit

Permalink
code review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Dec 5, 2024
1 parent 216dae4 commit 521fce6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rules/no-unsafe-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export default {
const match = value.match(NUMBER);
// assert(match, "If the regex is right, match is always truthy")

// If any part of the number other than the has a non-zero digit
// in it, this number was not intended to be evaluated down to a
// zero.
// If any part of the number other than the exponent has a
// non-zero digit in it, this number was not intended to be
// evaluated down to a zero.
if (
NON_ZERO.test(match.groups.int) ||
NON_ZERO.test(match.groups.frac)
Expand All @@ -61,7 +61,7 @@ export default {
data: { value },
});
}
} else if (!value.match(/[.e]/iu)) {
} else if (!/[.e]/iu.test(value)) {
// Intended to be an integer
if (
node.value > Number.MAX_SAFE_INTEGER ||
Expand Down

0 comments on commit 521fce6

Please sign in to comment.