💅 lint/suspicious/noArrayIndexKey false negative in template literals #1575
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
Environment information
Rule name
lint/suspicious/noArrayIndexKey
Playground link
https://biomejs.dev/playground/?code=YwBvAG4AcwB0ACAAUgBlAG4AZABlAHIAQQByAHIAYQB5ACAAPQAgACgAKQAgAD0APgAgAHsACgAgACAAYwBvAG4AcwB0ACAAYQByAHIAIAA9ACAAWwAxACwAMgAsADMAXQA7AAoAIAAgAHIAZQB0AHUAcgBuACAAYQByAHIALgBmAG8AcgBFAGEAYwBoACgAKABpAHQAZQBtACwAIABpAG4AZABlAHgAKQAgAD0APgAgAHsACgAgACAAIAAgAC8ALwAgAHQAaAByAG8AdwBzACAAZQByAHIAbwByACAAYQBzACAAZQB4AHAAZQBjAHQAZQBkAAoAIAAgACAAIAByAGUAdAB1AHIAbgAgADwAZABpAHYAIABrAGUAeQA9AHsAaQBuAGQAZQB4AH0APgB7AGkAdABlAG0AfQA8AC8AZABpAHYAPgA7AAoAIAAgAH0AKQAKAH0ACgAKAGMAbwBuAHMAdAAgAFIAZQBuAGQAZQByAEEAcgByAGEAeQAyACAAPQAgACgAKQAgAD0APgAgAHsACgAgACAAYwBvAG4AcwB0ACAAYQByAHIAIAA9ACAAWwAxACwAMgAsADMAXQA7AAoAIAAgAHIAZQB0AHUAcgBuACAAYQByAHIALgBmAG8AcgBFAGEAYwBoACgAKABpAHQAZQBtACwAIABpAG4AZABlAHgAKQAgAD0APgAgAHsACgAgACAAIAAgAC8ALwAgAG4AbwAgAGUAcgByAG8AcgAgAHQAaAByAG8AdwBuACwAIABiAHUAdAAgAGUAeABwAGUAYwB0AGUAZAAgAGEAbgAgAGUAcgByAG8AcgAKACAAIAAgACAAcgBlAHQAdQByAG4AIAA8AGQAaQB2ACAAawBlAHkAPQB7AGAAdABlAHMAdAAtAGsAZQB5AC0AJAB7AGkAbgBkAGUAeAB9AGAAfQA%2BAHsAaQB0AGUAbQB9ADwALwBkAGkAdgA%2BADsACgAgACAAfQApAAoAfQA%3D
Expected result
Using an array index in a template literal key should cause an error as the ESLint rule "react/no-array-index-key": https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
Throw a lint-error on usage array-index as key with a template literal.
Code of Conduct
The text was updated successfully, but these errors were encountered: