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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 fix of useShorthandFunctionType does not work correctly #2015

Closed
1 task done
riya-amemiya opened this issue Mar 9, 2024 · 1 comment 路 Fixed by #2020
Closed
1 task done

馃悰 fix of useShorthandFunctionType does not work correctly #2015

riya-amemiya opened this issue Mar 9, 2024 · 1 comment 路 Fixed by #2020
Assignees
Labels
A-Changelog Area: changelog A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@riya-amemiya
Copy link

Environment information

CLI:
  Version:                      1.6.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.4.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.0.30"

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

Workspace:
  Open Documents:               0

What happened?

Biome suggests the following correction:

- interface Foo<T> {
- (value: T): boolean;
- };
+ type Foo = (value: T) => boolean

However, this is an error as the generic has been removed.

https://codesandbox.io/p/devbox/boring-dew-kjtvgk

Expected result

The correct modification should be as follows:

- interface Foo<T> {
- (value: T): boolean;
- };
+ type Foo<T> = (value: T) => boolean

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos changed the title 馃悰 fix of noUndeclaredVariables does not work correctly 馃悰 fix of useShorthandFunctionType does not work correctly Mar 9, 2024
@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 Mar 9, 2024
@Sec-ant
Copy link
Contributor

Sec-ant commented Mar 9, 2024

I'll work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog 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.

3 participants