Skip to content

2.0.0-beta.1: lint in subdirectory not using root .gitignore #5440

@ValentinGurkov

Description

@ValentinGurkov

Environment information

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

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v22.14.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.6.5

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

Workspace:
  Open Documents:               0

What happened?

Running biome check for a subdirectory/package in a monorepo does not use the .gitingore file from the project root. I noticed the command taking forever and figured it was due to it formatting my Next.js output folder .next.
I created a .gitignore for the subdirectory and the process took 109ms.

The output folder is ignored this way in the root .gitignore:

.next

Expected result

While I am not 100% everyone would consider this a bug, ESLint in a monorepo scenario can work with a single .gitingore file at the project root, so I expected the same here.

Version 1.9.4 also uses the root .gitignore correctly.

Reproduction

https://github.com/ValentinGurkov/biome-repro-1742925348856

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions