💅 False positive on lint/suspicious/noRedeclare
when default-exporting overloaded functions
#1061
Closed
1 task done
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
Environment information
Rule name
lint/suspicious/noRedeclare
Playground link
https://biomejs.dev/playground/?lineWidth=120&indentStyle=space&indentWidth=4&code=ZQB4AHAAbwByAHQAIABkAGUAZgBhAHUAbAB0ACAAZgB1AG4AYwB0AGkAbwBuACAAZgBvAG8AKAApADoAIABuAHUAbQBiAGUAcgA7AAoAZQB4AHAAbwByAHQAIABkAGUAZgBhAHUAbAB0ACAAZgB1AG4AYwB0AGkAbwBuACAAZgBvAG8AKABhADoAIABzAHQAcgBpAG4AZwApADoAIABuAHUAbQBiAGUAcgA7AAoAZQB4AHAAbwByAHQAIABkAGUAZgBhAHUAbAB0ACAAZgB1AG4AYwB0AGkAbwBuACAAZgBvAG8AKABhAD8AOgAgAHMAdAByAGkAbgBnACkAOgAgAG4AdQBtAGIAZQByACAAewAKACAAIAByAGUAdAB1AHIAbgAgADEAOwAKAH0ACgA%3D
Expected result
Not to complain.
Code seems to be fine: https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBAE2AMwIYFcA29noHYDGMAlhHnMhBABQCUAXHHugLYBGwUA3AFCiSxEKDNgr4ipcpRqpGAZxhRieAOYMmrDtz7ho8JGiw5xJMhSrVUAfnmLlaxs3ac4Abx5w4UYDHRRyAIy8AL48QA
I think that biome assumes that there must only be one
default
export, even though it's valid if theay are just overload declarations.Code of Conduct
The text was updated successfully, but these errors were encountered: