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

💅 False positive on lint/suspicious/noRedeclare when default-exporting overloaded functions #1061

Closed
1 task done
nikeee opened this issue Dec 5, 2023 · 0 comments · Fixed by #1062
Closed
1 task done
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

Comments

@nikeee
Copy link
Contributor

nikeee commented Dec 5, 2023

Environment information

CLI:
  Version:                      1.4.1
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.3.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

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

Workspace:
  Open Documents:               0

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

  • I agree to follow Biome's Code of Conduct
@nikeee nikeee changed the title 💅 Falose positive on lint/suspicious/noRedeclare when default-exporting overloaded functions 💅 False positive on lint/suspicious/noRedeclare when default-exporting overloaded functions Dec 5, 2023
@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 5, 2023
@Conaclos Conaclos self-assigned this Dec 5, 2023
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants