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

💅 False Positive on lint/correctness/useHookAtTopLevel for arrow functions with implicit return #871

Closed
1 task done
jtannas opened this issue Nov 24, 2023 · 2 comments · Fixed by #1393
Closed
1 task done
Labels
A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@jtannas
Copy link

jtannas commented Nov 24, 2023

Environment information

CLI:
  Version:                      1.3.3-nightly.38797b7
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.14.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.0.13"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Rule name

lint/correctness/useHookAtTopLevel

Playground link

https://biomejs.dev/playground/?lintRules=all&code=aQBtAHAAbwByAHQAIAB7ACAAdQBzAGUATQBlAG0AbwAgAH0AIABmAHIAbwBtACAAJwByAGUAYQBjAHQAJwAKAAoAZQB4AHAAbwByAHQAIABjAG8AbgBzAHQAIABlAHgAcABsAGkAYwBpAHQAUgBlAHQAdQByAG4AIAA9ACAAKAB4ACkAIAA9AD4AIAB7AAoAIAAgAHIAZQB0AHUAcgBuACAAdQBzAGUATQBlAG0AbwAoACgAKQAgAD0APgAgAHgALAAgAFsAeABdACkAOwAKAH0ACgAKAGUAeABwAG8AcgB0ACAAYwBvAG4AcwB0ACAAaQBtAHAAbABpAGMAaQB0AFIAZQB0AHUAcgBuACAAPQAgACgAeAApACAAPQA%2BACAAdQBzAGUATQBlAG0AbwAoACgAKQAgAD0APgAgAHgALAAgAFsAeABdACkAOwAKAAoACgA%3D

Expected result

lint/correctness/useHookAtTopLevel should not flag any issues in the provided playground link

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug labels Nov 26, 2023
@unvalley
Copy link
Member

@arendjr Hi, I think you are familiar this lint rule, are you interested in fixing this?😺

@arendjr
Copy link
Contributor

arendjr commented Dec 14, 2023

Yeah, I can probably give it a shot next week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants