Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require PascalCase for user-defined JSX components (react/jsx-pascal-case) #1365

Closed
feross opened this issue Aug 15, 2019 · 5 comments
Closed

Comments

@feross
Copy link
Member

feross commented Aug 15, 2019

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

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md

The following patterns are considered warnings:

<Test_component />
<TEST_COMPONENT />

The following patterns are not considered warnings:

<div />
<TestComponent />
<TestComponent>
  <div />
</TestComponent>
<CSSTransitionGroup />
@feross
Copy link
Member Author

feross commented Aug 15, 2019

Shipping in standard 14.

@Johnny-Brendow
Copy link

if you got here, because you saw a warning like this "the imported jsx component must be in pascalcase"
you should know that some things don't accept accents , you may try to write
InPascalCase instead InPáscalCâsé

@BlaineBradbury
Copy link

Ditto for underscores... can't have those either. Thanks to the prior comment for giving me a clue.

@Ark010
Copy link

Ark010 commented Aug 26, 2021

So here underscore('_') in the component name is the culprit for the warning................

suchitg8 pushed a commit to suchitg8/standard that referenced this issue Apr 9, 2022
@RomanRiezanov
Copy link

So here underscore('_') in the component name is the culprit for the warning................

Thanks)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

5 participants