A component used in JSX is named in a case other than PascalCase, such as My_Button or BUTTON
What it finds
JSX treats a tag that starts with a capital letter as a component, and React code names components in PascalCase, as UserCard. Names with underscores or in all capitals read as constants.
Reported are JSX tags that start with a capital letter and contain an underscore or no lower-case letter, when longer than two characters.
From the rule's source, component_name_not_pascal_case.rs.
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:
[rules]
"tx0/ts:component-name-not-pascal-case" = "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:component-name-not-pascal-case] reason="..."tx0 explain tx0/ts:component-name-not-pascal-case shows the same in the terminal. Found a false positive? Report it.