Skip to content

🐛 Calling biome from a subdirectoy ignores root .gitignore #6646

@GiyoMoon

Description

@GiyoMoon

Environment information

CLI:
  Version:                      2.0.6
  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:           v22.16.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.12.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?

I have a monorepo setup where I have a single biome.json and a single .gitignore file at the root. When I call biome check from the root everything works but after navigating inside a sub directory (eg. one of my projects), biome check seems to ignore my .gitignore file at the root.

Reproduction

Repo: https://github.com/GiyoMoon/biome-root-gitignore-bug
Steps:

  1. git clone [email protected]:GiyoMoon/biome-root-gitignore-bug.git
  2. cd biome-root-gitignore-bug
  3. pnpm install
  4. cd apps/myProject
  5. pnpm build
  6. pnpm lint

See how it throws formatting errors from ./dist, event though I included dist inside my .gitignore file at the root.

Expected result

biome should detect the .gitignore file even if I call it from a sub directory.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-CLIArea: CLIS-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