Skip to content

🐛 useReadonlyClassProperties doesn't work with static members #7949

@jakeleventhal

Description

@jakeleventhal

Environment information

CLI:
  Version:                      2.3.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.20.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.11.1

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

Workspace:
  Open Documents:               0

What happened?

https://biomejs.dev/playground/?lintRules=useReadonlyClassProperties&code=YwBsAGEAcwBzACAAUwBvAG0AZQBDAGwAYQBzAHMAIAB7AAoAIAAgAHAAcgBpAHYAYQB0AGUAIABzAHQAYQB0AGkAYwAgAFYAQQBMAFUARQAgAD0AIAAiAEEAUwBEAEYAIgA7AAoAfQAKAA%3D%3D

Expected result

Static values like this should be reported as being updatable to readonly

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