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

Fix edge cases on jsx-pascal-case #2637

Closed
wants to merge 5 commits into from

Conversation

yacinehmito
Copy link
Contributor

Currently the rule jsx-pascal-case doesn't support some edge cases:

  • It improperly errors when the component is in a namespace that starts with an underscore
  • It improperly succeeds on the component is in camelCase
  • It improperly succeeds in a bunch of cases where the component is in a namespace
  • It doesn't accurately report the name of the component in some error cases

The PR should fix #1334

@yacinehmito
Copy link
Contributor Author

There is no fix yet. I am waiting for #2636 to be merged.
For the moment the PR only adds new test cases.

@yacinehmito
Copy link
Contributor Author

yacinehmito commented May 9, 2020

The PR #2638 is now sufficient to fix #1334.

Keeping this one around though to make sure that jsx-pascal-case doesn't trigger an error when a colon is used in a tag.

@yacinehmito yacinehmito marked this pull request as draft May 9, 2020 07:39
@yacinehmito
Copy link
Contributor Author

Fixed the test cases after having worked on #2638.
This showcases that #1334 is not truly fixed yet.

I'll work on it after #2636 and #2640 are sorted out.

@ljharb
Copy link
Member

ljharb commented Oct 15, 2020

@yacinehmito are you interested in completing this PR?

@yacinehmito
Copy link
Contributor Author

I am sorry, I lost interest as I was not using React anymore.

@ljharb
Copy link
Member

ljharb commented Nov 18, 2022

@yacinehmito i'd still prefer to leave it open so someone else can finish it, if that's ok :-)

@yacinehmito
Copy link
Contributor Author

It's been a year and a half. I am closing the PR because I want to clean up my Pull Request tab on GitHub. Feel free to open a new PR, or to reopen this one if someone shows up to finish it.

@ljharb
Copy link
Member

ljharb commented Jun 23, 2024

It’s unfortunate that the pull requests tab encourages this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

false negative with namespacing/qualifications using jsx-pascal-case
2 participants