-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: expand decorators validation rule to cover class members #17673
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
Conversation
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. One minor nit
"NgModule": { | ||
"argument": 0, | ||
"properties": { | ||
"*": "^(?!\\s*$).+" |
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.
It slightly feels confusing that *
is part of properties
but matches the actual decorator argument text (where it doesn't necessarily need to be a ts.ObjectLiteralExpression
.
I understand why it is done that way, but it feels weird. Since it's just a lint rule though, it should be fine.
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.
I felt weird about it as well, but I wasn't sure how else to express it.
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.
We could have another property like argumentText
, but I don't think it's too important.
Expands the lint rule that we use to validate class decorators to also apply to class members. We need this in order to support linting things like `descendants` on `ContentChildren`. These changes switch around the config data structure to make it more flexible, fix some cases where we were using `any` and add some extra properties to the config.
301491e
to
cff8115
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Expands the lint rule that we use to validate class decorators to also apply to class members. We need this in order to support linting things like
descendants
onContentChildren
.These changes switch around the config data structure to make it more flexible, fix some cases where we were using
any
and add some extra properties to the config.