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

💅 useJsxKeyInIterable shows warning even key is specified #3020

Closed
1 task done
nouman2075 opened this issue May 29, 2024 · 3 comments · Fixed by #3031
Closed
1 task done

💅 useJsxKeyInIterable shows warning even key is specified #3020

nouman2075 opened this issue May 29, 2024 · 3 comments · Fixed by #3031
Assignees
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

@nouman2075
Copy link

nouman2075 commented May 29, 2024

Environment information

CLI:
  Version:                      1.7.4-nightly.125f34b
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.0.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.1.8"

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

Workspace:
  Open Documents:               0

 aristotle-ui  
 aristotle-ui  biome rage --linter
zsh: command not found: biome
 aristotle-ui  bunxbiome rage --linter
zsh: command not found: bunxbiome
 aristotle-ui  bunx biome rage --linter
CLI:
  Version:                      1.7.4-nightly.125f34b
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.0.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.1.8"

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

Linter:
  Recommended:                  true
  All:                          false
  Rules:                        a11y/useKeyWithClickEvents = "off"
                                complexity/noEmptyTypeParameters = "error"
                                complexity/noExcessiveCognitiveComplexity = {"level":"error","options":{"maxAllowedComplexity":30}}
                                complexity/noForEach = "off"
                                complexity/noStaticOnlyClass = "off"
                                complexity/noUselessFragments = "error"
                                complexity/noUselessLoneBlockStatements = "error"
                                complexity/useSimplifiedLogicExpression = "error"
                                correctness/noInvalidUseBeforeDeclaration = "error"
                                correctness/noUndeclaredVariables = "error"
                                correctness/noUnusedImports = "error"
                                correctness/noUnusedPrivateClassMembers = "error"
                                correctness/noUnusedVariables = "error"
                                correctness/useHookAtTopLevel = "error"
                                nursery/noDuplicateJsonKeys = "error"
                                nursery/noFlatMapIdentity = "error"
                                nursery/noNodejsModules = "error"
                                nursery/useSortedClasses = {"level":"error","options":{"attributes":["class","className"],"functions":["joinClasses"]}}
                                performance/noBarrelFile = "error"
                                style/noNamespaceImport = "error"
                                style/useCollapsedElseIf = "error"
                                style/useConsistentArrayType = {"level":"error","options":{"syntax":"generic"}}
                                style/useExportType = "error"
                                style/useFilenamingConvention = {"level":"error","options":{"filenameCases":["camelCase","export","PascalCase"]}}
                                style/useForOf = "error"
                                style/useFragmentSyntax = "error"
                                style/useImportType = "error"
                                style/useNamingConvention = "off"
                                style/useNodeAssertStrict = "error"
                                style/useNodejsImportProtocol = "error"
                                style/useNumberNamespace = "error"
                                style/useShorthandAssign = "error"
                                style/useShorthandFunctionType = "error"
                                style/useSingleCaseStatement = "error"
                                suspicious/noConsoleLog = "warn"
                                suspicious/noEmptyBlockStatements = "error"
                                suspicious/noGlobalAssign = "error"
                                suspicious/noThenProperty = "error"
                                suspicious/useAwait = "error"

Workspace:
  Open Documents:               0

Rule name

useJsxKeyInIterable

Playground link

https://biomejs.dev/playground/?lineWidth=120&code=aQBtAHAAbwByAHQAIAB7ACAARgByAGEAZwBtAGUAbgB0ACAAfQAgAGYAcgBvAG0AIAAnAHIAZQBhAGMAdAAnADsACgAKAGMAbwBuAHMAdAAgAGkAdABlAG0AcwAgAD0AIABbAF0AOwAKAAoAYwBvAG4AcwB0ACAAQwB1AHMAdABvAG0AUABvAHAAbwB2AGUAcgBNAGUAbgB1ACAAPQAgACgAKQAgAD0APgAgAHsACgAJAHIAZQB0AHUAcgBuACAAKAAKAAkACQA8AGQAaQB2AD4ACgAgACAAIAAgACAAIAAgACAAIAAgACAAIAB7AGkAdABlAG0AcwAuAG0AYQBwACgAKABpAHQAZQBtACkAIAA9AD4AIAB7AAoAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIABsAGUAdAAgAG4AbwBkAGUAIAA9ACAAKAA8AGIAdQB0AHQAbwBuACAAdAB5AHAAZQA9ACIAYgB1AHQAdABvAG4AIgA%2BAHsAaQB0AGUAbQAuAGwAYQBiAGUAbAB9ADwALwBiAHUAdAB0AG8AbgA%2BACkAOwAKAAoAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIABpAGYAIAAoAGkAdABlAG0ALgBpAHMATABpAG4AawApACAAbgBvAGQAZQAgAD0AIAAoADwAYQAgAGgAcgBlAGYAPQAiAC8AIgA%2BAHsAbgBvAGQAZQB9ADwALwBhAD4AKQA7AAoACgAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAHIAZQB0AHUAcgBuACAAPABGAHIAYQBnAG0AZQBuAHQAIABrAGUAeQA9AHsAaQB0AGUAbQAuAGwAYQBiAGUAbAB9AD4AewBuAG8AZABlAH0APAAvAEYAcgBhAGcAbQBlAG4AdAA%2BADsACgAgACAAIAAgACAAIAAgACAAIAAgACAAIAB9ACkAfQAKACAAIAAgACAAIAAgACAAIAA8AC8AZABpAHYAPgAKAAkAKQA7AAoAfQA7AAoA

Expected result

It should not show warning/error when key is specified.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico
Copy link
Member

Can you create a smaller reproduction?

@nouman2075
Copy link
Author

nouman2075 commented May 29, 2024

@ematipico Playground url updated

@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 May 29, 2024
@dyc3
Copy link
Contributor

dyc3 commented May 30, 2024

I touched this rule recently, I can pick this up.

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
3 participants