Comma

[comma] Do not use comma expressions.

This warning category is spelled [comma] by qmllint.

Do not use comma expressions

What happened?

A JavaScript comma expression was used outside of a for loop.

Why is this bad?

Comma expressions reduce readability of the code and obscure side-effects.

Example

To fix this warning, refactor the code to use distinct statements for each operation. This way, each side effect is explicit instead of happening as part of another unrelated operation: