biomejs / biome-intellij

Biome plugin for IntelliJ
https://plugins.jetbrains.com/plugin/22761-biome
Apache License 2.0
45 stars 12 forks source link

🐛 intelliJ plugin 1.0.0 doesn't lint and output the CLI help when formatting #41

Open cedeber opened 6 months ago

cedeber commented 6 months ago

Environment information

CLI:
  Version:                      1.6.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:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.2.5"

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

Workspace:
  Open Documents:               0

What happened?

First, Using intelliJ on Windows with a project loaded via WSL or directly Windows, the Biome plugin seems to load successfully (LSP server says it is running) but it reports no linting issues (I saw them on VSCode for the same file)

Secondly, when I "format on save", it pastes the CLI output on the file. We can see that the formatting is done first, but then replaced by the help CLI output.

Expected result

lint and format properly ;-)

Code of Conduct

cedeber commented 5 months ago

Looks like the v1.0.2 fixed the issue. We'll test a bit more and I close the ticket if everything is fine.

cedeber commented 5 months ago

lineWidth from the config is not taking into account (if not the whole config file?) We set it explicitly in IntelliJ.

cedeber commented 5 months ago

java.lang.Throwable: Failed to run Biome check with (format, safefixes) for file Whatever.tsx - \wsl.localhost\Ubuntu-22.04\home[..]/rome.json internalError/fs ━━━━━━━━━━━

× Biome couldn't read the file

× Biome couldn't read the following file, maybe for permissions reasons or it doesn't exists: \wsl.localhost\Ubuntu-22.04\home[..]/rome.json

PS: [..] being folder path here of the project (where package.json is).

cedeber commented 5 months ago

Also reordering of import doesn't seem to work neither with 1.0.2

cedeber commented 5 months ago

java.lang.Throwable: Failed to run Biome check with (format, safefixes) for file Whatever.tsx - \wsl.localhost\Ubuntu-22.04\home[..]/rome.json internalError/fs ━━━━━━━━━━━

× Biome couldn't read the file

× Biome couldn't read the following file, maybe for permissions reasons or it doesn't exists: \wsl.localhost\Ubuntu-22.04\home[..]/rome.json

PS: [..] being folder path here of the project (where package.json is).

I reopened the config and the link the biome.json path where changed to the folder of the app (where package.json is) We have a workspace config if it may be the issue to test.

Sec-ant commented 5 months ago

Would you mind updating Biome to the latest version (v1.7.0)?

cedeber commented 5 months ago

I just did now, it's well detected regarding the status bar, but it's not better for the formatting. Formatting also often times out btw.