Skip to content

🐛 Loading plugins from shared config #6246

@milosworks

Description

@milosworks

Environment information

CLI:
  Version:                      2.0.0-beta.6
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           v23.11.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         bun/1.2.10

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.jsonc
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true

Workspace:
  Open Documents:               0

What happened?

Biome CANNOT resolve shared config packages from github neither load plugins from it when specifying the path

To reproduce:

  1. Create a biome config and upload it to github, heres an example: https://github.com/milosworks/biomecf
  2. In another project install biome and the biome config shared package: bun add -D github:milosworks/biomecf @biomejs/biome@beta
  3. In the biome.json extend the shared config package
{
  "extends": "@milosworks/biomecf/biome"
}
  1. Biome is not going to be able to load it, then specify it manually, example: ./node_modules/@milosworks/biomecf/biome.jsonc
  2. This will try and load it, i believe this also doesnt work but if it does, it will NOT be able to load ANY plugins

My insights:

  • Plugins
    Because the plugin path is relative, its probable biome is taking the root config (the one that extends) as root so its using that to try and get the plugin from that root path, not from the shared config path
  • Extends
    I believe this is going to be a problem with biome not being able to resolve github packages, this is weird since in node_modules theres 0 difference to normal packages

Expected result

Biome should be able to extend and load plugins from the shared config package

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-Bug-confirmedStatus: report has been confirmed as a valid bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions