-
-
Notifications
You must be signed in to change notification settings - Fork 205
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 crash with no-tracked-properties-from-args
rule
#1712
Conversation
node.value.object?.type === 'MemberExpression' && | ||
node.value.object?.object.type === 'ThisExpression' && | ||
node.value.object?.property.name === 'args'; | ||
node.value?.object?.type === 'MemberExpression' && |
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.
Normally, it's better practice to be checking the type of the nodes we're dealing with, instead of just checking that various properties exist. Can we check the type on node
and node.value
before attempting to use them?
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.
👌
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.
Some really useful helpers and examples already built-ini I just needed to track down, thanks!
Looks like you need to rebase on master, lots of extra commits. |
no-tracked-properties-from-args
rule
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.
Thanks!
It's always a good idea test a new rule on an actual codebase.
Co-authored-by: Joan Cejudo <joan@Joans-MacBook-Pro.local> Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com> Fixes ember-cli#1711
Fixes #1711