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

Skip to content

πŸ› lint/nursery/noFloatingPromises violations are suppressed if extended from a non-root biome configΒ #7062

@Vhaos

Description

@Vhaos

Environment information

CLI:
  Version:                      2.1.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:           v22.13.1
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         yarn/4.9.2

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

Linter:
  JavaScript enabled:           unset
  JSON enabled:                 unset
  CSS enabled:                  unset
  GraphQL enabled:              unset
  Recommended:                  false
  Enabled rules:
    nursery/noBitwiseOperators
    nursery/noFloatingPromises

Workspace:
  Open Documents:               0

What happened?

  1. create a biome.jsonc config file with "root": false in a directory somewhere
  2. configure the lint/nursery/noFloatingPromises rule in that non-root biome.jsonc file
    a. Severity doesn't matter - but for reproduction purposes set to "error"
  3. create a root biome.jsonc file that simply extends the non-root config you created earlier
  4. add some sample code that breaks the noFloatingPromises rule, and run linting
  5. the bug: no rule violation errors are raised πŸ”•

If we instead move the noFloatingPromises config to the root biome config rule, then the rule works as normal.
This issue doesn't appear to affect the other nursery rules I've tested so far, but admittedly I haven't done an exhaustive check of every rule.

I've created a repo below to reproduce this:
https://github.com/Vhaos/250729-biome-ignored-nofloatingpromises-nursery/

Expected result

We should see the noFloatingPromises flag some errors when configured within a non-root biome.jsonc file as with other rules

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LinterArea: linterA-ProjectArea: projectS-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