Skip to content

🐛 Monorepo - disable at root level, enable at child level #6357

@d0cm0d

Description

@d0cm0d

Environment information

biome rage of root folder:

CLI:
  Version:                      HEAD-be9076b
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           unset
  JS_RUNTIME_NAME:              unset
  NODE_PACKAGE_MANAGER:         unset

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

Workspace:
  Open Documents:               0


biome rage of subfolder with own biome.jsonc

CLI:
  Version:                      HEAD-be9076b
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           unset
  JS_RUNTIME_NAME:              unset
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         /Users/.../.../biome.jsonc
  Formatter enabled:            false
  Linter enabled:               false
  Assist enabled:               false
  VCS enabled:                  false

Workspace:
  Open Documents:               0

What happened?

Description

We manage a large monorepo and are planning a gradual migration to Biome. Our goal is to set up default Biome configurations at the root level, while initially disabling all Biome features globally. This will allow us to progressively migrate individual sub-projects (each represented by a subdirectory) at our own pace.

As part of this approach, we intend to enable and customize Biome features within each subdirectory’s biome.jsonc file as we migrate them. This should allow us to tailor the configuration for each sub-project while keeping the rest of the monorepo unaffected.

Problem Encountered

However, we’ve encountered a significant issue: once a feature is disabled at the root level, it cannot be re-enabled in a subdirectory’s configuration. This limitation prevents us from incrementally enabling Biome features for sub-projects without affecting the entire monorepo.

The biome.jsonc in the root folder looks like this:

{
    "files": {
        "ignoreUnknown": false
    },
    "assist": {
        "enabled": false
    },
    "vcs": {
        "enabled": false,
        "clientKind": "git",
        "useIgnoreFile": true,
        "defaultBranch": "develop"
    },
    "formatter": {
        "enabled": false,
        "indentStyle": "space",
        "indentWidth": 4
    },
    "linter": {
        "enabled": false,
        "rules": {
            "recommended": true,
            "style": {
                "noParameterAssign": "off"
            }
        }
    },
    "javascript": {
        "formatter": {
            "quoteStyle": "single"
        }
    }
}

The biome.jsonc in the subfolder looks like this:

{
    "root": false,
    "extends": "//",
    "assist": {
        "enabled": true
    },
    "vcs": {
        "enabled": true,
        "clientKind": "git"
    },
    "formatter": {
        "enabled": true
    },
    "linter": {
        "enabled": true,
        "rules": {}
    }
}

Expected result

When configuring Biome in a monorepo setup, we expect that features disabled at the root level can be selectively re-enabled and customized in the configuration files of individual subdirectories (sub-projects). This would allow us to:
• Apply a default, minimal configuration globally at the root.
• Gradually migrate each sub-project by enabling and adjusting Biome features in their respective biome.jsonc files.
• Maintain isolated configuration changes, so enabling features in a subdirectory does not affect unrelated parts of the repository.
• Seamlessly support incremental adoption of Biome across the monorepo, without requiring all sub-projects to migrate at once.

This approach would provide flexibility and control over the migration process, making it possible to adopt Biome in a phased, non-disruptive manner.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-CoreArea: coreS-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