-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [ban-types] Support namespaced type #616
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
feat(eslint-plugin): [ban-types] Support namespaced type #616
Conversation
Codecov Report
@@ Coverage Diff @@
## master #616 +/- ##
==========================================
+ Coverage 94.31% 94.37% +0.06%
==========================================
Files 109 109
Lines 4536 4535 -1
Branches 1254 1252 -2
==========================================
+ Hits 4278 4280 +2
Misses 148 148
+ Partials 110 107 -3
|
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.
Would only have subjective nits, looks good to me overall!
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.
The code you've got right now LGTM.
One thing that I would ask is could you please make it ignore the generic.
Unless I'm mistaken, if I do something like:
options = {
'React.Component': { .... }
}
against this code:
class Foo extends React.Component<Props> {}
Then it will not detect it because getText
will include the generic.
(If I'm wrong, then just add a test for that case, and we're good to go!)
Turned out it works fine with generics. I have added the tests. In short it works because |
closes #135
This pr add support for banning namespaced type, with option like: