vtcode 0.123.7

A Rust-based terminal coding agent with modular architecture supporting multiple LLM providers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
id: use-logical-assignment
language: typescript
severity: hint
message: Use the logical assignment operator `||=` instead of the verbose form.
note: |
  ES2021 logical assignment operators (`||=`, `&&=`, `??=`) are more concise
  and clearly express intent. `$A = $A || $B` can be rewritten as
  `$A ||= $B`. This rule only fires on direct self-assignment with `||`.
rule:
  pattern: $A = $A || $B
fix: $A ||= $B
files:
  - "**/*.ts"
  - "**/*.tsx"
  - "**/*.js"
  - "**/*.jsx"
  - "!node_modules/**"