Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(linter): false positive in oxc/const-comparisons #8163

Closed
camc314 opened this issue Dec 28, 2024 · 0 comments · Fixed by #8164
Closed

bug(linter): false positive in oxc/const-comparisons #8163

camc314 opened this issue Dec 28, 2024 · 0 comments · Fixed by #8164
Assignees
Labels
C-bug Category - Bug

Comments

@camc314
Copy link
Contributor

camc314 commented Dec 28, 2024

https://github.com/oven-sh/bun/blob/c2a77cf7ec9de9eadf938046bdf78e58561c8a6d/src/js/builtins/EventSource.ts#L322

  × oxc(const-comparisons): This comparison will always evaluate to true
     ╭─[src/js/builtins/EventSource.ts:322:19]
 321 │               self.#received_length += chunks.length;
 322 │               if (self.#received_length >= self.#content_length) {
     ·                   ─────────────────────────────────────────────
 323 │                 self.#state = 2;
     ╰────
  help: Because `self.#received_length` will always be equal to itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant