-
Notifications
You must be signed in to change notification settings - Fork 62
Fix: camelcase false positives on interface properties (fixes #177) #183
Conversation
1)The hard thing about explicitly differentiating camelCase vs PascalCase is that conventions states generally that classes (and react functional component variables) use PascalCase, and so do interfaces and generics. So if you want a rule that only allows camelCase or PascalCase, then you have to add config options for every single thing. If that's the route we want to go, it may be better to diverge from 2)I think we should add support for it in our codebase for now. Class properties are still stage 3 (https://github.com/tc39/proposal-class-fields), so I don't think eslint will add support until they are stage 4 (aka actually released). We'll just have to monitor the base implementation to see when we can delete code I guess. As an aside on this point - don't forget about constructor arguments: 3)I'm fine with bumping the eslint version. The breaking changes in v5 shouldn't affect our tests. |
Well we already have a rule to validate PascalCase in classes and interfaces, might as well create new rules for the rest... if we decide to go this route, what would happen to the camelcase rule? wouldn't this be in direct conflict with the new rules? That's what I thought, adding support for these (and any other case I can think of) tonight. Bumping the version has no real impact on this rule, so I would prefer to do it in a separate PR... |
1)hmmm.. looking back over the rules, we have this handled in a very mish-mash way.
So we're already going down the path of one rule per case...
I should probably open a new issue to discuss this 😅 2)👍 3)Go for it! I don't know why exactly. At the very least, they should be peer dependencies. For the 1.0.0 release I was thinking of making the parser a direct dependency, and eslint a peer dependency (so long as that all works...!) |
I agree... this should be a separate bug... I will add the missing cases to this rule, so we can close it... we can deal with the refactoring and new rules at a later time (maybe even after 1.0.0)... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
e60235d
to
5dd4f20
Compare
I will wait until #186 gets merged to update the branch and do the merge |
Do not merge just yet.
I'm submitting this so we can discuss a few things that are bothering me...
eslint/eslint#10473 seems to discuss this issue in detail...
Thoughts?