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

💅 useForOf - false-positive when using index as a shorthand value #1653

Closed
1 task done
ipanasenko opened this issue Jan 24, 2024 · 0 comments · Fixed by #1666
Closed
1 task done

💅 useForOf - false-positive when using index as a shorthand value #1653

ipanasenko opened this issue Jan 24, 2024 · 0 comments · Fixed by #1666
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

@ipanasenko
Copy link
Contributor

Environment information

Version:                      1.5.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.18.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.8.1"

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

Workspace:
  Open Documents:               0

Rule name

useForOf

Playground link

https://biomejs.dev/playground/?lintRules=all&code=YwBvAG4AcwB0ACAAYQByAHIAYQB5ACAAPQAgAFsAJwBhACcALAAgACcAYgAnACwAIAAnAGMAJwBdADsACgBmAG8AcgAgACgAbABlAHQAIABpAG4AZABlAHgAIAA9ACAAMAA7ACAAaQBuAGQAZQB4ACAAPAAgAGEAcgByAGEAeQAuAGwAZQBuAGcAdABoADsAIABpAG4AZABlAHgAKwArACkAIAB7AAoAIAAgAGMAbwBuAHMAbwBsAGUALgBpAG4AZgBvACgAaQBuAGQAZQB4ACkAOwAKAH0ACgAKAGYAbwByACAAKABsAGUAdAAgAGkAbgBkAGUAeAAgAD0AIAAwADsAIABpAG4AZABlAHgAIAA8ACAAYQByAHIAYQB5AC4AbABlAG4AZwB0AGgAOwAgAGkAbgBkAGUAeAArACsAKQAgAHsACgAgACAAYwBvAG4AcwBvAGwAZQAuAGkAbgBmAG8AKAB7ACAAaQBuAGQAZQB4ACAAfQApADsACgB9AAoACgBmAG8AcgAgACgAbABlAHQAIABpAG4AZABlAHgAIAA9ACAAMAA7ACAAaQBuAGQAZQB4ACAAPAAgAGEAcgByAGEAeQAuAGwAZQBuAGcAdABoADsAIABpAG4AZABlAHgAKwArACkAIAB7AAoAIAAgAGMAbwBuAHMAbwBsAGUALgBpAG4AZgBvACgAewAgAGkAbgBkAGUAeAA6ACAAaQBuAGQAZQB4ACAAfQApADsACgB9AAoACgBmAG8AcgAgACgAbABlAHQAIABpAG4AZABlAHgAIAA9ACAAMAA7ACAAaQBuAGQAZQB4ACAAPAAgAGEAcgByAGEAeQAuAGwAZQBuAGcAdABoADsAIABpAG4AZABlAHgAKwArACkAIAB7AAoAIAAgAGMAbwBuAHMAbwBsAGUALgBpAG4AZgBvACgAewAgAGkAbgBkAGUAeAA6ACAAaQBuAGQAZQB4ACAAKwAgADEAMQAgAH0AKQA7AAoAfQAKAAoAZgBvAHIAIAAoAGwAZQB0ACAAaQBuAGQAZQB4ACAAPQAgADAAOwAgAGkAbgBkAGUAeAAgADwAIABhAHIAcgBhAHkALgBsAGUAbgBnAHQAaAA7ACAAaQBuAGQAZQB4ACsAKwApACAAewAKACAAIABjAG8AbgBzAG8AbABlAC4AaQBuAGYAbwAoAGAAJAB7AGkAbgBkAGUAeAB9AGAAKQA7AAoAfQAKAAoA

Expected result

Should not show lint error

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 S-Help-wanted Status: you're familiar with the code base and want to help the project labels Jan 24, 2024
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.

2 participants