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

jsx-pascal-case #306

Merged
merged 1 commit into from
Nov 17, 2015
Merged

jsx-pascal-case #306

merged 1 commit into from
Nov 17, 2015

Conversation

jakemmarsh
Copy link
Contributor

Add a new rule to enforce PascalCase for user-defined JSX components


## When Not To Use It

If you are not using JSX, or if you don't want your JSX components defined and referenced in PascalCase.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React will only work if user-land components are defined in PascalCase, otherwise it converts them to strings:

<foo />
<Foo />

becomes

  React.createElement("foo", null)
  React.createElement(Foo, null)

so perhaps this should just say

If you are not using JSX.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, updated

@yannickcr
Copy link
Member

Ok for me. Like @Daniel15 said, can you set the rules in alphabetical order in the list? Then squash your commits? Thanks.

@jakemmarsh
Copy link
Contributor Author

Fixed alphabetical order and squashed commits @yannickcr

yannickcr added a commit that referenced this pull request Nov 17, 2015
@yannickcr yannickcr merged commit e31b735 into jsx-eslint:master Nov 17, 2015
@yannickcr
Copy link
Member

Merged, thanks!

@jakemmarsh jakemmarsh deleted the jsx-pascal-case branch November 17, 2015 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants