jsx-pascal-case
Configuration
rslint.config.ts
Enforce PascalCase for user-defined JSX components.
Rule Details
JSX tag names that start with a lowercase letter are interpreted by React as
HTML intrinsics (<div>, <span>, …) and are skipped. For user components
(<TestComponent>), this rule requires PascalCase: the first character must
be an upper-case letter, the remaining characters must be alphanumeric, and
at least one lower-case letter or digit must follow.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Rule Options
allowAllCaps(defaultfalse): allow SCREAMING_SNAKE_CASE component names.allowNamespace(defaultfalse): skip the check for parts after the first dot or colon in a namespaced / member-access tag.allowLeadingUnderscore(defaultfalse): strip a single leading_before running the PascalCase / all-caps check.ignore(default[]): array of names to exempt. Entries are matched as minimatch-style globs — supports*,?, character classes, and extglob groups such as+(a|b).
allowAllCaps
Examples of correct code for this rule, when allowAllCaps is true:
allowNamespace
Examples of correct code for this rule, when allowNamespace is true:
allowLeadingUnderscore
Examples of correct code for this rule, when allowLeadingUnderscore is
true:
Differences from ESLint
ignoreentries do not support the!(a|b)negative extglob syntax.