Two statements are written on the same line

tx0/ts:crowded-lineallwarningstyle/formattingdepth faststyle

What it finds

One statement per line keeps each change on its own line in diffs, lets debuggers stop at each statement and makes long lines rarer.

Reported are statements that start on the line where the previous statement of the same block starts.

From the rule's source, crowded_line.rs.

Example from the rule's tests
export function swap(a: number[]) {  const t = a[0]; a[0] = a[1];tx0 reports: this statement is on the same line as the one before  a[1] = t;}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the all tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:crowded-line" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/ts:crowded-line] reason="..."

tx0 explain tx0/ts:crowded-line shows the same in the terminal. Found a false positive? Report it.