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

🐛 Import fix leave an empty line #653

Closed
1 task done
wcastand opened this issue Nov 2, 2023 · 0 comments · Fixed by #659
Closed
1 task done

🐛 Import fix leave an empty line #653

wcastand opened this issue Nov 2, 2023 · 0 comments · Fixed by #659
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

@wcastand
Copy link

wcastand commented Nov 2, 2023

Environment information

❯ yarn biome rage
CLI:
  Version:                      1.3.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.5.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/3.4.1"

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

Workspace:
  Open Documents:               0

What happened?

can look at playground for the log and the repo for a reproductible of the --fix not working properly.

https://github.com/wcastand/bug-biome-import-fix

playground

Expected result

i expect the fix rule for unused import to remove the import but also the empty line to order the import and keep them together.

so

import { a } from "./a";
import { e } from "./e";
import { d } from "./d";
import { b } from "./b";
import { c } from "./c";

export const bb = a + b + c + e;

to become

import { a } from "./a";
import { b } from "./b";
import { c } from "./c";
import { e } from "./e";

export const bb = a + b + c + e;

Code of Conduct

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