Require newlines around variable declarations. Only one variable declaration is allowed per line. This rule only checks .ets files.
// code-linter.json5
{
"rules": {
"@hw-stylistic/one-var-declaration-per-line": "error"
}
} let a: string = 'hello';
let b: string = 'world';
a += 'my';
b += 'my';
const c: string = 'hello';
const d: string = 'world';
console.info(`a: ${a}, b: ${b}, c: ${c}, d: ${d}`); // Split 'const' declarations into multiple statements. const a: string = 'hello', b: string = 'world';
"plugin:@hw-stylistic/recommended" "plugin:@hw-stylistic/all"
For details about how to configure Code Linter check rules, see Code Linter.