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

Skip to content

πŸ’… noMisusedPromises should emit warning where function returns boolean | Promise<boolean>Β #8405

@himself65

Description

@himself65

Environment information

CLI:
  Version:                      2.3.8
  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.18.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         unset

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

Linter:
  JavaScript enabled:           unset
  JSON enabled:                 unset
  CSS enabled:                  unset
  GraphQL enabled:              unset
  Recommended:                  false
  Enabled rules:
    complexity/noUselessSwitchCase
    complexity/noUselessTypeConstraint
    complexity/useDateNow
    correctness/noUnusedImports
    nursery/noFloatingPromises
    nursery/noMisusedPromises
    performance/noDelete
    style/noRestrictedImports
    style/useImportType
    style/useNodejsImportProtocol
    suspicious/noDebugger
    suspicious/noDuplicateObjectKeys
    suspicious/noImplicitAnyLet
    suspicious/noTsIgnore

Workspace:
  Open Documents:               0

Rule name

noMisusedPromises

Playground link

https://biomejs.dev/playground/?lintRules=noMisusedPromises&code=ZgB1AG4AYwB0AGkAbwBuACAAYQAoACkAOgAgAGIAbwBvAGwAZQBhAG4AIAB8ACAAUAByAG8AbQBpAHMAZQA8AGIAbwBvAGwAZQBhAG4APgAgAHsAfQAKAAoAaQBmACAAKABhACgAKQApACAAewAKACAAIAAKAH0ACgAKAGYAdQBuAGMAdABpAG8AbgAgAGIAKAApADoAIABQAHIAbwBtAGkAcwBlADwAYgBvAG8AbABlAGEAbgA%2BACAAewB9AAoACgBpAGYAIAAoAGIAKAApACkAIAB7AAoAIAAgAAoAfQA%3D

Expected result

should emit an error or a warning

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-LinterArea: linterS-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