mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(linter): typescript/no-magic-numbers: remove double minus for reporting negative bigint numbers (#5565)
@DonIsaac small bug I found after 10x review --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0ac420d6f9
commit
cdd1a91754
2 changed files with 3 additions and 3 deletions
|
|
@ -267,7 +267,7 @@ impl InternConfig<'_> {
|
|||
InternConfig {
|
||||
node: parent_node,
|
||||
value: NoMagicNumbersNumber::BigInt(raw.clone()),
|
||||
raw: format!("-{raw}"),
|
||||
raw,
|
||||
}
|
||||
} else {
|
||||
InternConfig {
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
· ────
|
||||
╰────
|
||||
|
||||
⚠ typescript-eslint(no-magic-numbers): No magic number: --100n
|
||||
⚠ typescript-eslint(no-magic-numbers): No magic number: -100n
|
||||
╭─[no_magic_numbers.tsx:1:3]
|
||||
1 │ f(-100n)
|
||||
· ─────
|
||||
|
|
@ -757,7 +757,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
· ──
|
||||
╰────
|
||||
|
||||
⚠ typescript-eslint(no-magic-numbers): No magic number: --4n
|
||||
⚠ typescript-eslint(no-magic-numbers): No magic number: -4n
|
||||
╭─[no_magic_numbers.tsx:1:12]
|
||||
1 │ type Foo = -4n;
|
||||
· ───
|
||||
|
|
|
|||
Loading…
Reference in a new issue