# es/no-logical-assignment-operators

disallow logical assignment operators

  • ✅ The following configurations enable this rule: plugin:es/no-new-in-esnext
  • 🔧 The --fix option on the command line (opens new window) can automatically fix some of the problems reported by this rule.

This rule reports ES2021 logical assignment operators (opens new window) as errors.

# Examples

⛔ Examples of incorrect code for this rule:

/*eslint es/no-logical-assignment-operators: error */ x ||= y x &&= y x ??= y
Now loading...

# 📚 References