type-literal-properties-newline
Enforce multiline type literals when they have two or more members.
- Rule ID:
tai-kun/type-literal-properties-newline - Auto-fix: Yes
Inserts a line break after { when a type literal has two or more members and the first member starts on the same line as the brace.
Configuration
Add the rule to lint.rules in vite.config.ts to enable it.
"tai-kun/type-literal-properties-newline": "error",
Examples
Invalid
type Options = { a: string; b: number };
Valid
type Options = {
a: string;
b: number;
};
Notes
interfacedeclarations are excluded because Oxfmt always prints them multiline.- Use it together with
sort-type-members.