Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 739 Bytes

jsx-pascal-case.md

File metadata and controls

41 lines (28 loc) · 739 Bytes

Enforce PasalCase for user-defined JSX components (jsx-pascal-case)

Enforces coding style that user-defined JSX components are defined and referenced in PascalCase.

Note that since React's JSX uses the upper vs. lower case convention to distinguish between local component classes and HTML tags this rule will not warn on components that stats with a lower case letter.

Rule Details

The following patterns are considered warnings:

<Test_component />
<TEST_COMPONENT />

The following patterns are not considered warnings:

<div />
<TestComponent />
<TestComponent>
  <div />
</TestComponent>
<CSSTransitionGroup />

When Not To Use It

If you are not using JSX.