This repository was archived by the owner on Mar 23, 2024. It is now read-only.
Commit 9cc27b9
requireNumericLiterals: miss if first argument is an Identifier
Prior to this fix, the following would trigger an error:
```
let foo = '123';
parseInt(foo, 16);
```
After this change, an error is only triggered when using an actual
literal (as intended and indicated by the rule name)
Closes gh-21331 parent 7d30671 commit 9cc27b9
File tree
2 files changed
+7
-1
lines changed- lib/rules
- test/specs/rules
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
0 commit comments