Thanks to visit codestin.com
Credit goes to github.com

Skip to content

πŸ› Still can't ignore nested biome.json configurationΒ #7942

@lgarron

Description

@lgarron

Environment information

CLI:
  Version:                      2.3.2
  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:           v24.10.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         bun/1.3.1

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

Workspace:
  Open Documents:               0

What happened?

git clone https://github.com/lgarron/repo && cd repo
git checkout 7303f65efac5e230b22d749583e74a2daf5f5f12

# Using `bun` (https://bun.sh/)
make lint

# Alternative: using `node`
npm install
npx @biomejs/biome check

This results in:

/Users/lgarron/Code/git/github.com/lgarron/repo/src/templates/biome.json configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– Found a nested root configuration, but there's already a root configuration.
  
  β„Ή The other configuration was found in /Users/lgarron/Code/git/github.com/lgarron/repo.
  
  β„Ή Use the migration command from the root of the project to update the configuration.
  
  $ biome migrate --write
  

configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– Biome exited because the configuration resulted in errors. Please fix them.

Expected result

No error. src/templates/biome.json should be ignored, per #6509 (comment)

In this case I can temporarily exclude the parent folder. However, this is dangerous because it could exclude future files under the same folder. There are workarounds for this, but it would be much safer if Biome excluded the specified file.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions