A class or type name does not follow the configured case style
What it finds
Names of classes and types written in one case style tell a reader at a glance that a name stands for a type or constructor, and keep a code base consistent.
The names of classes, interfaces, type aliases and enums are checked against the case styles of the parameter style, PascalCase by default; several styles can be given separated by |. Leading and trailing underscores and dollar signs are ignored.
From the rule's source, class_naming.rs.
export class userStore {}tx0 reports: the type name userStore is not written in PascalCaseexport interface Point { x: number;}export type point_list = Point[];tx0 reports: the type name point_list is not written in PascalCaseexport enum Color { Red,}class _Internal {}export const used = _Internal; Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/ts:class-naming" = "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:class-naming] reason="..."tx0 explain tx0/ts:class-naming shows the same in the terminal. Found a false positive? Report it.