eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

Fix edge cases on jsx-pascal-case

Open yacinehmito opened this issue 5 years ago • 6 comments

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 avatar May 09 '20 05:05 yacinehmito

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

yacinehmito avatar May 09 '20 05:05 yacinehmito

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 avatar May 09 '20 06:05 yacinehmito

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.

yacinehmito avatar May 09 '20 23:05 yacinehmito

@yacinehmito are you interested in completing this PR?

ljharb avatar Oct 15 '20 17:10 ljharb

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

yacinehmito avatar Nov 18 '22 08:11 yacinehmito

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

ljharb avatar Nov 18 '22 21:11 ljharb