Skip to content

Commit

Permalink
chore: update snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard Lavuš committed Jan 6, 2024
1 parent 61baa62 commit cb44826
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/biome_js_analyze/tests/spec_tests.rs
assertion_line: 83
expression: invalid.js
---
# Input
Expand Down Expand Up @@ -1449,6 +1450,32 @@ invalid.js:59:1 lint/style/useNumericLiterals FIXABLE ━━━━━━━━
61 61parseInt('11', 2)//comment


```
```
invalid.js:60:1 lint/style/useNumericLiterals FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

! This call to parseInt() can be replaced by a binary literal.

58parseInt('11'/**/, 2);
59parseInt(`11`/**/, 2);
> 60parseInt('11', 2 /**/);
^^^^^^^^^^^^^^^^^^^^^^
61parseInt('11', 2)//comment
62 │ ;

i Using a literal avoids unnecessary computations.

i Unsafe fix: Use the computed binary literal instead.

58 58parseInt('11'/**/, 2);
59 59parseInt(`11`/**/, 2);
60- parseInt('11'2·/**/);
60+ 0b11;
61 61parseInt('11', 2)//comment
62 62 │ ;


```
```
Expand Down

0 comments on commit cb44826

Please sign in to comment.