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

🐛 lint/suspicious/noRedeclare false positive #591

Closed
1 task done
nikeee opened this issue Oct 23, 2023 · 0 comments · Fixed by #593
Closed
1 task done

🐛 lint/suspicious/noRedeclare false positive #591

nikeee opened this issue Oct 23, 2023 · 0 comments · Fixed by #593
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 Oct 23, 2023

Environment information

CLI:
  Version:                      1.3.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.0.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

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

Workspace:
  Open Documents:               0

What happened?

interface A {
	get<T>(f: T): T;
	post<T>(g: T): T;
}

Yields error:

  ✖ Shouldn't redeclare 'T'. Consider to delete it or rename it.
  
    1 │ interface A {
    2 │ 	get<T>(f: T): T;
  > 3 │ 	post<T>(g: T): T;
      │ 	    ^
    4 │ }
    5 │ 
  
  ℹ 'T' is defined here:
  
    1 │ interface A {
  > 2 │ 	get<T>(f: T): T;
      │ 	   ^
    3 │ 	post<T>(g: T): T;
    4 │ }

Expected result

It should not complain.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos self-assigned this Oct 24, 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 Oct 24, 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