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:
Alexander S. 2024-09-07 05:48:24 +02:00 committed by GitHub
parent 0ac420d6f9
commit cdd1a91754
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -267,7 +267,7 @@ impl InternConfig<'_> {
InternConfig {
node: parent_node,
value: NoMagicNumbersNumber::BigInt(raw.clone()),
raw: format!("-{raw}"),
raw,
}
} else {
InternConfig {

View file

@ -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;
· ───