Skip to content

🐛 unexpected lint command output #10077

@hrasekj

Description

@hrasekj

Environment information

CLI:
  Version:                      2.4.12
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:                    unset
  BIOME_LOG_PREFIX_NAME:             unset
  BIOME_LOG_LEVEL:                   unset
  BIOME_LOG_KIND:                    unset
  BIOME_CONFIG_PATH:                 unset
  BIOME_THREADS:                     unset
  BIOME_WATCHER_KIND:                unset
  BIOME_WATCHER_POLLING_INTERVAL:    unset
  NO_COLOR:                     unset
  TERM:                         xterm-color
  JS_RUNTIME_VERSION:           v22.22.1
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.33.0

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

Workspace:
  Open Documents:               0

What happened?

I have pre-commit hook that will check only staged changes via biome linter. I made this hook for version 1.8.3. I made that hook due this issue #3608

Today i found that the biome lint prints to stderr this message:

stdin ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ The contents aren't fixed. Use the `--write` flag to fix them.

The issue here is, that i'm passing on stdin valid typescript file. It worked fine in version 1.8.3. I found that it stopped working since version 1.9.0.

Replication steps:

  1. make change in file
  2. stage the file
  3. make another changes in file
  4. then call next command
file=<filepath>
git show :$file | ./node_modules/.bin/biome lint --stdin-file-path=$file  2>&1 > /dev/null

Expected result

When valid file is passed to stdin, it should not write to stderr.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-Needs triageStatus: this issue needs to be triaged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions