-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix: handle null type loc in getIndexFromLoc method
#19862
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: handle null type loc in getIndexFromLoc method
#19862
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
null loc in getIndexFromLoc methodnull type loc in getIndexFromLoc method
a0312a4 to
dbde956
Compare
dbde956 to
bc245ec
Compare
|
I’ve reverted the latest changes based on the comments. |
snitin315
left a comment
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, thanks!
Leaving it open for @mdjermanovic & @nzakas
mdjermanovic
left a comment
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, thanks! Leaving it open for @nzakas
nzakas
left a comment
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. Thanks.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[x] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Hello,
In this PR, I've added handling logic for
null-typelocto thegetIndexFromLocmethod.Currently, passing
nulltogetIndexFromLocresults in an unrelated error because accessingloc.linethrows whenlocisnull.So, I’ve updated the error message to more precisely indicate that an incorrect type was passed to the
getIndexFromLocmethod.Is there anything you'd like reviewers to focus on?