Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/style/prefer-compound-assignment

In the code-quality set. Unsafe fix: it can change behaviour.

What it does

Shorthand notation for operators should be used if possible.

Configuration

[lint.rules]
"style/prefer-compound-assignment" = "error"

To skip it in some files, add an override or a @pun-ignore-file comment.

Replaces

Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See merged rules.

  • lint/operators/prefer-shorthand-operator

More lint/style rules · Edit this page

Last updated on

Was this page helpful?