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

💅 useAwait wrong positive with "for await" #1081

Closed
1 task done
jer-sen opened this issue Dec 6, 2023 · 5 comments · Fixed by #1789
Closed
1 task done

💅 useAwait wrong positive with "for await" #1081

jer-sen opened this issue Dec 6, 2023 · 5 comments · Fixed by #1789
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages 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

@jer-sen
Copy link

jer-sen commented Dec 6, 2023

Environment information

CLI:
  Version:                      1.4.1
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.10.0"      
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/1.22.21"

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/nursery/useAwait

Playground link

https://biomejs.dev/playground/?lintRules=all&code=YQBzAHkAbgBjACAAKAB3AGgAYQB0ADoAIABzAHQAcgBpAG4AZwApACAAPQA%2BACAAewAKACAAIABjAG8AbgBzAHQAIAByAGwAIAA9ACAAcgBlAGEAZABsAGkAbgBlAC4AYwByAGUAYQB0AGUASQBuAHQAZQByAGYAYQBjAGUAKAB7AAoAIAAgACAAIABpAG4AcAB1AHQAOgAgAHAAcgBvAGMAZQBzAHMALgBzAHQAZABpAG4ALAAKACAAIAAgACAAbwB1AHQAcAB1AHQAOgAgAHAAcgBvAGMAZQBzAHMALgBzAHQAZABvAHUAdAAsAAoAIAAgAH0AKQA7AAoACgAgACAALwAvACAAZQBzAGwAaQBuAHQALQBkAGkAcwBhAGIAbABlAC0AbgBlAHgAdAAtAGwAaQBuAGUAIABuAG8ALQBjAG8AbgBzAG8AbABlAAoAIAAgAGMAbwBuAHMAbwBsAGUALgBsAG8AZwAoAHcAaABhAHQAKQA7AAoAIAAgAGwAZQB0ACAAcgBlAHMAIAA9ACAAJwAnADsACgAKACAAIABmAG8AcgAgAGEAdwBhAGkAdAAgACgAYwBvAG4AcwB0ACAAbABpAG4AZQAgAG8AZgAgAHIAbAApACAAewAKACAAIAAgACAAaQBmACAAKABsAGkAbgBlACAAPQA9AD0AIAAnACcAKQAgAGIAcgBlAGEAawA7AAoAIAAgACAAIAByAGUAcwAgACsAPQAgACcAXABuACcAIAArACAAbABpAG4AZQA7AAoAIAAgAH0ACgAKACAAIAByAGUAdAB1AHIAbgAgAHIAZQBzADsACgB9ADsA

Expected result

for await is not detected

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Dec 6, 2023
@Conaclos
Copy link
Member

Conaclos commented Dec 6, 2023

@2-NOW You could be interested in this issue.

@Conaclos Conaclos added the S-Help-wanted Status: you're familiar with the code base and want to help the project label Dec 6, 2023
@2-NOW
Copy link
Contributor

2-NOW commented Dec 6, 2023

@2-NOW You could be interested in this issue.

Thank you, i will look into this issue :D

@jer-sen
Copy link
Author

jer-sen commented Dec 6, 2023

@2-NOW you should also have a look on these 2 false negatives https://biomejs.dev/playground/?lintRules=all&code=YwBvAG4AcwB0ACAAZgAgAD0AIABhAHMAeQBuAGMAIAAoAF8ALAAgAHYAYQBsAHUAZQApACAAPQA%2BACAAewAKAAkAYwBvAG4AcwB0ACAAcABhAHIAcwBlAFIAZQBzACAAPQAgAHoALgBhAHIAcgBhAHkAKAB6AC4AbwBiAGoAZQBjAHQAKAB7ACAAbABhAG4AZwB1AGEAZwBlADoAIAB6AC4AcwB0AHIAaQBuAGc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oAHsAIABsAGEAbgBnAHUAYQBnAGUAOgAgAHoALgBzAHQAcgBpAG4AZwAoACkAIAB9ACkAKQAuAHMAYQBmAGUAUABhAHIAcwBlACgAdgBhAGwAdQBlACkAOwAKAAkALwAvACAALwAvACAAVwBlACAAbABlAGEAdgBlACAAdABoAGUAIAB2AGEAbABpAGQAYQB0AGkAbwBuACAAbwBmACAAYQByAHIAYQB5ACAAdgBhAGwAdQBlAHMAIAB0AG8AIAB0AGgAZQBpAHIAIABmAG8AcgBtACAAaQB0AGUAbQAKAAkALwAvACAAaQBmACAAKAAhAHAAYQByAHMAZQBSAGUAcwAuAHMAdQBjAGMAZQBzAHMAKQAgAHIAZQB0AHUAcgBuADsACgAJAC8ALwAgAGkAZgAgACgACgAJAC8ALwAgAAkAbgBlAHcAIABTAGUAdAAoAHAAYQByAHMAZQBSAGUAcwAuAGQAYQB0AGEALgBtAGEAcAAoACgAdgApACAAPQA%2BACAAdgAuAGwAYQBuAGcAdQBhAGcAZQApACkALgBzAGkAegBlACAAIQA9AD0AIABwAGEAcgBzAGUAUgBlAHMALgBkAGEAdABhAC4AbABlAG4AZwB0AGgACgAJAC8ALwAgACkAIAB7AAoACQAvAC8AIAAJAHQAaAByAG8AdwAgAG4AZQB3ACAARABpAHMAcABsAGEAeQBhAGIAbABlAEUAcgByAG8AcgAoAAoACQAvAC8AIAAJAAkAdAByAGEAbgBzAFQAZQB4AHQAKAAiAGcAbABvAGIAYQBsAEUAcgByAG8AcgBNAGUAcwBzAGEAZwBlAC4AbQB1AGwAdABpAHAAbABlAFYAYQBsAHUAZQBzAEYAbwByAFMAYQBtAGUATABhAG4AZwB1AGEAZwBlACIAKQAsAAoACQAvAC8AIAAJACkAOwAKAAkALwAvACAAfQAKAH0AOwAKAA%3D%3D

@jer-sen
Copy link
Author

jer-sen commented Feb 12, 2024

Thanks @unvalley !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages 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